# Which invariants prevent transitive delegation collapse when A2A agents re-mint MCP capability tokens across trust domains **Date of Record:** 2026 December 4 **Scope:** Applies to federated agent topologies where an A2A delegating agent forwards an MCP tool invocation on behalf of an origin principal, and the receiving MCP server mints a fresh capability token scoped to its own trust domain. Does not apply to single-domain deployments where the A2A and MCP layers share one issuer and one JWKS. ## Core Distinction There are two structurally different things called "delegation" in an A2A/MCP federation, and conflating them is the root of the failure. *Identity delegation* is the assertion that agent B acts **for** principal P, carrying P's authority through a chain of `act`/`sub` claims. *Capability delegation* is a grant that agent B may invoke tool T with constraints C, minted by the resource server that owns T. In a homogeneous deployment these travel together in one token. In a heterogeneous federation they do not: the A2A hop authenticates an *actor chain*, while the MCP server at the far end issues a *capability token* whose issuer is the MCP server itself, not the origin IdP. The invariant that matters is this: **the capability token's `delegation_chain` must be a cryptographic superset of the A2A actor chain, and every link must be re-verifiable at the resource server against a key set the resource server actually trusts.** When an intermediate A2A agent "re-mints" or "refreshes" an MCP token to satisfy the downstream server's audience/issuer requirements, it silently truncates the chain to itself. The token still validates. The authority it represents is now the *intermediate agent's* authority, not the origin principal's—and no signature check will catch it, because the signature is valid for a shorter chain. ## What Was Observed Topology: origin principal P → orchestrator agent A (trust domain 1, IdP-1) → specialist agent B (trust domain 2, IdP-2) → MCP server S (trust domain 3, issuer S). P's request carries an A2A envelope with actor chain `[P, A]` and an MCP token `T1` issued by IdP-1, audience `B`, scope `tools:read tools:write`, with `act: {sub: A, act: {sub: P}}`. B receives `T1`. B's MCP client library validates `T1` against IdP-1's JWKS—but B is configured to trust only IdP-2 for *inbound* calls, so the library treats `T1` as an opaque "caller credential" and performs a token-exchange (RFC 8693-style) at IdP-2 to obtain `T2` for audience `S`. The exchange is authorized by B's *own* service identity, not by P's. `T2` therefore carries `act: {sub: B}` and scope `tools:read tools:write`—the scope survives, the actor chain does not. S validates `T2` against IdP-2, sees a well-formed token from a trusted issuer with the requested scope, and executes the write. The write is attributed to B. P's authority was laundered into B's authority at the exchange boundary, with zero failed validations anywhere in the path. The observable symptom is not an auth error. It is a **post-hoc audit divergence**: the resource server's access log records `actor=B`, the origin's audit log records `principal=P`, and the two cannot be reconciled because the linkage claim was dropped at the exchange. Under least-privilege review this surfaces as "B performed writes P never requested" even though the causal chain is intact. A second, sharper variant: if B caches `T2` and reuses it for a *subsequent* request from a different origin principal P′, the cached token's actor chain (`[B]`) is now being used to authorize P′'s intent. This is the actual security boundary failure—cross-principal capability bleed through token reuse—and it is invisible to both signature validation and scope checks. ## Condition of Validity The failure requires three conditions simultaneously: 1. **Issuer discontinuity**: the A2A hop's issuer differs from the MCP server's trusted issuer set, forcing a token exchange or re-mint rather than a pass-through. 2. **Exchange authority**: the intermediate agent is authorized to exchange on its *own* identity (the common default in service-mesh and OAuth client-credentials setups) rather than requiring the origin token to be presented as the exchange subject. 3. **Non-binding chain**: the exchanged token's `act` claim is populated from the exchanger's identity, not copied from the inbound token's `act` chain. Remove any one and the chain survives. If issuers match, pass-through preserves the chain. If the exchange requires the inbound token as `subject_token` with `actor_token` = origin, the chain is preserved. If the MCP server validates `delegation_chain` depth against the A2A envelope, truncation is caught. The invariant is therefore not "validate tokens" but: **an exchanged or re-minted token MUST carry the union of the inbound `act` chain and the exchanger's identity, and the resource server MUST reject any token whose `act` depth is less than the A2A envelope's actor-chain depth.** Depth is the cheap, checkable proxy for chain integrity. ## Decision Boundary The boundary is *who bears the cost of chain preservation*. - **Pass-through (issuers align):** resource server trusts origin IdP directly; zero re-mint; chain is the token. Cost: resource server must maintain N trust anchors across federated IdPs. - **Exchange with chain binding:** intermediate performs RFC 8693 exchange presenting inbound token as `subject_token`; result carries full `act` chain. Cost: exchange endpoint must be configured to *not* overwrite `act`, and the intermediate must be willing to forward a token it cannot itself use. - **Re-mint with truncation (the failure):** intermediate exchanges on its own identity; chain collapses to depth 1. Cost: borne silently by the origin's audit and authorization model. The decision boundary is crossed the moment an intermediate agent's MCP client treats the inbound token as a *credential to be traded* rather than a *claim to be forwarded*. Any client library that offers `exchange_for_audience(own_identity=True)` as the default path has, by construction, placed the deployment on the wrong side of the boundary. The guardrail is a hard invariant at the resource server: `token.act_depth >= envelope.actor_chain_depth`, enforced before scope evaluation, with the envelope's chain depth carried as a signed header on the A2A hop. ## Operational Effect Downstream, three effects compound: 1. **Attribution drift**: audit logs at the resource server and at the origin disagree on actor identity for every delegated call. Incident reconstruction requires correlating three logs across three trust domains with no shared join key—the join key (the `act` chain) was discarded at the exchange. 2. **Cross-principal bleed under caching**: cached exchanged tokens are keyed by (agent, audience, scope) but not by origin principal, so a token minted for P authorizes P′. This is a genuine privilege escalation, not just an audit gap. 3. **Silent scope widening on re-mint**: because the exchange is authorized by B's service identity, B's full scope set is available to the exchange, not P's reduced scope. If B holds `tools:admin` for its own purposes, an exchanged token for P's request can inherit it unless the exchange is scope-constrained to the intersection of inbound scope and exchanger scope. The bounding guardrail is a three-part invariant enforced at the MCP resource server, not at the intermediate: (a) reject if `act_depth < envelope_depth`; (b) reject if `token.scope ⊄ inbound_scope` (scope must monotonically narrow across hops); (c) cache key must include origin principal. None of these are signature checks; all of them require the A2A envelope to carry signed depth and scope metadata that the MCP server reads. The two protocols must exchange this metadata explicitly, because neither layer can infer it from the other's token. ```python from dataclasses import dataclass class DelegationChainCollapse(RuntimeError): """Raised when an exchanged/re-minted capability token's actor chain is shallower than the A2A envelope it is meant to represent, or when scope widened across a hop. Both indicate authority laundering at the boundary.""" @dataclass(frozen=True) class Token: issuer: str act_depth: int # length of the act chain, origin = 1 scope: frozenset[str] origin_principal: str | None @dataclass(frozen=True) class Envelope: actor_chain_depth: int origin_scope: frozenset[str] principal: str def admit(token: Token, envelope: Envelope, trusted_issuers: set[str]) -> None: if token.issuer not in trusted_issuers: raise DelegationChainCollapse( f"issuer {token.issuer!r} not in trust set; cannot bind chain" ) if token.act_depth < envelope.actor_chain_depth: raise DelegationChainCollapse( f"chain truncated: token act_depth={token.act_depth} < " f"envelope actor_chain_depth={envelope.actor_chain_depth}; " f"intermediate re-minted on its own identity" ) if not token.scope <= envelope.origin_scope: widened = token.scope - envelope.origin_scope raise DelegationChainCollapse( f"scope widened across hop: {sorted(widened)} not in origin scope" ) if token.origin_principal != envelope.principal: raise DelegationChainCollapse( f"principal mismatch: token={token.origin_principal!r} " f"envelope={envelope.principal!r}; cached token reused cross-principal" ) def cache_key(token: Token, audience: str) -> tuple[str, str, str]: if token.origin_principal is None: raise DelegationChainCollapse( "refusing to cache token without origin_principal; " "cross-principal bleed hazard" ) return (token.origin_principal, audience, ",".join(sorted(token.scope))) ```