Repository navigation
Let a connected program's work sign as its person after the session ends - #177
Merged
Merged
Conversation
A product's subject assertion may name agent_grant in place of assurance_ref. Only token exchange (ai.invoke, billing.read, memory.read, memory.write) and organisation reads opt in; every other verifier refuses it. The grant is rechecked (revocation, expiry, epoch, mapping, sign-in evidence, account participation), never moves the idle clock, cannot be combined with a session proof and yields no assurance id. SSO-governed organisations admit it only with matching SSO evidence. Shared rules move to agent-connection-grant-policy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
Follow-up to #176. A program connected to Nessie can now outlive its approver's session, but the work it starts (DeepCRM, Ledger and memory calls, organisation reads) still signed subject assertions with the session's
assurance_ref. After the 30-day sign-in, those calls would fail while the connection itself stayed alive.agent_grantsubject-assertion claim (confidential-token-exchange.service.ts): a product may name its agent connection grant handle in place ofassurance_ref.verifyConfidentialSubjectTokenaccepts it only when the caller passesallowAgentGrant, and onlyPOST /auth/tokenand organisation reads viaX-UOA-Subject-Assertion(org-role-guard.ts) pass it. Every other verifier refuses: assurance validation, job grants, and issuing a new agent grant.Checks on every use (
admitAgentGrantAssertionin the newagent-connection-grant-policy.service.ts):It never moves the idle clock. It is refused when combined with
assurance_ref,assurance_idor evidence claims.Token exchange: grant-derived exchanges may mint only
ai.invoke,billing.read,memory.readandmemory.write(neversession:brokerortoken.provision). The issued token carriesagent_connectionand noassurance_id.SSO-governed organisations: the grant's evidence reaches
assertOrgAccessPolicythroughgetActiveClientOrgContext/getUserOrgContext(agentGrant, also onAccessTokenClaimsforGET /org/me), so they admit it only with matching SSO evidence.Refactor: the shared grant rules move to
agent-connection-grant-policy.service.ts, to avoid an import cycle with the token exchange.Docs:
/llmdocuments the claim.Testing
Run on Minis against Postgres 16:
@uoa/apitypecheck and lint pass.agent-connection-grant.test.ts, 6 tests. The new one covers opted-in admission, refusal without opt-in, refusal next toassurance_ref, refusal for another team, and refusal after revoke./auth/tokenexchange with anagent_grantassertion and a live SSO-governed org read. The exchange scope fence is covered by code review only.🤖 Generated with Claude Code