Skip to content

Retarget OIDC / OAuth after DID and local-first - #1310

Open
joepio wants to merge 12 commits into
developfrom
cursor/oidc-oauth-reconsider-1cb5
Open

Retarget OIDC / OAuth after DID and local-first#1310
joepio wants to merge 12 commits into
developfrom
cursor/oidc-oauth-reconsider-1cb5

Conversation

@joepio

@joepio joepio commented Aug 27, 2026

Copy link
Copy Markdown
Member

Related Issues

Related: #277 (retarget, do not close)

Checklist

  • Add changelog entry linking to issue, describe API changes
  • Add or update tests if needed
  • Update docs if needed

What this is

A reconsideration of #277. No protocol or server code yet.

Decision

OIDC-only login is a CA: root Agent on the node, browser-generated session Agent, compact SessionCert. Stock authorization-code OIDC; token-exchange into the cert, not Bearer on /commit. Export + unlink so Google is reversible.

How verifiers check session keys

Signature and rights split. commit.signer is the session DID; effective_agent remaps to the root after SessionCert::verify. check_rights does not grow a cert case.

  1. Ed25519 of the commit / AUTH message under the session pubkey (today's validate_signature / check_auth_signature).
  2. Compact SessionCert: session pub matches signer, root Ed25519 over the blob, t in [notBefore, notAfter] (createdAt on commits so history stays valid; AUTH timestamp on live requests).
  3. check_write / admit_drive_write / genesis write insert / AUTH's returned ForAgent use the root DID.

HTTP GET, WS, and Iroh inherit the remap from get_agent_from_auth_values_and_check. No IdP at verify time. No cert ⇒ today's path.

See planning/oidc-oauth.md § How an implementation checks signatures and rights.

Impact

Absent IdP config, nothing changes. The costly work is SessionCert in validate_signature + AUTH. The OIDC plugin is ordinary. Operator sets issuer/client/secret; end users only click the button.

Open in Web Open in Cursor 

#277 assumed server-hosted Agents and a public-key add-on flow.
Identity is now did:ad:agent:{pubkey}; writes are client-signed.
Record that OIDC belongs on the control-plane session (a better
magic-link), not on atomic-server AUTH or commits. Connector OAuth
stays a separate importer problem.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
@joepio
joepio marked this pull request as ready for review August 27, 2026 05:31
cursoragent and others added 11 commits August 27, 2026 05:36
SSO against the operator's IdP, connector refresh tokens, and a later
OAuth AS all belong on always-on atomic-server. That is local config,
not a control-plane client. Commits and resource AUTH stay Ed25519;
OIDC only gates the envelope index. HostMode enrollment is unchanged
until an explicit grant says otherwise.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
Drop closed-product names, billing, and control-plane strategy from the
OIDC/OAuth write-up. The feature is optional IdP config on this node.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
Authorization-code flow with the node as confidential RP. Two cookies:
OIDC session fetches the envelope; Ed25519 atomic_session is still
resource AUTH. First visit mints locally; a returning device unwraps
with passkey or recovery.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
Sign in with the IdP must not also demand a passkey or recovery code.
After a valid ID token the node unwraps with a node-held KEK and
releases the Agent secret. Commits stay client-signed; the operator of
this node is trusted with that identity.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
Record the threat table. Prefer a short-lived issued/session agent
behind the same button; GET /oidc/secret of the root Agent is the
implementable fallback and a key-exfiltration API.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
JWT-in-signature and node-as-signing-oracle fight forever-commits,
peer verify, and offline. The Atomic-shaped version is a short-lived
issued agent: same one-click OIDC UX, Ed25519 still on the wire.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
OIDC-only login: node holds the root, browser generates a short-lived
keypair, root signs a SessionCert. Commits stay Ed25519. write lists
still name the root. Iroh AUTH must treat cert-chain as the person.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
Authorization-code + PKCE against the operator IdP is unchanged.
A valid id_token mints a SessionCert instead of becoming a Bearer
header on /commit.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
Leaving Google is a Settings action with step-up OIDC, not the login
path. Unlink deletes the node's custodial wrap and must not mint a
second identity if they click the button again.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
SessionCert in validate_signature and AUTH is the hard part; the OIDC
dance is ordinary. Absent config, nothing changes. Record Google and
generic issuer setup for the operator, not the end user.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
Spell out the verifier path: session Ed25519, then cert, then rights
for the root via one effective_agent helper. Maps to validate_signature,
AUTH, check_write, admit, and genesis write-list insert.

Co-authored-by: joepmeindertsma <joepmeindertsma@gmail.com>
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.

2 participants