# Why does an instance lose its audit warrant when a federated agent re-signs the delegation chain mid-execution? **Date of Record:** 2026 November 29 **Scope:** Applies to multi-organization agent federations where an originating (home) agent delegates a task to a foreign (peer) agent via A2A-style handoff and the peer is permitted to sub-delegate to its own internal sub-agents before returning a result. Does not apply to single-org MCP tool calls or to stateless one-shot RPC where no delegation chain is minted. ## Core Distinction The failure is not "the receiving org forged a signature" and not "the token expired." It is subtler: **a peer agent that legitimately re-signs an incoming delegation warrant with its *own* federation key produces a chain that is cryptographically valid end-to-end but semantically discontinuous at the org boundary.** Every signature verifies. Every timestamp is monotonic. Yet the audit trail can no longer answer "which human-principal authorized *this specific* action," because the peer's re-signing step replaced the originating principal's binding with the peer's service identity. The boundary condition: **warrant re-signing is indistinguishable, at verification time, from warrant laundering**, unless the verifier tracks a separate *principal-provenance* field that is deliberately excluded from the re-signable envelope. Most federation designs fold principal identity *into* the signed envelope, so re-signing necessarily rewrites it. This is the invariant that breaks. ## What Was Observed A home agent `A@orgX` holds a warrant `W0` minted by orgX's authorization service, binding `(principal=P_human, scope=read:invoices, audience=orgY/agentB, expiry=T+300s)`. It hands off to `B@orgY`. Per orgY's federation policy, `B` may sub-delegate to internal sub-agents, and every sub-delegation must be signed by orgY's key so orgY's audit log is self-contained. The trace: 1. `A` sends task + `W0` to `B`. `B` verifies `W0` against orgX's published JWKS. Valid. 2. `B` constructs `W1 = sign_orgY(claims(W0) ∪ {delegated_by: B, audience: sub_B1})`. Because `claims(W0)` includes `principal=P_human`, `W1` still *carries* `P_human` — but now `P_human` is asserted by orgY, not attested by orgX. The orgX signature covers `W0` only; it does not cover `W1`. 3. `sub_B1` executes a tool call and emits an audit record citing `W1`. The record says `principal=P_human, attesting_org=orgY`. 4. OrgX's compliance auditor later replays the chain. It finds `W1` validly signed by orgY and `W0` validly signed by orgX, but **no signature links `W1` to `W0` under orgX's authority.** The `P_human` claim in `W1` is now an orgY *assertion* about orgX's principal, with no cryptographic anchor back to orgX. The audit trail is intact and useless: it proves orgY *said* a human authorized it, not that orgX *attested* that human. The two are different propositions, and only the second is what a cross-org audit is for. ## Condition of Validity The failure requires all four to hold simultaneously: - **Re-signing is mandatory** for the peer (orgY requires self-contained local audit), so the peer cannot simply forward `W0` unmodified. - **Principal identity lives inside the signed envelope**, so re-signing necessarily re-asserts it under the wrong authority. - **No back-reference is preserved**: `W1` does not embed a hash of `W0` inside its *own* signed payload, so the chain is not linkable. - **Verification checks signatures pairwise**, not as a linked chain, so a valid `W1` and a valid `W0` pass independently even with no edge between them. Remove any one and the invariant holds. The dangerous combination is (1)+(2), which is the *default* in most federation specs because "make the peer's log self-contained" and "put the principal in the token" are each individually reasonable. ## Decision Boundary The architectural invariant required: **split the warrant into a non-re-signable provenance core and a re-signable operational envelope.** - The *provenance core* (`W0`) is signed only by the originating org and is carried **opaquely** — the peer may read it but must not re-sign it. It contains `principal`, `originating_org`, `nonce`, and `expiry`. - The *operational envelope* (`W1`) is what the peer signs, and it MUST embed `hash(W0)` inside its signed payload, plus `delegated_from_org=orgX`. - Verification is **chain-linked**: a verifier accepts `W1` only if (a) `W1`'s signature is valid under orgY, (b) `hash(W0)` recomputes, (c) `W0`'s signature is valid under orgX, and (d) the `principal` in the audit record is read from `W0`, never from `W1`. The decision boundary is sharp: **if the peer's signing key touches the principal field, the audit trail is no longer cross-org-attestable.** A design that lets the peer re-sign the principal is not "slightly weaker"; it is a different (and unverifiable) proposition. There is no partial credit — either `hash(W0)` is in `W1`'s signed payload or the link does not exist. ## Operational Effect Without the split, three concrete consequences follow: 1. **Audit replay yields false positives.** A replay tool that checks "is there a valid chain from a human principal to this action?" will answer *yes* for `W1`, because `W1` is validly signed and contains `P_human`. The tool cannot distinguish attestation from assertion. Compliance reports overstate human authorization. 2. **Revocation does not propagate.** If orgX revokes `W0` (principal offboarded, scope pulled), `W1` remains valid under orgY's key until its own expiry. The peer has no obligation — and no mechanism — to re-check `W0` mid-flight. A revoked principal's delegated work continues. 3. **Incident attribution fails.** When a sub-agent `sub_B1` takes a harmful action, the audit record points at `P_human` with `attesting_org=orgY`. OrgX cannot confirm it ever authorized that scope; orgY cannot prove orgX did. The action is unattributable across the boundary — exactly the case federation audit exists to cover. The guardrail is the chain-link check plus a **mid-flight re-validation hook**: before any sub-delegation whose `W1` expiry exceeds `W0`'s, the peer must re-fetch `W0`'s revocation status from orgX. This bounds the revocation-propagation window to one round-trip rather than the full `W1` lifetime. The code below encodes the verifier that enforces the invariant and the specific failure it raises when a peer re-signs the principal. ```python import hashlib from dataclasses import dataclass from typing import Optional class WarrantProvenanceError(RuntimeError): """Raised when a federated delegation chain cannot be linked back to the originating org's attestation of the human principal.""" pass @dataclass class Warrant: payload: dict # signed claims signer_org: str # org whose key signed this warrant signature: bytes # For re-signed envelopes only: hash of the upstream warrant this # envelope claims to delegate from. Must be INSIDE the signed payload. upstream_hash: Optional[str] = None def _canonical_hash(w: Warrant) -> str: # Hash covers payload + signer + signature: the full upstream attestation. h = hashlib.sha256() h.update(repr(sorted(w.payload.items())).encode()) h.update(w.signer_org.encode()) h.update(w.signature) return h.hexdigest() def verify_federated_chain( leaf: Warrant, upstream: Warrant, trusted_keys: dict, # org -> verify(sig, payload) -> bool originating_org: str, ) -> str: """Return the attested principal, or raise if the chain is unlinkable. Invariant: the principal used for audit MUST come from the originating org's warrant, never from a peer re-signing. """ # 1. Leaf must be validly signed by its own org. if not trusted_keys[leaf.signer_org](leaf.signature, leaf.payload): raise WarrantProvenanceError( f"leaf warrant signature invalid under {leaf.signer_org}" ) # 2. Leaf must embed the upstream hash INSIDE its signed payload. embedded = leaf.payload.get("upstream_hash") if embedded is None: raise WarrantProvenanceError( "leaf warrant omits upstream_hash; peer re-signed without a " "back-reference, chain is unlinkable" ) # 3. The embedded hash must match the actual upstream warrant. if embedded != _canonical_hash(upstream): raise WarrantProvenanceError( "upstream_hash mismatch: leaf does not delegate from this warrant" ) # 4. Upstream must be attested by the originating org, not the peer. if upstream.signer_org != originating_org: raise WarrantProvenanceError( f"upstream signed by {upstream.signer_org}, expected " f"originating org {originating_org}" ) if not trusted_keys[originating_org](upstream.signature, upstream.payload): raise WarrantProvenanceError( "upstream warrant not validly signed by originating org" ) # 5. Principal MUST be read from upstream, never from the leaf. if leaf.payload.get("principal") != upstream.payload.get("principal"): raise WarrantProvenanceError( "principal mismatch between leaf and upstream: peer re-signed " "the principal field, audit attestation is lost" ) return upstream.payload["principal"] def audit_record(leaf: Warrant, upstream: Warrant, trusted_keys: dict, originating_org: str) -> dict: principal = verify_federated_chain( leaf, upstream, trusted_keys, originating_org ) return { "attested_principal": principal, "attesting_org": originating_org, # not leaf.signer_org "leaf_signer": leaf.signer_org, "chain_link": leaf.payload["upstream_hash"], } ```