refactor: split request auth from local owner lookup #365

Closed
opened 2026-05-11 21:02:06 +00:00 by barrettruth · 0 comments
Owner

Parent: #355

Problem

Auth helpers mix local owner creation/lookup, API-key request auth, unauthorized responses, and IP/rate-limit utilities. Some routes intentionally use local owner access while others require request auth, but helper names do not make that boundary obvious.

Solution

Split the auth helper surface by responsibility:

  • explicit local-owner lookup/bootstrap helper
  • explicit request API-key auth helper
  • explicit unauthorized/error response helper where useful
  • preserve every current route's access semantics

Acceptance criteria

  • Route code makes local-owner vs request-auth behavior obvious.
  • No route becomes more or less permissive.
  • Auth/API tests cover the unchanged behavior.
Parent: #355 ## Problem Auth helpers mix local owner creation/lookup, API-key request auth, unauthorized responses, and IP/rate-limit utilities. Some routes intentionally use local owner access while others require request auth, but helper names do not make that boundary obvious. ## Solution Split the auth helper surface by responsibility: - explicit local-owner lookup/bootstrap helper - explicit request API-key auth helper - explicit unauthorized/error response helper where useful - preserve every current route's access semantics ## Acceptance criteria - Route code makes local-owner vs request-auth behavior obvious. - No route becomes more or less permissive. - Auth/API tests cover the unchanged behavior.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/delta#365
No description provided.