Repository navigation
Forbid copying a directed sub across a delegation chain - #65
Merged
Merged
Conversation
Identity is the pair (iss, sub). A sub minted by one issuer for one audience carries no meaning under a different issuer for a different audience, but a downstream issuer sees the upstream sub in the upstream_token and the path of least resistance is to copy it forward. Nothing in the spec said not to, and the delegation chain examples showed exactly that -- one "user:alice" carried unchanged across every hop, modelling the behaviour that breaks pairwise separation. Adds a four-clause fail-closed rule: never copy an upstream directed sub; emit sub only from the issuer's own authenticated federation step; otherwise omit it and carry the agent and delegation facts alone; never put a person identifier in act. Clause 3 leaves a well-formed token, since the auth token structure already requires only one of sub or scope. Losing the identifier is the intended outcome where no mapping exists: the downstream resource learns what the agent may do without learning who, which is correct when nobody has established who the person is in that issuer's namespace. Examples updated to show per-audience directed values. Fixes #41 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_011H2BBgoKc7DqXeme5yT9Ls
dickhardt
force-pushed
the
directed-sub-chaining
branch
from
August 6, 2026 08:05
d4f458c to
df5a666
Compare
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 5 of 7. Base:
revocation-iss-jti(#64). Fixes #41.Identity is the pair
(iss, sub). Asubminted by one issuer for one audience carries no meaning under a different issuer for a different audience — but in multi-hop, a downstream issuer sees the upstreamsubin theupstream_token, and the path of least resistance is to copy it forward.Nothing in the spec said not to. The delegation chain examples showed exactly that — one
"sub": "user:alice"carried unchanged across every hop, modelling the behaviour that breaks the pairwise separationsubis defined to provide.The rule
Adds §Directed Identifiers Across a Chain, adapting the four-clause rule @kenhuangus proposed in #41:
subfrom an upstream token into a token it issues.subonly where it obtained or derived a downstream-directed identifier itself, through an authenticated PS or claims federation step.suband carries onlyagentand, where present,act.actrecords agent provenance only and MUST NOT carry any identifier for the person.Clause 3 is what makes it fail-closed, and it needs no new machinery: §Auth Token Structure already requires only one of
suborscope, so a downstream token withscopeand nosubis well-formed today. Losing the identifier is the intended outcome — the downstream resource learns what the agent may do without learning who, which is correct when nobody has established who the person is in that issuer's namespace.Copying fails in both directions at once: the value is meaningless under the new issuer, and the same string at two resources is precisely the correlation handle pairwise identifiers exist to prevent.
Examples
All four delegation-chain examples now show per-audience directed values instead of a shared
user:alice, with a comment on the chained case noting that an issuer with no mapping omitssubrather than inventing one.🤖 Generated with Claude Code
https://claude.ai/code/session_011H2BBgoKc7DqXeme5yT9Ls