Repository navigation
feat(auth): Privy operator authentication and console gating - #57
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
oneshot | 18a554e | Sep 09 2026, 11:21 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Privy ES256 operator access-token authentication to
@oneshot/apiwith an operator DID allowlist and DID-only audit logging, fails closed when operator auth configuration is partial or malformed, preserves opaqueSERVICE_BEARER_TOKENcredentials for machine/worker clients via credential-shape routing, and gates the@oneshot/webconsole behind an in-memory operator session (lazy-loaded Privy SDK) or machine token with 0 token leakage into the DOM or persistent storage.Scope and acceptance criteria
feature/privy-operator-auth).privy.ioand app audience with clock skew tolerance.SERVICE_BEARER_TOKENfor machine/worker clients.Product and security invariants
Invariant notes:
1 intent / at most 1 settlement) is untouched; the auth gate runs before all/v1/*routes.UNKNOWN reconciles without blind retry) is preserved; the endpoint remains auth-gated and forbidden requests return 403 before touching the ledger.Validation
Commands and results:
Independent review evidence
Gate A — exact candidate tree before push
Base commit SHA:
78b9d74bd4b111a6418485baff6379464325960cCandidate tree SHA:
e24156d694e64866f872c9de5402a2d378296598Candidate commit SHA (if already committed but unpushed):
18a554eb362f5331f10684b7c22a6d427056e183Reviewer tool:
free-pi-cliReviewer model:
deepseek/deepseek-v4-flash-0731Verdict:
VERDICT: PASSFindings or residual risks:
apps/web/src/auth/session.tsmachine-token fallback during transientnullaccess-token window whilestatus === 'SIGNED_IN'.SERVICE_BEARER_TOKENwould route to Privy verifier (opaque tokens preserved).The reviewed tree equals the committed tree.
Gate B — exact remote PR head
Pull request URL/number: feat(auth): Privy operator authentication and console gating #57 feat(auth): Privy operator authentication and console gating #57
Remote head commit SHA:
18a554eb362f5331f10684b7c22a6d427056e183Remote head tree SHA:
e24156d694e64866f872c9de5402a2d378296598Reviewer tool:
free-pi-cliReviewer model:
glm-5.3-flashVerdict:
VERDICT: PASSFindings or residual risks:
apps/api/src/runtime.ts:31DID audit string newline sanitization.SERVICE_BEARER_TOKENmust not be JWT-shaped.nullaccess-token window whilestatus === 'SIGNED_IN'.@privy-io/react-authpinned at 3.6.1 for peer graph compatibility.Gate B reviewed the current remote head and matches Gate A's approved tree, or a fresh Gate A was run for the changed tree.
Agent policy / repository-policyand all applicable CI checks pass.Risk and rollback
git revertthis PR cleanly returns to service-bearer-only authentication.Human merge