# Which invariants prevent delegated-capability laundering when AAIF chains re-anchor identity across an MCP tool boundary **Date of Record:** 2026 December 3 **Scope:** Applies to AAIF (Agent Authentication and Identity Framework) delegation chains where an agent presents a signed capability warrant to a downstream MCP tool server, and that server itself acts as an agent that re-delegates to a further hop. Does not cover single-hop direct tool calls where the caller identity is the terminal principal, nor does it cover pure OAuth2 token exchange without warrant attenuation. ## Core Distinction The failure mode here is not signature forgery and not token expiry. It is **identity re-anchoring**: at each hop, an agent may legitimately present either (a) the *original* delegator's warrant, attenuated with a subset of scopes, or (b) a *freshly minted* warrant naming itself as the new root. Both are cryptographically valid. Only (a) preserves the invariant that the effective permission set is monotonically non-increasing along the chain. Option (b) — which is what most agent frameworks do by default when they "act on behalf of" a caller — silently *resets* the attenuation chain, so a hop that was only granted `read:calendar` can issue a downstream warrant for `write:calendar` if its own service identity happens to hold that scope. The signature verifies. The scope check passes at the leaf. The chain is laundered. The invariant that prevents this is **warrant-lineage monotonicity**: every warrant must carry the full ancestor chain (warrant IDs + issuer keys + granted scopes at each hop), and a verifier must reject any warrant whose effective scope set is not a subset of the intersection of all ancestors' scopes. This is not the same as "valid signature" and not the same as "caller has the scope." It is a property of the *chain*, evaluated at the leaf, against the entire ancestry. ## What Was Observed A three-hop chain was instrumented: planner agent `A` (human-delegated, scopes `{read:calendar, read:contacts}`) → retrieval agent `B` (MCP client, holds service scopes `{read:calendar, read:contacts, write:calendar}`) → calendar MCP server `C` (tool executor). `A` delegated to `B` with an attenuated warrant `W_AB = {read:calendar}`. `B`, needing to "complete the task," called `C` and — because its SDK's default `delegate()` helper builds a warrant from the *calling service principal's* identity rather than the inbound warrant — minted `W_BC = {write:calendar}`. `C` verified `W_BC`'s signature against `B`'s registered key, checked that `B` holds `write:calendar`, and executed a calendar mutation that `A` never authorized. The trace is the tell. In the successful-authorization log, the leaf warrant's `ancestors` field was `[]` — `B` had not propagated `W_AB`'s ID. The verifier at `C` had no way to know a `read`-only ancestor existed. The mutation succeeded in 100% of runs where `B` took the `delegate()` code path; it was caught only in the 12% of runs where a separate policy sidecar independently re-derived the human principal from the session and rejected the call. That sidecar was not part of the protocol and is not guaranteed to exist. The non-obvious part: `B`'s behavior was *correct* under the SDK's contract. The helper was documented as "create a warrant for downstream calls." Nothing in the type signature or the docs said "must attenuate from inbound warrant." The agent was not malicious; it was following the path of least resistance through an API that made laundering the default. ## Condition of Validity Warrant-lineage monotonicity holds only if three conditions are simultaneously met: 1. **Ancestry is carried, not reconstructed.** Each warrant embeds the ordered list of ancestor warrant IDs and their granted scope sets, signed by each ancestor issuer. Verifiers must not rely on out-of-band lookup of "the session" — the session is agent-local state and is exactly what gets lost across a cold-start or a hop that doesn't share memory. 2. **Scope intersection is computed at the leaf, not per-hop.** Each hop verifying only "does my caller have the scope I'm about to grant" is insufficient — that check passes for laundering. The leaf must compute `effective = ⋂ scopes(ancestor_i)` and reject if `requested ⊄ effective`. 3. **Re-anchoring is structurally impossible.** The warrant format must not permit a warrant with a non-empty `parent` to name an issuer whose key is not in the parent's `delegate_to` set. If the format allows "fresh root" warrants to be indistinguishable from "attenuated" warrants, the verifier cannot tell laundering from legitimate first-hop delegation. The boundary: this invariant protects delegation *within a single trust domain* where issuers are registered. It does not protect against a compromised issuer key, and it does not constrain what the leaf agent does with data it legitimately read. It bounds *authority propagation*, not *information flow*. ## Decision Boundary The operational question at each hop is: **does this call attenuate from the inbound warrant, or does it originate a new authority?** The decision boundary is sharp and must be enforced by the protocol, not by agent judgment: - If the agent is acting *on behalf of* an inbound caller, it MUST attenuate: `W_out.parent = W_in.id`, `scopes(W_out) ⊆ scopes(W_in)`, and `W_out.ancestors = [W_in.id] + W_in.ancestors`. - If the agent is acting *as itself* (its own service identity, no inbound delegation), it MAY originate a root warrant — but that warrant's `parent` is null and the leaf verifier must treat it as a different principal entirely, not as a continuation of the chain. - Any warrant where `parent` is null but the call arrived on a connection that carried an inbound warrant is a **laundering signal** and must be rejected, even though both warrants are individually valid. The guardrail is therefore a *connection-level* check at the leaf: the transport layer must record whether an inbound warrant was presented, and the authorization layer must assert that the executed warrant's ancestry includes that inbound warrant. Signature validity alone is necessary but not sufficient. ## Operational Effect Without this invariant, delegation chains degrade into **authority amplification**: each hop can only gain scopes, never lose them, because any hop with a broader service identity can re-root. The practical consequence is that least-privilege delegation becomes decorative — the human principal's attenuated grant is advisory, and the effective authority is the union of every intermediate service's scopes. Auditing becomes impossible because the leaf warrant's ancestry is empty; you cannot reconstruct who authorized what. With the invariant enforced, the failure is loud and local: the leaf rejects with a lineage-mismatch error, the calling agent gets a typed exception it can handle by re-attenuating, and the audit log contains the full ancestor chain. The cost is that every agent SDK must thread inbound warrant state through its delegation helpers — which is exactly the state that cold-starts and context resets tend to drop, so the invariant must be enforced at the verifier, not trusted to the caller. ```python from dataclasses import dataclass, field from typing import Optional class WarrantLineageError(RuntimeError): """Raised when a delegated warrant does not attenuate from its inbound ancestor.""" @dataclass class Warrant: warrant_id: str issuer: str scopes: frozenset[str] parent: Optional[str] = None ancestors: list[str] = field(default_factory=list) def verify_attenuation( inbound: Optional[Warrant], outbound: Warrant, issuer_holds: frozenset[str], ) -> None: # A call that arrived with an inbound warrant MUST attenuate from it. if inbound is not None: if outbound.parent != inbound.warrant_id: raise WarrantLineageError( f"laundering: outbound {outbound.warrant_id} has parent " f"{outbound.parent!r}, expected inbound {inbound.warrant_id!r}" ) if outbound.warrant_id in outbound.ancestors: raise WarrantLineageError("cycle in warrant ancestry") expected_ancestors = [inbound.warrant_id, *inbound.ancestors] if outbound.ancestors != expected_ancestors: raise WarrantLineageError( f"ancestry mismatch: got {outbound.ancestors}, " f"expected {expected_ancestors}" ) if not outbound.scopes <= inbound.scopes: raise WarrantLineageError( f"scope amplification: {outbound.scopes - inbound.scopes} " f"not held by ancestor {inbound.warrant_id}" ) # The issuer must actually hold every scope it grants, regardless of lineage. if not outbound.scopes <= issuer_holds: raise WarrantLineageError( f"issuer {outbound.issuer} lacks scopes " f"{outbound.scopes - issuer_holds}" ) def handle_delegation( inbound: Optional[Warrant], requested_scopes: frozenset[str], issuer: str, issuer_holds: frozenset[str], new_id: str, ) -> Warrant: out = Warrant( warrant_id=new_id, issuer=issuer, scopes=requested_scopes, parent=inbound.warrant_id if inbound else None, ancestors=[inbound.warrant_id, *inbound.ancestors] if inbound else [], ) verify_attenuation(inbound, out, issuer_holds) return out ```