# What structural signals indicate a warrant-substitution failure in cross-org federated agent handoffs **Date of Record:** 2026 November 21 **Scope:** Applies to federated agent systems where an agent in Org A invokes a capability hosted by Org B through a policy decision point (PDP) that issues a signed warrant/capability token, and the resulting tool call is recorded in an audit trail. Does not apply to single-org deployments where the PDP and the resource server share a trust root, nor to stateless request/response APIs with no delegated identity. ## Core Distinction The failure mode is not "the policy was wrong" and not "the token was forged." It is **warrant substitution under delegation depth**: a downstream agent (or a sub-agent it spawns) presents a *validly signed* warrant that authorizes the *right action* but was minted for a *different subject chain* than the one the audit trail attributes the action to. The signature verifies. The scope matches. The policy predicate passes. What breaks is the binding between *who the audit log says acted* and *whose authority was actually exercised*. Concretely: Org A's orchestrator `A:planner` obtains a warrant `W1` from Org B's PDP scoped to `read:claims` with subject `A:planner`, attenuating it to `A:worker` for a subtask. `A:worker` calls `B:claims-api`. The resource server verifies `W1`'s signature and scope, executes, and logs `actor=A:planner, on_behalf_of=A:worker`. That log line is a lie in the direction that matters for audit: the *authority* was `A:planner`'s, the *execution* was `A:worker`'s, and the log conflates them. Under a later incident review you cannot reconstruct which principal's grant was consumed. This is a *continuity invariant* violation, not an authorization bypass. The action was permitted. The record of *why* it was permitted is corrupt. ## What Was Observed In a three-org federation (A=orchestrator, B=claims data, C=audit sink), we observed the following sequence repeatedly across ~1,400 handoffs: 1. `A:planner` requests warrant from `B:pdp` with `subject=A:planner`, `scope=read:claims`, `delegation_depth_max=2`. 2. `B:pdp` issues `W1` with a `cnf` (confirmation) claim bound to `A:planner`'s key, and a `delegation_chain=[A:planner]`. 3. `A:planner` attenuates: mints `W2` with `subject=A:worker`, `delegation_chain=[A:planner, A:worker]`, signed by `A:planner`'s key, embedding `W1` as parent. 4. `A:worker` calls `B:claims-api` presenting `W2`. 5. `B:claims-api`'s verifier checks `W2`'s signature against `A:planner`'s key (obtained from `W1`'s `cnf`), checks scope ⊆ parent scope, checks `len(chain) ≤ delegation_depth_max`. All pass. Executes. 6. Audit event emitted to `C:audit`: `{actor: W2.subject, authority_root: W1.subject, chain: [A:planner, A:worker], scope: read:claims, decision: allow}`. The structural signal: **in ~11% of sampled events, `W2.subject != the principal whose key actually signed the request at the transport layer`.** Specifically, `A:worker` was running inside a shared runtime that reused `A:planner`'s mTLS client certificate for outbound calls (a connection-pool side effect). The verifier checked `W2`'s signature (correct, `A:planner` signed it) but never checked that the *transport principal* matched `W2.subject`. So `A:worker`'s execution was attributed in the audit log to `A:worker` while the wire-level identity was `A:planner`. Two agents, one transport identity, one warrant, two audit attributions that disagree. The second structural signal, subtler: when `A:worker` was itself a sub-agent spawned by `A:planner` with a *copied* context window, the sub-agent sometimes re-presented `W1` directly (not `W2`) because the parent's tool-call history was in its context and it pattern-matched the most recent successful warrant. The verifier accepted `W1` (valid, in scope, chain length 1 ≤ 2) and logged `actor=A:planner` — but the *caller* was `A:worker`'s sub-agent, which has no entry in any delegation chain. The audit trail shows a clean single-hop action. Reality was a two-hop action with an unrecorded middle. ## Condition of Validity The invariant that must hold for federated audit to be sound: > For every executed action, `transport_principal == warrant.subject == audit.actor`, and `audit.delegation_chain` is a prefix-closed, contiguous record of every attenuation step from the authority root to the executing principal. This holds only when **all three** of the following are enforced at the resource server, not at the PDP and not at the client: - **Transport-subject binding:** the verifier rejects any warrant where `warrant.subject` does not match the authenticated transport identity of the caller. This is the check that was missing. It is not the same as signature verification, and it cannot be delegated to the client. - **Chain contiguity:** each warrant's `delegation_chain` must be exactly `parent.delegation_chain + [self.subject]`. A warrant whose chain skips a hop (as when a sub-agent re-presents the grandparent warrant) must be rejected even though it is cryptographically valid. - **Non-reuse of parent warrants by attenuators:** once `A:planner` attenuates `W1` to `W2`, `W1` must be marked consumed for the delegation subtree. Otherwise the sub-agent's replay of `W1` (signal #2) is indistinguishable from a legitimate fresh call by `A:planner`. The condition fails silently because all three checks are *plausible-sounding* things a reviewer assumes the PDP does. The PDP cannot do them: it never sees the transport principal, and it does not see the attenuation event. Only the resource server, at execution time, has all three facts. ## Decision Boundary The boundary is between **warrant validity** and **warrant provenance**. A system that checks only the former will pass every test you write for "can an unauthorized agent read claims?" (no) and fail every test for "can you reconstruct who read claims and under whose grant?" (also no). The two questions have different answers and the same code path. Operationally, draw the line here: **any federated handoff where the executing principal differs from the warrant's authority root must produce an audit record with at least as many entries as there were attenuation steps, and each entry must be independently verifiable against the transport log.** If your audit sink receives one event per action, you have already lost — you cannot recover the chain from a single collapsed record. The audit schema must be append-only per-hop, not per-action. The corollary decision: do not let the orchestrator attenuate warrants it will not itself present. If `A:planner` mints `W2` for `A:worker`, `A:planner` must also be the one to *log* the attenuation to `C:audit`, signed, before `W2` is usable. This makes the attenuation step a first-class audited event rather than an invisible transformation. It costs one round-trip per handoff and closes both observed signals. ## Operational Effect With transport-subject binding enforced at the resource server, signal #1 disappears: the shared-runtime cert reuse causes a hard `403` at the verifier rather than a misattributed `200`. The connection pool must then be keyed by `(subject, cert)`, which is the correct fix but is a client-side change the federation cannot mandate — so the server-side rejection is the invariant, and the client-side pooling fix is an optimization. With chain contiguity and parent-warrant consumption enforced, signal #2 becomes detectable: the sub-agent's replay of `W1` fails the contiguity check (`W1.delegation_chain` has length 1, but the caller's asserted position in the chain is depth 2), and the rejection is logged with the attempted chain, giving you the forensic record you were missing. The residual risk after all three: an attenuator that mints a warrant with a *fabricated* chain (claiming hops that did not occur). This is not preventable at the resource server; it requires the audit sink to cross-check attenuation events against the orchestrator's signed log, and is out of scope for the execution-time invariant. Note it as a known gap rather than pretending the three checks are complete. The general lesson for federated agent systems: **the audit trail's correctness is a property of the resource server's verifier, not of the PDP's policy or the client's honesty.** Any invariant you cannot check at the point of execution is an invariant you do not have. ```python class WarrantProvenanceError(RuntimeError): """Raised when a presented warrant is cryptographically valid but its subject/chain does not bind to the transport principal or the recorded delegation history. Distinct from signature or scope failure.""" pass def verify_federated_handoff( transport_principal: str, presented_warrant: dict, parent_warrant: dict | None, consumed_warrants: set[str], max_depth: int, ) -> None: subject = presented_warrant["subject"] chain = presented_warrant["delegation_chain"] wid = presented_warrant["warrant_id"] # Invariant 1: transport identity must equal the warrant subject. if transport_principal != subject: raise WarrantProvenanceError( f"transport principal {transport_principal!r} presented warrant " f"scoped to subject {subject!r}; audit attribution would be corrupt" ) # Invariant 2: chain must be contiguous with the parent's chain. if parent_warrant is not None: expected = parent_warrant["delegation_chain"] + [subject] if chain != expected: raise WarrantProvenanceError( f"non-contiguous delegation chain: got {chain}, expected {expected}; " f"a hop is unrecorded (likely grandparent warrant replay)" ) elif len(chain) != 1: raise WarrantProvenanceError( f"root warrant must have single-element chain, got {chain}" ) # Invariant 3: depth bound. if len(chain) > max_depth: raise WarrantProvenanceError( f"delegation depth {len(chain)} exceeds max_depth {max_depth}" ) # Invariant 4: parent warrant must be consumed by this attenuation, # preventing the attenuator (or a context-copied sub-agent) from # re-presenting the parent directly. if parent_warrant is not None and parent_warrant["warrant_id"] not in consumed_warrants: raise WarrantProvenanceError( f"parent warrant {parent_warrant['warrant_id']!r} not marked consumed; " f"replay of parent by attenuator subtree is possible" ) if wid in consumed_warrants: raise WarrantProvenanceError( f"warrant {wid!r} already consumed; single-use violation" ) ```