Skip to content

docs(agent-identity): part 2 — the outbound boundary - #324

Merged
JAORMX merged 12 commits into
docs/agent-identity-modelfrom
agent-identity-outbound
Aug 4, 2026
Merged

JAORMX merged 12 commits into
docs/agent-identity-modelfrom
agent-identity-outbound

Conversation

@jhrozek

@jhrozek jhrozek commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #321, which this takes as its premise and does not restate. Review that one first.

#321 models identity from the user down to the subagent and stops at the boundary. This is
the boundary: how the harness reaches a tool, what the gateway decides, and how a user's
stored third-party credential gets used without handing an agent more than it was given.

Same tier as the model doc — a strawman, not an ADR.

What it settles

The exchange runs in two legs. The pod authenticates with its SVID and gets an agent
token minted by vMCP's authorization server. That token is then the actor input to an
exchange that adds the user. Leg 1 is client_credentials and is the SPIFFE client-auth
draft's §3.1.2 example; leg 2 is RFC 8693.

Splitting it does three things a single call cannot. The authorization server decides which
agents may exist, so a definition invented in a pull request cannot be named because nothing
registered it — which settles a spoofing question the single-call shape leaves open. mecatl
signs nothing, so no trust bundle crosses the boundary. And the two tokens cache on different
lifetimes, keeping the workload proof off the user's path.

The gate decides once, over a resolved target, and the credential is read only after it
allows.
Keyed on the user, not a login session. That part is forced rather than chosen: an
agent can never carry a tsid, so the lookup both of #321's scenarios rely on cannot run for
one at all. Two independent reasons, either fatal on its own — the claim is minted in the
authorize handler, and the exchange handler drops any inherited one.

Attenuation is by scope in phase 1, which the exchange already enforces downward. It
cannot name a repository, so a reviewer confined to one pull request can read any repository
the credential reaches. That residual is stated rather than glossed, and closing it is a
later phase.

What it does not settle

Deferred items each carry the condition that would un-defer them, so they are decisions with
a trigger rather than a list.

The honest summary of where this stops: it narrows every token except the one that reaches
the provider.
Leg 2 narrows what mecatl presents to vMCP, hop 5 decides what mecatl may ask
for, and GitHub then receives whatever the user granted at connect time. Every constraint
sits upstream of the only party that could enforce one against the actual API call. AWS and
Azure both bind the agent at the credential for that reason; we would need a per-agent consent
record first, and have none.

Status notes

Quoted blocks say what exists today, verified against code, with issue numbers. They are cost
signals, not constraints — everything in these codebases is changeable by us. They stay inline
because two review rounds found false claims in them, and both times the claim sounded like
plumbing and turned out to be a prerequisite.

The largest is that nothing can use either grant yet: registration hardcodes clients
public, and discovery advertises neither the grant nor secret-based client auth
(stacklok/toolhive#6082). Leg 1's client_credentials grant does not exist either. And the
agent-token work proposed in stacklok/toolhive#5815 currently rejects the shape this design
needs — it requires actor_token.sub to equal client_id, where here sub is the agent and
the client is the pod. The ask there is to bind by cnf instead, which is what leg 1's token
already carries and is stronger than subject equality.

Note on scope

This PR touches only the new file. An earlier version of the branch also rewrote a paragraph
in agent-identity-model.md — the one saying the harness presents the subagent's SVID plus
its own proof-of-possession. That claim does need revisiting, since in this design subagents
have no SVID at all and the pod's SVID authenticates the client while the agent is named in
act. But it is your paragraph, so it belongs in a review comment rather than smuggled into
my PR, and I have left it out.

@jhrozek
jhrozek marked this pull request as draft July 29, 2026 15:45
@JAORMX
JAORMX force-pushed the docs/agent-identity-model branch from fc1a58f to 206de3e Compare July 30, 2026 10:06
@jhrozek
jhrozek force-pushed the agent-identity-outbound branch from 2a3f382 to 899e0c8 Compare August 1, 2026 23:40
JAORMX added a commit that referenced this pull request Aug 3, 2026
…review round

Consensus amendments after the adversarial verification of jhrozek's second
pass and PR #324, reframed by the fact that the team owns ToolHive/Cedar:

- Scenario intro: add the 'fixed vs ours to change' note. Current ToolHive
  behaviors (self-issued-only validation, tsid-keyed lookup, Cedar string
  glob) are a tracked work list (#5989/#5815/#6082), not constraints.
- Scenario A: name the trust-placement fork (two-leg AS-minted vs single-
  mint via multi-issuer validator) instead of pretending the mecatl-signed
  SVID crosses today; diagram keeps the two-leg shape with the fork stated.
- Scenario B: reframe the credential read as user-keyed (the primitive
  exists) with the ownership recheck, since tsid is dead for agents; this
  is an enhancement we own, not a protocol law.
- 'Attenuation enforceable by backend' -> verifiable by backend (RFC 8693
  4.1 carries the act chain) but credential scope enforced at the gateway.
  Cedar claim precised (glob on context.claim_act.sub, user as principal).
- Threat model: P3 circularity fixed (anchor to IdP assertion iss+id);
  added three threats (delegated-token-carrying-credential-ref, store-
  writer-no-signing, substituted trust bundle); P1 softened (posture_ceiling
  is an identity-carried lever); P5 digests-only anchoring; leaked-SVID is
  bearer-until-Phase-3.
- Signing key: honest NLP-reachability note (no OS isolation, envscrub
  irrelevant to in-memory signer); local-signing is audit/integrity not
  isolation; sidecar as later-phase option.
- Accuracy: three-tier convergence softened; single-audience 'strongly
  recommended' and required-at-projection (confused deputy); sigstore/
  go-spiffe noted as net-new deps; agent/<def> trust tier carried-not-
  enforced; 'distinct principal' scoped to internal tiers; txn vs outbound
  correlation as two join keys; minting-seam lifetime precedent is
  Deps.ChildAskReviewer not port.EventLog.

Co-Authored-By: mecatl <[email protected]>
The companion doc models identity from the user down to the subagent and stops
at the boundary. This covers the boundary: how the harness reaches a tool, what
the gateway decides, and how a user's stored third-party credential gets used
without handing an agent more than it was given.

Eight hops, with the three that carry real decisions worked out in detail. The
exchange runs in two legs: the pod authenticates with its SVID and receives an
agent token minted by vMCP's authorization server, then that token is the actor
input to an exchange that adds the user. Splitting it puts the server, rather
than mecatl, in charge of which agents may exist — a definition invented in a
pull request cannot be named because nothing registered it — and means mecatl
signs nothing, so no trust bundle crosses the boundary.

The gate decides once over a resolved target, and the credential is read only
after it allows, keyed on the user rather than on a login session. That last
part is forced rather than chosen: an agent can never carry a tsid, so the
lookup both current scenarios rely on cannot run for one at all.

Status notes are inline, marked, and verified against code. They are cost
signals, not constraints. Two review rounds found false claims in them and both
times the claim sounded like plumbing and turned out to be a prerequisite, which
is why they stay in the text rather than moving to an implementation doc.

Deferred items each carry the condition that would un-defer them: resource-level
authority, and per-agent credential isolation. The second is where AWS and Azure
both are, and the honest summary of where this design stops is that it narrows
every token except the one that reaches the provider.

Co-Authored-By: Claude Opus 5 <[email protected]>
@jhrozek
jhrozek force-pushed the agent-identity-outbound branch from 899e0c8 to bb6f713 Compare August 3, 2026 08:59
jhrozek and others added 10 commits August 3, 2026 11:01
The review of #321 came back asking whether two legs is design merit or a
workaround for what vMCP happens to reject today. Stress-testing our own
reasoning showed the ranking was wrong, and the wrong ranking is what made the
question reasonable to ask.

The doc led with "the authorization server decides which agents may exist" and
filed "mecatl signs nothing" below it as a deployment convenience. But the first
one has a hole: if the worry is only that repo-written definitions could take
operator names, mecatl could refuse to name untrusted-tier definitions itself,
with no registration anywhere. Cheaper, and it closes the same hole on paper.

What kills that, and what actually carries two legs, is that any such rule runs
inside the process being injected. Under single-mint mecatl holds a key whose
signature IS the authority claim, and the Bash tool shares its address space. An
injected model signs an assertion naming any agent, so every rule keyed on
act.sub is bypassable. That is the actor claim collapsing, not key hygiene.

So signing nothing is the security property and who-decides is its consequence.
Reordered to say that, with the honest cost stated: only registered definitions
are nameable, so a per-project specialist runs under one rather than as one.

Also states what would change our mind, which the doc did not. Two legs assumes
the signing key stays reachable from the agent loop. A signing sidecar removes
that assumption, and then mecatl-signed identity with the trust tier in the
identifier becomes viable and buys back specialists as nameable principals. For
the outbound hop the two are substitutes, not complements. Now an open question.

And the Today block no longer reads as the motive. It said what ToolHive rejects
before saying why the design is shaped this way, which invited exactly the
reading the review gave it.

Co-Authored-By: Claude Opus 5 <[email protected]>
… claims

Two errors surfaced while illustrating the flow end to end.

The two legs had silently become one exchange per hop. That happened when the
subset-attenuation fix landed: making a child derive from its parent looked like
it replaced the agent-token tier, so I collapsed them. It did not need to. The
narrowing is a THIRD call between the two existing legs, and collapsing cost the
AS-audienced intermediate token — a credential that only works as input to
another token request is worthless to steal, and both AgentCore and Entra keep
that property. Restored: call 1 names the root agent, call 2 narrows per spawn
against the parent's token, call 3 adds the user.

And "the subagent cannot make a call itself" is false. It is catalog-scoped, not
structural: readOnlyExplorerCatalog has no MCP tool so the parent proxies, while
noFSChildCatalog registers the global MCP tools and the child calls the gateway
directly. Either way the token presented names the child in act, so the
narrowing is what gets enforced. Hop 4 now says which component calls and why,
and notes the default child still has a shell.

Also recorded, all of it from the specialist round:

Three scope namespaces, separated. cap:github.read is ours, not GitHub's, and
Alice's IdP token carries no cap:* scope unless the AS is registered at the IdP
with our vocabulary — so by default her token bounds identity, not capability,
and the ceiling is the client registration alone. That is weaker than the doc
previously implied.

The client id is the workload, spiffe://…/ns/prod/sa/mecatl, not a pod instance.
A per-pod registration would be unmaintainable, and the consequence is that
replicas share one ceiling.

One client authentication method. JWT-SVID assertion is the draft's fallback for
deployments that cannot terminate mTLS at the authorization server, and we
terminate it on the gateway call already.

Call 1 is now named as the remaining hole, with AgentCore's refusal of the
analogous path quoted, and the note that BaselineClientScopes being one list for
every client makes call 1's refusal never fire — a precondition, not a
refinement.

Co-Authored-By: Claude Opus 5 <[email protected]>
Three fixes from an audit against the settled ground truths in
.scratch/binding-first-principles.md. Six of the eight held; these are the rest.

The adversary table said a prompt-injected parent "cannot exceed its own
[authority]" and that "a credential-carried ceiling bounds what it hands out."
Hop 2 says no value representing a parent's current authority exists. So the
table stated the intended design as if it shipped — the same error class we
filed against the companion doc. It now says what is true: the parent can name
and spawn any registered agent, cannot name an unregistered one or present
another user, and the bound is the registration rather than a runtime ceiling.

The proof slice used one agent and a denied write. A single-agent run never
requests a second definition, so the step that matters never executes and the
slice passes whether or not the spawn is guarded. Two agents now, one read-only
and one writing, and the criterion is that the read-only one cannot obtain the
other's authority.

And revocation was absent from the document entirely — zero mentions, in a
design whose instance tier exists for attribution. The ground truths had settled
on two credentials, a shared one plus a cheap per-call token naming the
individual, on the argument that you cannot revoke a label. This design collapsed
that to one credential plus a correlation header and never recorded why.

Written down now, with the argument stated rather than assumed: an instance is a
goroutine, cancelling it is the revocation, and a per-instance credential would
name something no external party can address, present or revoke — a credential in
form and a log field in effect. draft-ietf-wimse-arch section 2 requires a
workload to be independently addressable, which a goroutine is not. The reversal
trigger is named too: a subagent in its own process is addressable, and the
two-token shape becomes correct at that point.

Also recorded, from the consent review: revocation is bounded by TTL, not by the
revoking action. Removing a grant does not invalidate a token already issued.

Co-Authored-By: Claude Opus 5 <[email protected]>
…l change

Call 1's ceiling is the pod's whole registration, and the doc left that as an
unresolved open question with three candidate answers. Two of the three are dead
and the third was never the point.

A startup-only root grant is not expressible in any registered mechanism, and
would not work anyway: boot code mints tokens for every agent name, and a
same-uid shell reads them out of process memory. Exhausting the grant hands the
shell the already-minted token instead of letting it ask. One pod per session
fails on storage rather than semantics — a mature authorization server's client
store degrades well before ten thousand clients, and create-then-delete-in-
seconds is not a supported access pattern.

What actually matters is reachability, and it splits in two. A shell FETCHING its
own SVID is closed by a SPIRE selector pinning issuance to the binary, which a
spawned shell fails. A shell READING the key out of the agent loop's memory is
closed only by a uid the loop does not have, because a subprocess sharing a uid
can ptrace its parent. That second half is why an earlier note about SO_PEERCRED
was wrong: peer credentials distinguish processes, not privilege, when the uid is
shared.

So the SVID moves to a token broker at its own uid, making all three calls on the
loop's behalf, with pid pinning on top and its agent-name policy in configuration
the loop cannot write. Recorded with what it is not: the broker attests nothing
and knows nothing about goroutines. It keeps one key out of one address space.

AgentCore reaches the same property with one agent per Runtime per execution
role. A uid boundary buys it without one pod per session.

The reachability claim is marked unverified, because whether a shell can reach
the SVID in our deployment depends on the selector and the inherited socket path,
and neither is checked in our code.

Co-Authored-By: Claude Opus 5 <[email protected]>
…ext string

The example rule compared context.claim_act.sub against a string literal. That is
stringly typed end to end: a policy naming a nonexistent agent, or one whose
casing or SPIFFE path segments drift from what the token carries, matches nothing
and reports no error. Silent non-match, not a validation failure.

With the agent as the principal entity, Cedar's schema validator rejects that
when the policy is written. Entity grouping also becomes available, though the
doc does not use it — an entity DAG expresses membership, not an ordered lattice
of privilege, so "own group or below" is not something to force into it.

Same class as the claim_scope substring hazard already recorded, and the two are
now stated together.

Also recorded, and it is the load-bearing part: grantedScopes cannot be derived
by Cedar. containsAll does the comparison but the value has to be materialized
before the decision, and a stale or missing value means the rule permits. In this
design that value comes from the token on the request, so it cannot drift — which
is precisely why the narrowing lives at call 2 and not in policy. Policy consumes
an already-narrowed token; it never computes the bound.

Co-Authored-By: Claude Opus 5 <[email protected]>
…ying it

The read was keyed on the user alone, so every agent acting for Alice reached
every integration she had connected. AWS keys its vault on the agent and the user
together and gets integration isolation from it.

Copying the credential per agent is the wrong way to reach that. A per-agent copy
of Alice's provider token still carries her whole grant, so duplication buys no
scope reduction while multiplying consent flows, rotation points and revocation
calls. One credential per user and provider with a read policy naming the agent
gets the same isolation and leaves one thing to rotate — and an audit log already
records which reader touched which secret, which is the forensic half of the same
property.

Also recorded: the store need only check the agent. Admission establishes the user
before the read happens, so the dual-principal decision stays where it already is
and the store answers one question. That matters because a store's policy language
may not be able to address a nested actor claim at all, and this design does not
need it to.

Two leftovers fixed in passing: the paragraph still said "leg 2" and "GitHub"
where the surrounding text now says call 3 and speaks of providers generally.

Co-Authored-By: Claude Opus 5 <[email protected]>
…t is a signature

Two later-phase entries stated more narrowly than the truth.

The provider row said this design narrows every token except the one reaching the
provider, and left it there as if nothing could be done. What is true is that
nothing can narrow a credential it did not mint, so a stored user OAuth token is
final — but some providers will issue a credential scoped to one resource and one
permission from a grant already held, and for those the store can derive per call
instead of handing over what it stored. That is a property of each provider and a
per-integration decision, not a step in the flow and not one provider's feature
promoted into a structural position.

The per-agent consent entry treated the un-defer condition as a record that does
not exist yet. The harder half is that no mechanism produces one for a scheduled
run: an absent user cannot consent, and the only available pattern is an
administrator deciding in advance that consent is not needed for a class of agent.
That substitutes organizational authorization for the user's. Recorded as a
decision someone signs rather than a gap to be engineered away.

Also finished the leg-to-call renaming these two paragraphs had missed.

Co-Authored-By: Claude Opus 5 <[email protected]>
…m it

Four prose commits changed the flow and none of them touched the picture, which
is the same failure as last time: edit the text, forget the drawing.

The worst of it was that the token broker was absent. It holds the only private
key in the system and makes all three token calls, so leaving it out did not
simplify the diagram, it deleted the mechanism that closes call 1. The loop now
asks the broker to mint and the broker talks to the authorization server, so the
uid boundary is visible as the thing standing between an injected model and the
pod's credential. The startup note moved with it, since fetching the SVID is the
broker's job and was attributed to the pod.

Three smaller drifts fixed at the same time. The leg naming was stale where the
prose says call 1, 2 and 3. The credential read said "keyed on Alice and that
target" without the per-agent gate. And the provider call named Alice's GitHub
token, which contradicts provider narrowing being a per-provider capability —
the participant is now "the provider" and the store returns the narrowest
credential that provider can issue.

Also shown, because it is the residual and hiding it would flatter the design:
the loop hands Alice's token to the broker for call 3. A shell in the loop has
that token too, which is why the floor is that it can do whatever Alice can.

Co-Authored-By: Claude Opus 5 <[email protected]>
…holder

The named invariant said "the pod is the workload and the key holder," which the
broker commit made false two commits earlier. Worse than stale: it asserted the
exact arrangement that leaves call 1's ceiling reachable, in the section the rest
of the document defers to by name.

Split into the two facts it was conflating. Nothing below the pod holds a key —
unchanged, and the reason is unchanged: siblings share a process. And the pod's
key is not in the agent loop, because a key in that address space is readable by
a shell the loop can spawn. Workload identity is the pod's; custody is the
broker's.

The second half is new to the invariant list and is what closes call 1, so it
belongs here rather than only in hop 3 where the argument lives.

Note for the reply to the companion doc: this is a key-custody rule and custody
is that doc's territory. It also answers its open question about a signing
sidecar, and it generalizes — the same argument applies to mecatl's own signing
key, not just to the SVID. The rule should be stated there and referenced here
rather than argued twice.

Co-Authored-By: Claude Opus 5 <[email protected]>
…does not say

Hop 7 used §2.1's "one-time event... does not create a tight linkage between the
input and output tokens" to argue a backend cannot reconstruct the delegation
chain. That sentence is about lifecycle coupling between the two tokens, not
about what the output token carries — and §4.1 does put the act chain in the
output. The companion doc's author caught it. Same error class we have been
filing against his citations, so it is recorded as a replacement rather than
quietly swapped.

The conclusion holds on two better grounds. §4.1 requires a consumer to consider
only top-level claims and the party identified as the current actor, so a
conformant consumer evaluates one hop even though the chain is present — which
also bounds the gateway's policy layer, since it may not conformantly intersect a
nested act. And the backend never receives our token at all, only a provider
credential, so there is nothing there to walk regardless.

Co-Authored-By: Claude Opus 5 <[email protected]>
docs/agent-identity-outbound.md had no inbound link, so matlatl's strict
check flagged it as unreachable/under-linked and failed CI. Cross-link it
from the strawman index next to agent-identity-model.md (part 1) and
regenerate llms.txt.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@JAORMX

JAORMX commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

We've talked this through — the two-leg exchange, the gateway-side decision, the scope-based attenuation, and the honest residual on provider-token narrowing. The direction is agreed and the doc has converged. Marking ready and merging.

@JAORMX
JAORMX marked this pull request as ready for review August 4, 2026 19:07
@JAORMX
JAORMX merged commit 51ed065 into docs/agent-identity-model Aug 4, 2026
14 checks passed
@JAORMX
JAORMX deleted the agent-identity-outbound branch August 4, 2026 19:07
JAORMX added a commit that referenced this pull request Aug 4, 2026
…review round

Consensus amendments after the adversarial verification of jhrozek's second
pass and PR #324, reframed by the fact that the team owns ToolHive/Cedar:

- Scenario intro: add the 'fixed vs ours to change' note. Current ToolHive
  behaviors (self-issued-only validation, tsid-keyed lookup, Cedar string
  glob) are a tracked work list (#5989/#5815/#6082), not constraints.
- Scenario A: name the trust-placement fork (two-leg AS-minted vs single-
  mint via multi-issuer validator) instead of pretending the mecatl-signed
  SVID crosses today; diagram keeps the two-leg shape with the fork stated.
- Scenario B: reframe the credential read as user-keyed (the primitive
  exists) with the ownership recheck, since tsid is dead for agents; this
  is an enhancement we own, not a protocol law.
- 'Attenuation enforceable by backend' -> verifiable by backend (RFC 8693
  4.1 carries the act chain) but credential scope enforced at the gateway.
  Cedar claim precised (glob on context.claim_act.sub, user as principal).
- Threat model: P3 circularity fixed (anchor to IdP assertion iss+id);
  added three threats (delegated-token-carrying-credential-ref, store-
  writer-no-signing, substituted trust bundle); P1 softened (posture_ceiling
  is an identity-carried lever); P5 digests-only anchoring; leaked-SVID is
  bearer-until-Phase-3.
- Signing key: honest NLP-reachability note (no OS isolation, envscrub
  irrelevant to in-memory signer); local-signing is audit/integrity not
  isolation; sidecar as later-phase option.
- Accuracy: three-tier convergence softened; single-audience 'strongly
  recommended' and required-at-projection (confused deputy); sigstore/
  go-spiffe noted as net-new deps; agent/<def> trust tier carried-not-
  enforced; 'distinct principal' scoped to internal tiers; txn vs outbound
  correlation as two join keys; minting-seam lifetime precedent is
  Deps.ChildAskReviewer not port.EventLog.

Co-Authored-By: mecatl <[email protected]>
JAORMX pushed a commit that referenced this pull request Aug 4, 2026
* docs(agent-identity): part 2 — the outbound boundary

The companion doc models identity from the user down to the subagent and stops
at the boundary. This covers the boundary: how the harness reaches a tool, what
the gateway decides, and how a user's stored third-party credential gets used
without handing an agent more than it was given.

Eight hops, with the three that carry real decisions worked out in detail. The
exchange runs in two legs: the pod authenticates with its SVID and receives an
agent token minted by vMCP's authorization server, then that token is the actor
input to an exchange that adds the user. Splitting it puts the server, rather
than mecatl, in charge of which agents may exist — a definition invented in a
pull request cannot be named because nothing registered it — and means mecatl
signs nothing, so no trust bundle crosses the boundary.

The gate decides once over a resolved target, and the credential is read only
after it allows, keyed on the user rather than on a login session. That last
part is forced rather than chosen: an agent can never carry a tsid, so the
lookup both current scenarios rely on cannot run for one at all.

Status notes are inline, marked, and verified against code. They are cost
signals, not constraints. Two review rounds found false claims in them and both
times the claim sounded like plumbing and turned out to be a prerequisite, which
is why they stay in the text rather than moving to an implementation doc.

Deferred items each carry the condition that would un-defer them: resource-level
authority, and per-agent credential isolation. The second is where AWS and Azure
both are, and the honest summary of where this design stops is that it narrows
every token except the one that reaches the provider.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): rank hop 3's argument by what actually carries it

The review of #321 came back asking whether two legs is design merit or a
workaround for what vMCP happens to reject today. Stress-testing our own
reasoning showed the ranking was wrong, and the wrong ranking is what made the
question reasonable to ask.

The doc led with "the authorization server decides which agents may exist" and
filed "mecatl signs nothing" below it as a deployment convenience. But the first
one has a hole: if the worry is only that repo-written definitions could take
operator names, mecatl could refuse to name untrusted-tier definitions itself,
with no registration anywhere. Cheaper, and it closes the same hole on paper.

What kills that, and what actually carries two legs, is that any such rule runs
inside the process being injected. Under single-mint mecatl holds a key whose
signature IS the authority claim, and the Bash tool shares its address space. An
injected model signs an assertion naming any agent, so every rule keyed on
act.sub is bypassable. That is the actor claim collapsing, not key hygiene.

So signing nothing is the security property and who-decides is its consequence.
Reordered to say that, with the honest cost stated: only registered definitions
are nameable, so a per-project specialist runs under one rather than as one.

Also states what would change our mind, which the doc did not. Two legs assumes
the signing key stays reachable from the agent loop. A signing sidecar removes
that assumption, and then mecatl-signed identity with the trust tier in the
identifier becomes viable and buys back specialists as nameable principals. For
the outbound hop the two are substitutes, not complements. Now an open question.

And the Today block no longer reads as the motive. It said what ToolHive rejects
before saying why the design is shaped this way, which invited exactly the
reading the review gave it.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): record the flow as three calls, and correct two claims

Two errors surfaced while illustrating the flow end to end.

The two legs had silently become one exchange per hop. That happened when the
subset-attenuation fix landed: making a child derive from its parent looked like
it replaced the agent-token tier, so I collapsed them. It did not need to. The
narrowing is a THIRD call between the two existing legs, and collapsing cost the
AS-audienced intermediate token — a credential that only works as input to
another token request is worthless to steal, and both AgentCore and Entra keep
that property. Restored: call 1 names the root agent, call 2 narrows per spawn
against the parent's token, call 3 adds the user.

And "the subagent cannot make a call itself" is false. It is catalog-scoped, not
structural: readOnlyExplorerCatalog has no MCP tool so the parent proxies, while
noFSChildCatalog registers the global MCP tools and the child calls the gateway
directly. Either way the token presented names the child in act, so the
narrowing is what gets enforced. Hop 4 now says which component calls and why,
and notes the default child still has a shell.

Also recorded, all of it from the specialist round:

Three scope namespaces, separated. cap:github.read is ours, not GitHub's, and
Alice's IdP token carries no cap:* scope unless the AS is registered at the IdP
with our vocabulary — so by default her token bounds identity, not capability,
and the ceiling is the client registration alone. That is weaker than the doc
previously implied.

The client id is the workload, spiffe://…/ns/prod/sa/mecatl, not a pod instance.
A per-pod registration would be unmaintainable, and the consequence is that
replicas share one ceiling.

One client authentication method. JWT-SVID assertion is the draft's fallback for
deployments that cannot terminate mTLS at the authorization server, and we
terminate it on the gateway call already.

Call 1 is now named as the remaining hole, with AgentCore's refusal of the
analogous path quoted, and the note that BaselineClientScopes being one list for
every client makes call 1's refusal never fire — a precondition, not a
refinement.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): fix the two overclaims, and write down revocation

Three fixes from an audit against the settled ground truths in
.scratch/binding-first-principles.md. Six of the eight held; these are the rest.

The adversary table said a prompt-injected parent "cannot exceed its own
[authority]" and that "a credential-carried ceiling bounds what it hands out."
Hop 2 says no value representing a parent's current authority exists. So the
table stated the intended design as if it shipped — the same error class we
filed against the companion doc. It now says what is true: the parent can name
and spawn any registered agent, cannot name an unregistered one or present
another user, and the bound is the registration rather than a runtime ceiling.

The proof slice used one agent and a denied write. A single-agent run never
requests a second definition, so the step that matters never executes and the
slice passes whether or not the spawn is guarded. Two agents now, one read-only
and one writing, and the criterion is that the read-only one cannot obtain the
other's authority.

And revocation was absent from the document entirely — zero mentions, in a
design whose instance tier exists for attribution. The ground truths had settled
on two credentials, a shared one plus a cheap per-call token naming the
individual, on the argument that you cannot revoke a label. This design collapsed
that to one credential plus a correlation header and never recorded why.

Written down now, with the argument stated rather than assumed: an instance is a
goroutine, cancelling it is the revocation, and a per-instance credential would
name something no external party can address, present or revoke — a credential in
form and a log field in effect. draft-ietf-wimse-arch section 2 requires a
workload to be independently addressable, which a goroutine is not. The reversal
trigger is named too: a subagent in its own process is addressable, and the
two-token shape becomes correct at that point.

Also recorded, from the consent review: revocation is bounded by TTL, not by the
revoking action. Removing a grant does not invalidate a token already issued.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): close call 1 with a uid boundary, not a protocol change

Call 1's ceiling is the pod's whole registration, and the doc left that as an
unresolved open question with three candidate answers. Two of the three are dead
and the third was never the point.

A startup-only root grant is not expressible in any registered mechanism, and
would not work anyway: boot code mints tokens for every agent name, and a
same-uid shell reads them out of process memory. Exhausting the grant hands the
shell the already-minted token instead of letting it ask. One pod per session
fails on storage rather than semantics — a mature authorization server's client
store degrades well before ten thousand clients, and create-then-delete-in-
seconds is not a supported access pattern.

What actually matters is reachability, and it splits in two. A shell FETCHING its
own SVID is closed by a SPIRE selector pinning issuance to the binary, which a
spawned shell fails. A shell READING the key out of the agent loop's memory is
closed only by a uid the loop does not have, because a subprocess sharing a uid
can ptrace its parent. That second half is why an earlier note about SO_PEERCRED
was wrong: peer credentials distinguish processes, not privilege, when the uid is
shared.

So the SVID moves to a token broker at its own uid, making all three calls on the
loop's behalf, with pid pinning on top and its agent-name policy in configuration
the loop cannot write. Recorded with what it is not: the broker attests nothing
and knows nothing about goroutines. It keeps one key out of one address space.

AgentCore reaches the same property with one agent per Runtime per execution
role. A uid boundary buys it without one pod per session.

The reachability claim is marked unverified, because whether a shell can reach
the SVID in our deployment depends on the selector and the inherited socket path,
and neither is checked in our code.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): make the agent a typed Cedar entity, not a context string

The example rule compared context.claim_act.sub against a string literal. That is
stringly typed end to end: a policy naming a nonexistent agent, or one whose
casing or SPIFFE path segments drift from what the token carries, matches nothing
and reports no error. Silent non-match, not a validation failure.

With the agent as the principal entity, Cedar's schema validator rejects that
when the policy is written. Entity grouping also becomes available, though the
doc does not use it — an entity DAG expresses membership, not an ordered lattice
of privilege, so "own group or below" is not something to force into it.

Same class as the claim_scope substring hazard already recorded, and the two are
now stated together.

Also recorded, and it is the load-bearing part: grantedScopes cannot be derived
by Cedar. containsAll does the comparison but the value has to be materialized
before the decision, and a stale or missing value means the rule permits. In this
design that value comes from the token on the request, so it cannot drift — which
is precisely why the narrowing lives at call 2 and not in policy. Policy consumes
an already-narrowed token; it never computes the bound.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): gate the credential read per agent, without copying it

The read was keyed on the user alone, so every agent acting for Alice reached
every integration she had connected. AWS keys its vault on the agent and the user
together and gets integration isolation from it.

Copying the credential per agent is the wrong way to reach that. A per-agent copy
of Alice's provider token still carries her whole grant, so duplication buys no
scope reduction while multiplying consent flows, rotation points and revocation
calls. One credential per user and provider with a read policy naming the agent
gets the same isolation and leaves one thing to rotate — and an audit log already
records which reader touched which secret, which is the forensic half of the same
property.

Also recorded: the store need only check the agent. Admission establishes the user
before the read happens, so the dual-principal decision stays where it already is
and the store answers one question. That matters because a store's policy language
may not be able to address a nested actor claim at all, and this design does not
need it to.

Two leftovers fixed in passing: the paragraph still said "leg 2" and "GitHub"
where the surrounding text now says call 3 and speaks of providers generally.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): provider narrowing is a capability axis, consent is a signature

Two later-phase entries stated more narrowly than the truth.

The provider row said this design narrows every token except the one reaching the
provider, and left it there as if nothing could be done. What is true is that
nothing can narrow a credential it did not mint, so a stored user OAuth token is
final — but some providers will issue a credential scoped to one resource and one
permission from a grant already held, and for those the store can derive per call
instead of handing over what it stored. That is a property of each provider and a
per-integration decision, not a step in the flow and not one provider's feature
promoted into a structural position.

The per-agent consent entry treated the un-defer condition as a record that does
not exist yet. The harder half is that no mechanism produces one for a scheduled
run: an absent user cannot consent, and the only available pattern is an
administrator deciding in advance that consent is not needed for a class of agent.
That substitutes organizational authorization for the user's. Recorded as a
decision someone signs rather than a gap to be engineered away.

Also finished the leg-to-call renaming these two paragraphs had missed.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): redraw the diagram — the broker was missing from it

Four prose commits changed the flow and none of them touched the picture, which
is the same failure as last time: edit the text, forget the drawing.

The worst of it was that the token broker was absent. It holds the only private
key in the system and makes all three token calls, so leaving it out did not
simplify the diagram, it deleted the mechanism that closes call 1. The loop now
asks the broker to mint and the broker talks to the authorization server, so the
uid boundary is visible as the thing standing between an injected model and the
pod's credential. The startup note moved with it, since fetching the SVID is the
broker's job and was attributed to the pod.

Three smaller drifts fixed at the same time. The leg naming was stale where the
prose says call 1, 2 and 3. The credential read said "keyed on Alice and that
target" without the per-agent gate. And the provider call named Alice's GitHub
token, which contradicts provider narrowing being a per-provider capability —
the participant is now "the provider" and the store returns the narrowest
credential that provider can issue.

Also shown, because it is the residual and hiding it would flatter the design:
the loop hands Alice's token to the broker for call 3. A shell in the loop has
that token too, which is why the floor is that it can do whatever Alice can.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): the pod is the workload, the broker is the key holder

The named invariant said "the pod is the workload and the key holder," which the
broker commit made false two commits earlier. Worse than stale: it asserted the
exact arrangement that leaves call 1's ceiling reachable, in the section the rest
of the document defers to by name.

Split into the two facts it was conflating. Nothing below the pod holds a key —
unchanged, and the reason is unchanged: siblings share a process. And the pod's
key is not in the agent loop, because a key in that address space is readable by
a shell the loop can spawn. Workload identity is the pod's; custody is the
broker's.

The second half is new to the invariant list and is what closes call 1, so it
belongs here rather than only in hop 3 where the argument lives.

Note for the reply to the companion doc: this is a key-custody rule and custody
is that doc's territory. It also answers its open question about a signing
sidecar, and it generalizes — the same argument applies to mecatl's own signing
key, not just to the SVID. The rule should be stated there and referenced here
rather than argued twice.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): we cited RFC 8693 section 2.1 for something it does not say

Hop 7 used §2.1's "one-time event... does not create a tight linkage between the
input and output tokens" to argue a backend cannot reconstruct the delegation
chain. That sentence is about lifecycle coupling between the two tokens, not
about what the output token carries — and §4.1 does put the act chain in the
output. The companion doc's author caught it. Same error class we have been
filing against his citations, so it is recorded as a replacement rather than
quietly swapped.

The conclusion holds on two better grounds. §4.1 requires a consumer to consider
only top-level claims and the party identified as the current actor, so a
conformant consumer evaluates one hop even though the chain is present — which
also bounds the gateway's policy layer, since it may not conformantly intersect a
nested act. And the backend never receives our token at all, only a provider
credential, so there is nothing there to walk regardless.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): link the outbound doc into the strawman index

docs/agent-identity-outbound.md had no inbound link, so matlatl's strict
check flagged it as unreachable/under-linked and failed CI. Cross-link it
from the strawman index next to agent-identity-model.md (part 1) and
regenerate llms.txt.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>
JAORMX added a commit that referenced this pull request Aug 4, 2026
* docs: agent identity model strawman — mecatl as its own SPIFFE trust domain

Design doc (pre-ADR strawman tier, like scoped-resource-grants.md):
three-tier identity (definition/instance/run) mapped onto AgentDef/
Session/Run, JWT-SVIDs with a private delegation vocabulary (dlg chain,
monotone scope attenuation, depth limits, txn correlation), KMS-backed
issuer HA per the converged industry pattern, projection-not-authority
semantics, the parkable HITL credential lifecycle (innovation ground),
and dual-ID audit over the existing EventLog.

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): name the RFC 8693 act/may_act contract explicitly

The delegation section now states the three normative commitments
(dlg IS act nesting; chain is audit never authority per the
informational-only rule; delegation never impersonation), explains that
may_act's consent-hook role is played by definition-tier policy, and
marks exactly where 8693 ends and the novel part begins (enforced
attenuation, in-process exchange).

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): tech-writer review fixes + dlg-vs-act sub-collision argument

Self-containedness pass from an independent review: define the Q1-Q5
verdict labels in the prior-art section, replace in-group shorthand
(gauntlet-#7, ADR List 3) with what it means, gloss ADR references and
the governance evaluator on first use, bound the SPIFFE path depth by
max_depth, tally the unanswered issuer-operator questions, and move the
parkable-lifecycle section next to the credential mechanics. Also adds
the load-bearing argument for dlg over act: JWT-SVID and RFC 8693 assign
sub incompatible meanings (holder's SPIFFE ID vs delegator), so the
chain rides a private claim with 8693-derived semantics.

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): motivation (why this matters, why SPIRE alone is not enough) + dlg revisit triggers

Adds the reader-facing case for the work: the trust-me semantics of a
multi-tenant delegation machine today (self-attested audit,
unattributable outbound calls, convention-only delegation narrowing,
unproven multi-tenancy) and what an identity layer changes. Explains why
SPIRE stays for infrastructure but cannot carry user/agent/subagent
delegation (workload-scoped identity, no on-behalf-of, no attenuation
semantics, wrong-shaped escape hatches). Records the five conditions
under which the dlg-vs-act decision flips, from the adversarial team
review.

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): final tech-writer polish pass

Readability (long sentences split, passive to active), engagement
(section claims lead; north-star claim stands alone), terminology locked
(governance evaluator, instance SVID, mint), em-dash density reduced,
section transitions connected, doubled hedges removed. Structure,
technical content, and honesty markers unchanged. Gates: matlatl strict
clean, docs/lint passes.

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): adversarial review amendments — trust-domain, delegation semantics, claims, lifecycle

Fold in the double-checked findings from the research sweep and the two
reviewers (jhrozek, jbeda), keeping only what survived primary-source
verification:

- Why-not-SPIRE rewritten around the attestation-unit argument (process vs
  goroutine), correcting the false 'no on-behalf-of' claim and the
  Delegated Identity API overstatement; portability, not capability.
- Delegation semantics restated in this token's own vocabulary instead of
  quoting RFC 8693 §4.1 verbatim (the sub inversion makes the verbatim
  rule semantically dangling); audit-vs-authority reconciled (prior actors
  audit, current actor = sub is an authority input).
- Claims: scope -> RFC 9396 authorization_details (adds resources axis for
  the workspace gap); dlg -> delegation_chain (cite liu drafts); URI-named
  private claims; txn noted as RFC 8417-registered; cnf+jkt for PoP.
- Namespace: kept flat child/<childSessionID> after the K3 security sweep
  showed family-segmentation was overreach; sanitize-and-reject def names
  (the one justified change).
- Lifecycle: JWT-SVID mint-per-request framing, Zhu convergence, live-
  caller authority + signed-chain integrity on resume, TTL-only as
  considered-and-rejected.
- Issuer: adopt KMS-signed per-pod intermediates (resolves the
  local-signing contradiction); drop the false Redis backstop; federation
  honesty (https_web/https_spiffe, bilateral).
- New sections: Build vs buy, What breaks today; phasing made
  unsigned-and-honest-first (A3); risks add JWT size budget, key-compromise
  recovery, def drift, deployment-scale optionality.

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): readability polish after the amendment round

K3 tech-writer pass: gloss first-use jargon (sessnap, HSET, ID-JAG, CB4A,
actor-profile, client_credentials), split overlong sentences in the new/
rewritten sections, reduce em-dash density, add a connective line to
Build vs buy. No technical changes; claim names, citations, and structure
preserved. Gates: matlatl strict clean, docs/lint passes.

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): fix two blemishes from the readability pass

Repair a mid-compound line break the sentence split left ('This state /
machine') and correct an overclaim the writer inherited ('resolved here
rather than deferred' -> 'named here rather than deferred' — the JWKS SLO
is named, not resolved). Manual sweep confirms no other broken wraps or
overlong prose lines; remaining long lines are table rows + the banner.

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): threat model, trust boundaries, and two end-to-end scenarios

Adds the capstone the reviewers asked for: an ASCII trust-boundary diagram
(user edge / state / downstream / trust-domain edge), a three-actor
adversary model (compromised subagent, compromised pod, leaked SVID) with
what the design does and does not defend, and two grounded end-to-end
flows using ToolHive vMCP as the testing ground — the XAA/ID-JAG cross-
domain path and the user-keyed credential-store path (loadUpstreamTokens
tsid -> GetAllUpstreamCredentials -> upstream_inject). Notes explicitly
that ToolHive is the example because it already ships the delegation
constructs, not the only option; the same shape applies to any downstream
(memory service, filesystem grants) that supports them.

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): ground the scenarios and threat model in reality

Verification pass (three agents, primary sources) caught real errors:

- Scenario A: GitHub's AS only supports authorization_code + device_code —
  no token-exchange, no ID-JAG (an Okta-authored enterprise-IdP-to-
  enterprise-app grant). Swapped the backend to an enterprise service
  federated with the org's IdP, and said explicitly why GitHub is not a
  valid XAA example. GitHub moves to Scenario B, where the plain 3LO
  credential-store path genuinely works.
- Scenario B: stopped overclaiming the tsid binding. ToolHive's read path
  keys on tsid alone and never re-checks inbound sub against stored UserID
  (ErrInvalidBinding declared, never returned), and under this design's own
  tier model the inbound sub is the acting instance, not the user. Reframed
  'the right user's credential' as a mecatl-side guarantee (bind tsid to
  Alice-rooted chains only) plus a ToolHive-side gap to file.
- Threat model: added the Phase-2 caveat to 'the issuer refuses to mint
  wider' (today it's catalog + audience fold, not crypto containment) and
  named five missing adversaries: main-agent prompt injection (P1),
  malicious tenant / tenant isolation (P2), edge mis-binding (P3),
  downstream credential-store compromise (P4), event-log replay/exfil (P5).

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): remove em-dashes from prose

161 em-dashes read as LLM-generated. Convert them to commas, periods,
colons, or parentheses throughout the prose, section by section with real
edits (no script). Kept only the one inside an ASCII diagram and any in
verbatim quotes. No technical changes.

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): apply the full-agreement fixes from the second review round

Consensus amendments after the adversarial verification of jhrozek's second
pass and PR #324, reframed by the fact that the team owns ToolHive/Cedar:

- Scenario intro: add the 'fixed vs ours to change' note. Current ToolHive
  behaviors (self-issued-only validation, tsid-keyed lookup, Cedar string
  glob) are a tracked work list (#5989/#5815/#6082), not constraints.
- Scenario A: name the trust-placement fork (two-leg AS-minted vs single-
  mint via multi-issuer validator) instead of pretending the mecatl-signed
  SVID crosses today; diagram keeps the two-leg shape with the fork stated.
- Scenario B: reframe the credential read as user-keyed (the primitive
  exists) with the ownership recheck, since tsid is dead for agents; this
  is an enhancement we own, not a protocol law.
- 'Attenuation enforceable by backend' -> verifiable by backend (RFC 8693
  4.1 carries the act chain) but credential scope enforced at the gateway.
  Cedar claim precised (glob on context.claim_act.sub, user as principal).
- Threat model: P3 circularity fixed (anchor to IdP assertion iss+id);
  added three threats (delegated-token-carrying-credential-ref, store-
  writer-no-signing, substituted trust bundle); P1 softened (posture_ceiling
  is an identity-carried lever); P5 digests-only anchoring; leaked-SVID is
  bearer-until-Phase-3.
- Signing key: honest NLP-reachability note (no OS isolation, envscrub
  irrelevant to in-memory signer); local-signing is audit/integrity not
  isolation; sidecar as later-phase option.
- Accuracy: three-tier convergence softened; single-audience 'strongly
  recommended' and required-at-projection (confused deputy); sigstore/
  go-spiffe noted as net-new deps; agent/<def> trust tier carried-not-
  enforced; 'distinct principal' scoped to internal tiers; txn vs outbound
  correlation as two join keys; minting-seam lifetime precedent is
  Deps.ChildAskReviewer not port.EventLog.

Co-Authored-By: mecatl <[email protected]>

* docs(agent-identity): part 2 — the outbound boundary (#324)

* docs(agent-identity): part 2 — the outbound boundary

The companion doc models identity from the user down to the subagent and stops
at the boundary. This covers the boundary: how the harness reaches a tool, what
the gateway decides, and how a user's stored third-party credential gets used
without handing an agent more than it was given.

Eight hops, with the three that carry real decisions worked out in detail. The
exchange runs in two legs: the pod authenticates with its SVID and receives an
agent token minted by vMCP's authorization server, then that token is the actor
input to an exchange that adds the user. Splitting it puts the server, rather
than mecatl, in charge of which agents may exist — a definition invented in a
pull request cannot be named because nothing registered it — and means mecatl
signs nothing, so no trust bundle crosses the boundary.

The gate decides once over a resolved target, and the credential is read only
after it allows, keyed on the user rather than on a login session. That last
part is forced rather than chosen: an agent can never carry a tsid, so the
lookup both current scenarios rely on cannot run for one at all.

Status notes are inline, marked, and verified against code. They are cost
signals, not constraints. Two review rounds found false claims in them and both
times the claim sounded like plumbing and turned out to be a prerequisite, which
is why they stay in the text rather than moving to an implementation doc.

Deferred items each carry the condition that would un-defer them: resource-level
authority, and per-agent credential isolation. The second is where AWS and Azure
both are, and the honest summary of where this design stops is that it narrows
every token except the one that reaches the provider.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): rank hop 3's argument by what actually carries it

The review of #321 came back asking whether two legs is design merit or a
workaround for what vMCP happens to reject today. Stress-testing our own
reasoning showed the ranking was wrong, and the wrong ranking is what made the
question reasonable to ask.

The doc led with "the authorization server decides which agents may exist" and
filed "mecatl signs nothing" below it as a deployment convenience. But the first
one has a hole: if the worry is only that repo-written definitions could take
operator names, mecatl could refuse to name untrusted-tier definitions itself,
with no registration anywhere. Cheaper, and it closes the same hole on paper.

What kills that, and what actually carries two legs, is that any such rule runs
inside the process being injected. Under single-mint mecatl holds a key whose
signature IS the authority claim, and the Bash tool shares its address space. An
injected model signs an assertion naming any agent, so every rule keyed on
act.sub is bypassable. That is the actor claim collapsing, not key hygiene.

So signing nothing is the security property and who-decides is its consequence.
Reordered to say that, with the honest cost stated: only registered definitions
are nameable, so a per-project specialist runs under one rather than as one.

Also states what would change our mind, which the doc did not. Two legs assumes
the signing key stays reachable from the agent loop. A signing sidecar removes
that assumption, and then mecatl-signed identity with the trust tier in the
identifier becomes viable and buys back specialists as nameable principals. For
the outbound hop the two are substitutes, not complements. Now an open question.

And the Today block no longer reads as the motive. It said what ToolHive rejects
before saying why the design is shaped this way, which invited exactly the
reading the review gave it.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): record the flow as three calls, and correct two claims

Two errors surfaced while illustrating the flow end to end.

The two legs had silently become one exchange per hop. That happened when the
subset-attenuation fix landed: making a child derive from its parent looked like
it replaced the agent-token tier, so I collapsed them. It did not need to. The
narrowing is a THIRD call between the two existing legs, and collapsing cost the
AS-audienced intermediate token — a credential that only works as input to
another token request is worthless to steal, and both AgentCore and Entra keep
that property. Restored: call 1 names the root agent, call 2 narrows per spawn
against the parent's token, call 3 adds the user.

And "the subagent cannot make a call itself" is false. It is catalog-scoped, not
structural: readOnlyExplorerCatalog has no MCP tool so the parent proxies, while
noFSChildCatalog registers the global MCP tools and the child calls the gateway
directly. Either way the token presented names the child in act, so the
narrowing is what gets enforced. Hop 4 now says which component calls and why,
and notes the default child still has a shell.

Also recorded, all of it from the specialist round:

Three scope namespaces, separated. cap:github.read is ours, not GitHub's, and
Alice's IdP token carries no cap:* scope unless the AS is registered at the IdP
with our vocabulary — so by default her token bounds identity, not capability,
and the ceiling is the client registration alone. That is weaker than the doc
previously implied.

The client id is the workload, spiffe://…/ns/prod/sa/mecatl, not a pod instance.
A per-pod registration would be unmaintainable, and the consequence is that
replicas share one ceiling.

One client authentication method. JWT-SVID assertion is the draft's fallback for
deployments that cannot terminate mTLS at the authorization server, and we
terminate it on the gateway call already.

Call 1 is now named as the remaining hole, with AgentCore's refusal of the
analogous path quoted, and the note that BaselineClientScopes being one list for
every client makes call 1's refusal never fire — a precondition, not a
refinement.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): fix the two overclaims, and write down revocation

Three fixes from an audit against the settled ground truths in
.scratch/binding-first-principles.md. Six of the eight held; these are the rest.

The adversary table said a prompt-injected parent "cannot exceed its own
[authority]" and that "a credential-carried ceiling bounds what it hands out."
Hop 2 says no value representing a parent's current authority exists. So the
table stated the intended design as if it shipped — the same error class we
filed against the companion doc. It now says what is true: the parent can name
and spawn any registered agent, cannot name an unregistered one or present
another user, and the bound is the registration rather than a runtime ceiling.

The proof slice used one agent and a denied write. A single-agent run never
requests a second definition, so the step that matters never executes and the
slice passes whether or not the spawn is guarded. Two agents now, one read-only
and one writing, and the criterion is that the read-only one cannot obtain the
other's authority.

And revocation was absent from the document entirely — zero mentions, in a
design whose instance tier exists for attribution. The ground truths had settled
on two credentials, a shared one plus a cheap per-call token naming the
individual, on the argument that you cannot revoke a label. This design collapsed
that to one credential plus a correlation header and never recorded why.

Written down now, with the argument stated rather than assumed: an instance is a
goroutine, cancelling it is the revocation, and a per-instance credential would
name something no external party can address, present or revoke — a credential in
form and a log field in effect. draft-ietf-wimse-arch section 2 requires a
workload to be independently addressable, which a goroutine is not. The reversal
trigger is named too: a subagent in its own process is addressable, and the
two-token shape becomes correct at that point.

Also recorded, from the consent review: revocation is bounded by TTL, not by the
revoking action. Removing a grant does not invalidate a token already issued.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): close call 1 with a uid boundary, not a protocol change

Call 1's ceiling is the pod's whole registration, and the doc left that as an
unresolved open question with three candidate answers. Two of the three are dead
and the third was never the point.

A startup-only root grant is not expressible in any registered mechanism, and
would not work anyway: boot code mints tokens for every agent name, and a
same-uid shell reads them out of process memory. Exhausting the grant hands the
shell the already-minted token instead of letting it ask. One pod per session
fails on storage rather than semantics — a mature authorization server's client
store degrades well before ten thousand clients, and create-then-delete-in-
seconds is not a supported access pattern.

What actually matters is reachability, and it splits in two. A shell FETCHING its
own SVID is closed by a SPIRE selector pinning issuance to the binary, which a
spawned shell fails. A shell READING the key out of the agent loop's memory is
closed only by a uid the loop does not have, because a subprocess sharing a uid
can ptrace its parent. That second half is why an earlier note about SO_PEERCRED
was wrong: peer credentials distinguish processes, not privilege, when the uid is
shared.

So the SVID moves to a token broker at its own uid, making all three calls on the
loop's behalf, with pid pinning on top and its agent-name policy in configuration
the loop cannot write. Recorded with what it is not: the broker attests nothing
and knows nothing about goroutines. It keeps one key out of one address space.

AgentCore reaches the same property with one agent per Runtime per execution
role. A uid boundary buys it without one pod per session.

The reachability claim is marked unverified, because whether a shell can reach
the SVID in our deployment depends on the selector and the inherited socket path,
and neither is checked in our code.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): make the agent a typed Cedar entity, not a context string

The example rule compared context.claim_act.sub against a string literal. That is
stringly typed end to end: a policy naming a nonexistent agent, or one whose
casing or SPIFFE path segments drift from what the token carries, matches nothing
and reports no error. Silent non-match, not a validation failure.

With the agent as the principal entity, Cedar's schema validator rejects that
when the policy is written. Entity grouping also becomes available, though the
doc does not use it — an entity DAG expresses membership, not an ordered lattice
of privilege, so "own group or below" is not something to force into it.

Same class as the claim_scope substring hazard already recorded, and the two are
now stated together.

Also recorded, and it is the load-bearing part: grantedScopes cannot be derived
by Cedar. containsAll does the comparison but the value has to be materialized
before the decision, and a stale or missing value means the rule permits. In this
design that value comes from the token on the request, so it cannot drift — which
is precisely why the narrowing lives at call 2 and not in policy. Policy consumes
an already-narrowed token; it never computes the bound.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): gate the credential read per agent, without copying it

The read was keyed on the user alone, so every agent acting for Alice reached
every integration she had connected. AWS keys its vault on the agent and the user
together and gets integration isolation from it.

Copying the credential per agent is the wrong way to reach that. A per-agent copy
of Alice's provider token still carries her whole grant, so duplication buys no
scope reduction while multiplying consent flows, rotation points and revocation
calls. One credential per user and provider with a read policy naming the agent
gets the same isolation and leaves one thing to rotate — and an audit log already
records which reader touched which secret, which is the forensic half of the same
property.

Also recorded: the store need only check the agent. Admission establishes the user
before the read happens, so the dual-principal decision stays where it already is
and the store answers one question. That matters because a store's policy language
may not be able to address a nested actor claim at all, and this design does not
need it to.

Two leftovers fixed in passing: the paragraph still said "leg 2" and "GitHub"
where the surrounding text now says call 3 and speaks of providers generally.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): provider narrowing is a capability axis, consent is a signature

Two later-phase entries stated more narrowly than the truth.

The provider row said this design narrows every token except the one reaching the
provider, and left it there as if nothing could be done. What is true is that
nothing can narrow a credential it did not mint, so a stored user OAuth token is
final — but some providers will issue a credential scoped to one resource and one
permission from a grant already held, and for those the store can derive per call
instead of handing over what it stored. That is a property of each provider and a
per-integration decision, not a step in the flow and not one provider's feature
promoted into a structural position.

The per-agent consent entry treated the un-defer condition as a record that does
not exist yet. The harder half is that no mechanism produces one for a scheduled
run: an absent user cannot consent, and the only available pattern is an
administrator deciding in advance that consent is not needed for a class of agent.
That substitutes organizational authorization for the user's. Recorded as a
decision someone signs rather than a gap to be engineered away.

Also finished the leg-to-call renaming these two paragraphs had missed.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): redraw the diagram — the broker was missing from it

Four prose commits changed the flow and none of them touched the picture, which
is the same failure as last time: edit the text, forget the drawing.

The worst of it was that the token broker was absent. It holds the only private
key in the system and makes all three token calls, so leaving it out did not
simplify the diagram, it deleted the mechanism that closes call 1. The loop now
asks the broker to mint and the broker talks to the authorization server, so the
uid boundary is visible as the thing standing between an injected model and the
pod's credential. The startup note moved with it, since fetching the SVID is the
broker's job and was attributed to the pod.

Three smaller drifts fixed at the same time. The leg naming was stale where the
prose says call 1, 2 and 3. The credential read said "keyed on Alice and that
target" without the per-agent gate. And the provider call named Alice's GitHub
token, which contradicts provider narrowing being a per-provider capability —
the participant is now "the provider" and the store returns the narrowest
credential that provider can issue.

Also shown, because it is the residual and hiding it would flatter the design:
the loop hands Alice's token to the broker for call 3. A shell in the loop has
that token too, which is why the floor is that it can do whatever Alice can.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): the pod is the workload, the broker is the key holder

The named invariant said "the pod is the workload and the key holder," which the
broker commit made false two commits earlier. Worse than stale: it asserted the
exact arrangement that leaves call 1's ceiling reachable, in the section the rest
of the document defers to by name.

Split into the two facts it was conflating. Nothing below the pod holds a key —
unchanged, and the reason is unchanged: siblings share a process. And the pod's
key is not in the agent loop, because a key in that address space is readable by
a shell the loop can spawn. Workload identity is the pod's; custody is the
broker's.

The second half is new to the invariant list and is what closes call 1, so it
belongs here rather than only in hop 3 where the argument lives.

Note for the reply to the companion doc: this is a key-custody rule and custody
is that doc's territory. It also answers its open question about a signing
sidecar, and it generalizes — the same argument applies to mecatl's own signing
key, not just to the SVID. The rule should be stated there and referenced here
rather than argued twice.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): we cited RFC 8693 section 2.1 for something it does not say

Hop 7 used §2.1's "one-time event... does not create a tight linkage between the
input and output tokens" to argue a backend cannot reconstruct the delegation
chain. That sentence is about lifecycle coupling between the two tokens, not
about what the output token carries — and §4.1 does put the act chain in the
output. The companion doc's author caught it. Same error class we have been
filing against his citations, so it is recorded as a replacement rather than
quietly swapped.

The conclusion holds on two better grounds. §4.1 requires a consumer to consider
only top-level claims and the party identified as the current actor, so a
conformant consumer evaluates one hop even though the chain is present — which
also bounds the gateway's policy layer, since it may not conformantly intersect a
nested act. And the backend never receives our token at all, only a provider
credential, so there is nothing there to walk regardless.

Co-Authored-By: Claude Opus 5 <[email protected]>

* docs(agent-identity): link the outbound doc into the strawman index

docs/agent-identity-outbound.md had no inbound link, so matlatl's strict
check flagged it as unreachable/under-linked and failed CI. Cross-link it
from the strawman index next to agent-identity-model.md (part 1) and
regenerate llms.txt.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>

* chore: regenerate llms.txt after rebase onto main

---------

Co-authored-by: mecatl <[email protected]>
Co-authored-by: Jakub Hrozek <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
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