Skip to content

Forbid copying a directed sub across a delegation chain - #65

Merged
dickhardt merged 1 commit into
mainfrom
directed-sub-chaining
Aug 6, 2026
Merged

dickhardt merged 1 commit into
mainfrom
directed-sub-chaining

Conversation

@dickhardt

Copy link
Copy Markdown
Owner

Stack 5 of 7. Base: revocation-iss-jti (#64). Fixes #41.

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 in multi-hop, 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. The delegation chain examples showed exactly that — one "sub": "user:alice" carried unchanged across every hop, modelling the behaviour that breaks the pairwise separation sub is defined to provide.

The rule

Adds §Directed Identifiers Across a Chain, adapting the four-clause rule @kenhuangus proposed in #41:

  1. An issuer MUST NOT copy a directed sub from an upstream token into a token it issues.
  2. It MAY include sub only where it obtained or derived a downstream-directed identifier itself, through an authenticated PS or claims federation step.
  3. Otherwise the token omits sub and carries only agent and, where present, act.
  4. act records 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 sub or scope, so a downstream token with scope and no sub is 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 omits sub rather than inventing one.

🤖 Generated with Claude Code

https://claude.ai/code/session_011H2BBgoKc7DqXeme5yT9Ls

@dickhardt
dickhardt changed the base branch from revocation-iss-jti to main August 6, 2026 07:31
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
dickhardt force-pushed the directed-sub-chaining branch from d4f458c to df5a666 Compare August 6, 2026 08:05
@dickhardt
dickhardt merged commit 9773a9a into main Aug 6, 2026
2 checks passed
@dickhardt
dickhardt deleted the directed-sub-chaining branch August 6, 2026 08:07
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.

Call chaining across domains: directed sub re-expression and iss:sub ↔ iss:sub mapping

1 participant