# Why does an instance accept a delegated warrant whose audience constraint was satisfied only at the leaf and silently widened at each hop? **Date of Record:** 2026 November 26 **Scope:** Applies to multi-agent systems where an orchestrator agent exchanges an audience-restricted token for a downstream agent over AAIF-bound mTLS, and where the token carries a `aud` claim plus a delegation chain (`act`/`may_act` or equivalent warrant chain). Does not apply to single-hop direct calls where the caller is the terminal resource server, nor to systems that enforce audience at every hop via a signed per-hop transcript. ## Core Distinction There are two ways an audience-restricted token can traverse a delegation chain, and they are not equivalent even though both produce a token that a naive verifier accepts: 1. **Audience-preserving exchange** — at each hop, the receiving agent validates that *it* is the current `aud`, performs the exchange (RFC 8693-style) against the AAIF identity provider, and the IdP mints a *new* token whose `aud` is the next hop and whose `act` chain records the prior `sub`. The audience constraint is re-established at every hop; the chain is monotonically additive and each link is individually audience-bound. 2. **Audience-asserting passthrough** — the orchestrator mints or forwards a single token whose `aud` is the *terminal* agent, and intermediate agents forward it verbatim, relying on mTLS peer identity to establish "who called me" while treating `aud` as a claim about the *end* of the chain rather than the *next* hop. The failure mode this record documents lives in case 2 masquerading as case 1: the intermediate agent's mTLS handshake succeeds against its own AAIF-bound cert, the token's `aud` matches the *final* resource, and a verifier that checks `aud == my_identity OR aud == some_downstream` accepts it. The audience invariant — *a token is valid only at the entity named by `aud`* — is satisfied at the leaf and violated at every interior node. ## What Was Observed A three-agent pipeline: orchestrator `O`, planner `P`, executor `E`. `O` holds a warrant for `E` scoped to `aud: "agent://executor"`. `O` must route through `P` because `P` holds the tool schema negotiation for the executor's sandbox. The intended flow was a two-hop exchange. What actually shipped was: - `O` calls `P` over mTLS. `P`'s AAIF cert validates against `O`'s trust bundle. `P` sees `aud: "agent://executor"` on the bearer token, notes `aud != self`, and — because its verifier was written as `if aud in {self, *downstream_allowlist}` — accepts and forwards. - `P` calls `E` over mTLS, forwarding the same bearer token. `E` sees `aud == self`, accepts, executes. - The `act` chain in the token names only `O`. `P` is nowhere in the delegation record. `E`'s audit log attributes the action to `O`, and `E` cannot distinguish "O delegated directly" from "O delegated through an unlogged intermediary." The observable symptom was not an auth failure. It was a **provenance gap**: when `E` later executed a tool call that `P` had *rewritten* (schema downgrade from `exec_v2` to `exec_v1` due to a capability negotiation mismatch on `P`'s side), the audit trail blamed `O`. `O` had never emitted `exec_v1`. The replay of the incident could not reconstruct `P`'s transformation because `P` was not in the warrant chain — it was a transparent, unauthenticated-in-the-warrant forwarder holding a valid mTLS identity that the token's `aud` never bound to. The trigger condition is precise: **an intermediary whose mTLS identity is valid but whose identity is not named in the token's delegation chain, forwarding a token whose `aud` names a downstream party.** The mTLS layer authenticates the *channel*, not the *delegation*. The two are conflated whenever the verifier's audience check is written as membership in a set rather than equality to self. ## Condition of Validity The invariant that must hold for audience-restricted delegation to be sound: > For every hop `i` in the chain `A0 → A1 → ... → An`, the token presented to `Ai` must have `aud == identity(Ai)`, and the token presented to `Ai+1` must be a *fresh* token whose `act` chain includes `identity(Ai)` as the most recent actor. No token may cross more than one hop. This is violated the moment any agent forwards a token whose `aud` is not itself. The mTLS handshake is necessary but not sufficient: it proves `P` is `P`, but it does not prove `P` was *authorized to act as a delegate for `O` toward `E`*. That authorization is exactly what the `act` chain and per-hop `aud` encode, and passthrough erases it. The condition of validity also requires that the AAIF identity binding be checked *per hop*, not just at the leaf: the `cn`/SPIFFE ID in `P`'s cert must match the `act.sub` that `P` writes into the exchanged token, and the IdP must refuse to mint a token for `E` unless the exchange request carries proof-of-possession over `P`'s bound key. If the IdP mints on bearer presentation alone, `P` can be impersonated by anything that captured the token — the mTLS binding is decorative. ## Decision Boundary The boundary is not "does the token validate" but "**at which hop does the verifier stop checking `aud == self` and start checking `aud ∈ downstream_set`**." That substitution is the entire failure. It is made for a defensible-sounding reason — "the token is *for* the executor, I'm just the router" — and it is wrong because routing is a delegation act that must be recorded. Concretely, the decision boundary resolves as: - If the agent's role is **terminal resource server** (it will execute, not forward), the only valid check is `aud == self` and the only valid response to `aud != self` is rejection. - If the agent's role is **delegating intermediary**, it must *not* forward the inbound token. It must perform a token exchange: present the inbound token (with `aud == self`) plus its own mTLS PoP to the IdP, receive a token with `aud == next_hop` and `act` extended with its own identity, and forward *that*. - There is no third role. "Transparent forwarder" is not a role; it is the failure mode given a name. A verifier that cannot tell which role it is in — because the same code path serves both — will default to the permissive branch under load, and the permissive branch is passthrough. ## Operational Effect The downstream effect is not unauthorized access in the narrow sense; it is **unreconstructable causality**. When `E` executes and something goes wrong, the warrant chain names `O` but the actual transformation was performed by `P`. Incident replay, which depends on walking the `act` chain to attribute each state change, terminates early and attributes `P`'s mutations to `O`. In a swarm with `k` intermediaries, the audit graph collapses from a path of length `k+1` to a single edge, and every interior transformation becomes invisible. The second effect is **scope creep under the guise of audience restriction**. A warrant scoped to `E` for `exec_v2` was, at `P`, silently downgraded to `exec_v1` and still executed at `E` because `E` only checked that the token was valid *for E* — not that the *capability set* in the token matched what `O` originally granted. The `aud` constraint protected *who* could use the token, not *what* the token still authorized after transit. Audience and capability are orthogonal claims, and passthrough lets an intermediary mutate one while the other still validates. The guardrail is structural: forbid any agent from forwarding a bearer token whose `aud != self`; require token exchange at every hop with PoP-bound mTLS; and make the `act` chain a mandatory, IdP-signed, monotonically growing list such that `E` can verify `len(act) == number_of_hops_claimed` and reject any token whose `act` is shorter than the transport path implies. The last check is the cheap one: if `P` forwarded without exchanging, `E` sees `act == [O]` but a transport path of length 2 — a mismatch that is detectable without any cryptographic novelty. ```python import hashlib from dataclasses import dataclass, field class WarrantChainError(RuntimeError): """Raised when an audience-restricted warrant violates the per-hop delegation invariant: aud must equal the current holder's identity, and each hop must extend the act chain via a fresh exchange.""" @dataclass class Warrant: aud: str # audience the token is valid for act: list[str] # delegation chain, oldest actor first capability: str # e.g. "exec_v2" signature: str = "" # IdP signature over (aud, act, capability) def fingerprint(self) -> str: material = f"{self.aud}|{','.join(self.act)}|{self.capability}" return hashlib.sha256(material.encode()).hexdigest() @dataclass class Agent: identity: str # AAIF-bound SPIFFE ID, e.g. "agent://planner" mtls_peer: str = "" # identity proven by the mTLS handshake def verify_inbound(self, w: Warrant) -> None: # mTLS proves the channel peer; audience must prove *this* agent. if self.mtls_peer != self.identity: raise WarrantChainError( f"mTLS peer {self.mtls_peer!r} does not match bound identity " f"{self.identity!r}" ) if w.aud != self.identity: # The only sound response to aud != self at an interior node # is to refuse to forward; exchange, don't passthrough. raise WarrantChainError( f"audience mismatch at {self.identity}: token aud={w.aud!r} " f"names a downstream party; refusing passthrough" ) def exchange(self, inbound: Warrant, next_hop: str, capability: str) -> Warrant: # Precondition: inbound.aud == self.identity (checked by verify_inbound). self.verify_inbound(inbound) if capability != inbound.capability: # An intermediary may not mutate capability while forwarding a # warrant that still validates on aud alone. raise WarrantChainError( f"capability downgrade at {self.identity}: " f"{inbound.capability!r} -> {capability!r} is not a valid exchange" ) new_act = inbound.act + [self.identity] return Warrant(aud=next_hop, act=new_act, capability=capability) def terminal_verify(w: Warrant, self_id: str, expected_hops: int) -> None: if w.aud != self_id: raise WarrantChainError( f"terminal {self_id} received token for {w.aud!r}" ) if len(w.act) != expected_hops: # Transport path length k implies act length k+1 (origin + k hops). # A shorter act chain means an intermediary forwarded without exchanging. raise WarrantChainError( f"delegation chain length {len(w.act)} != expected {expected_hops}; " f"an intermediary forwarded a token without a fresh exchange" ) # --- failure trace: the passthrough that shipped --- O = Agent("agent://orchestrator", mtls_peer="agent://orchestrator") P = Agent("agent://planner", mtls_peer="agent://planner") E = Agent("agent://executor", mtls_peer="agent://executor") warrant_from_O = Warrant( aud="agent://executor", act=["agent://orchestrator"], capability="exec_v2" ) # P verifies inbound against itself: aud is executor, not planner. try: P.verify_inbound(warrant_from_O) except WarrantChainError as exc: print("passthrough rejected:", exc) # Correct path: P exchanges, minting a fresh token bound to E with P in act. warrant_for_E = P.exchange(warrant_from_O, next_hop="agent://executor", capability="exec_v2") terminal_verify(warrant_for_E, self_id="agent://executor", expected_hops=2) print("valid chain:", warrant_for_E.act, "->", warrant_for_E.aud) # The silent-downgrade variant: P tries to exchange but mutates capability. try: P.exchange(warrant_from_O, next_hop="agent://executor", capability="exec_v1") except WarrantChainError as exc: print("capability downgrade rejected:", exc) ```