Repository navigation
Add the account parameter for resources holding several accounts - #67
Merged
Merged
Conversation
A resource may hold more than one account for the same person -- an AAuth-to-OAuth proxy where a user has connected several upstream accounts, a SaaS product with several workspaces. Scope says what the agent may do, not which account it may do it to, so consent never named the account, the auth token spanned all of them, and the audit trail could not show which one an authorization covered. The value is an opaque string in the resource's own namespace, flowing request -> resource token -> auth token, so per-account auth tokens give per-account enforcement and audit. It selects rather than hints, which is why it is not login_hint: nobody is being authenticated, and the value must survive into the tokens as a claim. Two things this deliberately does not do: - No account listing. Where the agent does not know which account to name, the resource returns requirement=interaction and the person selects in their own session. At the authorization endpoint the resource has an agent identity and no verified person, so it has nothing to gate a disclosure on and nothing to key the list to; returning one would disclose the accounts behind an agent to anyone presenting an agent token. And which account an agent may act on is a decision that belongs to the person. - No structure on the value. The human-readable name a consent screen needs lives in the R3 document's display text, which the resource controls and the PS already renders, so the identifier stays an identifier. Fixes #52 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011H2BBgoKc7DqXeme5yT9Ls
dickhardt
force-pushed
the
account-parameter
branch
from
August 6, 2026 08:06
4bba26b to
5a825d6
Compare
dickhardt
added a commit
that referenced
this pull request
Aug 6, 2026
All three are artifacts of #62/#67 landing while #53 was open, and none of them broke the build -- which is what makes the first one worth calling out. - The account field added in #67 cited the pre-rename I-D.hardt-aauth-protocol anchor, copying the surrounding style at a point when that anchor was still correct. Once #53 renamed the reference block, the citation matched no local <reference> and mmark silently resolved it from the datatracker to draft-hardt-aauth-protocol-02 of April 2026 -- the abandoned pre-rename draft. R3 cited two different documents, one of them dead, with a green build. - The resource token and auth token prose named typ: resource+jwt and typ: auth+jwt. #62 corrected the JSON examples to the registered aa-resource+jwt and aa-auth+jwt media types but missed the prose, so the document contradicted its own examples one line away. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011H2BBgoKc7DqXeme5yT9Ls
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.
Stack 7 of 7. Base:
approved-tools-offline(#66). Fixes #52.A resource may hold more than one account for the same person — an AAuth-to-OAuth proxy where a user has connected several upstream accounts, a SaaS product with several workspaces. Scope says what the agent may do, not which account it may do it to, so consent never named the account, the auth token spanned all of them, and the audit trail could not show which one an authorization covered.
The mechanism
An OPTIONAL
accountparameter on the authorization endpoint request, echoed as an OPTIONAL claim in the resource token, copied into the auth token. The value is an opaque string in the resource's own namespace — an email address, a workspace id, a tenant key. Different accounts yield different auth tokens, so enforcement and audit are per-account.It selects rather than hints, which is why it is not
login_hint: nobody is being authenticated, the account is already connected at the resource, and the value must survive into the tokens as a claim.R3 gains a matching OPTIONAL
accountfield, with a recommendation thatdisplayname the account in terms the person recognises.Two things this deliberately does not do
No account listing. The original proposal had the resource reject with an error listing the connected accounts. That is dropped. At the authorization endpoint the resource has an agent identity and no verified identity for the person — so it has nothing to gate a disclosure on and nothing to key the list to, and returning one would disclose the accounts behind an agent to anyone presenting an agent token. Even where the resource does know the person, which of their accounts an agent may act on is a decision that belongs to the person. Unknown account now resolves via
requirement=interaction, where the person selects in their own session at the resource.No structure on the value. The implementation report in #52 proposed
{id, kind, label}. Both extra members are dropped:kindexisted solely to make the PS verified-email cross-check safe — and that check is removed here, since it produced a warning that fired constantly for legitimate reasons.labeladdressed consent-card legibility, but the human-readable name belongs in the R3 document'sdisplaytext, which the resource controls and the PS already renders. The identifier stays an identifier.Dropping the listing is what removes the last place a label would have been needed on the wire.
Cost
First-time account selection takes an interaction round trip; afterwards the agent holds the value and sends it with no interaction. An agent under a mission that already names the account never pays it.
🤖 Generated with Claude Code
https://claude.ai/code/session_011H2BBgoKc7DqXeme5yT9Ls