Skip to content

Replace browser login with edge-asserted identity#51

Open
czpython wants to merge 6 commits into
mainfrom
commonzenpython/eng-730-edge-identity-headernone-door-cutover-onboarding-deploy
Open

Replace browser login with edge-asserted identity#51
czpython wants to merge 6 commits into
mainfrom
commonzenpython/eng-730-edge-identity-headernone-door-cutover-onboarding-deploy

Conversation

@czpython

Copy link
Copy Markdown
Owner

druks stops authenticating browsers. The edge asserts identity; druks verifies-and-maps it per request:

  • Auth modesDRUKS_AUTH_MODE=none (loopback, exactly one operator account) and header (trusted DRUKS_AUTH_HEADER assertion, open enrollment; the edge gates who reaches druks). jwt trails in a later PR.
  • Per-request resolution — a bearer PAT always resolves first (present must authenticate; invalid never falls through), else the edge/none operator; the attribution ContextVar resets in a yielding dependency after each request.
  • Sessions deleted — Redis session cookies, /api/auth/session, /login/*, and /logout are gone (they fall to the JSON 404 catch-all); nothing sets cookies. Redis loss no longer signs anyone out.
  • Harness OAuth → capability connectPOST/DELETE /api/harnesses/{name}/connection... connects a subscription to the current account; in none/zero the first completed connection creates the sole operator (onboarding = "account has no HarnessConnection", no new state). PAT management admits the operator identity only, never a bearer.
  • SPA: AuthProvider/Landing/HarnessLoginIdentityBootstrap/Onboarding/HarnessConnectFlow over GET /api/auth/me; a 401 renders an edge/config error, never onboarding; the query cache remounts per account id.
  • Installer emits the mode per shape (exe/header, aws/required header, docker/none); Caddyfile/compose/docs rewritten to the assert-and-map contract; none-mode multi-operator drift refuses startup and answers 503.

Part of ENG-730 (edge-identity arc, PR 2 of 3; stacked on #50)

Open naming question flagged for review: current_operator_account vs current_browser_account for the edge/none-only resolver.

🤖 Generated with Claude Code

@czpython
czpython force-pushed the commonzenpython/eng-729-edge-identity-extract-request-actor-context-pr-1 branch from f1971b5 to 0c7a693 Compare July 21, 2026 20:58
Base automatically changed from commonzenpython/eng-729-edge-identity-extract-request-actor-context-pr-1 to main July 21, 2026 20:59
czpython added 5 commits July 21, 2026 23:00
Close the stream only when identity actually fails to resolve; drop the
count helper the identity test can derive; pin that the session-era 404s
and /me set no cookie.
A stale unbound completion attaches to the operator the request resolved
instead of minting a rival none-mode account; the credential transaction
commits before the provider await so flushed row locks never span network
I/O; an identity recheck that resolves a different account broadcasts the
invalidation so account-scoped UI remounts.
Nothing past the credential commit may turn a durable connect into a
client-visible failure — the single-use flow is already spent. Refresh
trouble logs and rolls back its own transaction; the connect returns 200.
Materialize the response DTO before the commit expires the row and keep
rollback failures from escaping — after the point of durability the reply
depends on nothing but data already in hand.
@czpython
czpython force-pushed the commonzenpython/eng-730-edge-identity-headernone-door-cutover-onboarding-deploy branch from 771d6aa to 8e9cad3 Compare July 21, 2026 21:02
login_id params, a user-facing error, a refresh docstring, a log line,
and two signed-in comments still spoke the deleted door's language.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant