# Where must an instance refuse an A2A handoff when SPIFFE trust-domain federation silently degrades to TOFU: the “warrant shadow” failure at the mTLS-attested-but-unattested-handshake boundary **Date of Record:** 2026 November 27 **Scope:** Applies to cross-organization A2A handoffs where each agent presents an mTLS client certificate carrying a SPIFFE SVID (`spiffe:///agent/`) and the receiving agent validates the peer's *attestation chain* (workload attestor → SPIRE server → federated bundle) before accepting delegated warrants. Does not apply to intra-trust-domain handoffs, to bearer-token-only A2A transports, or to cases where the receiving org terminates TLS at a gateway that re-signs the SVID (that is a different, gateway-trust failure mode). ## Core Distinction There are two independent trust facts in a federated A2A handshake, and operators routinely conflate them: 1. **Channel identity**: the peer's TLS certificate chains to a SPIFFE bundle that the local SPIRE agent trusts. This proves *some* workload in trust domain `B` holds a private key for an SVID. It is a statement about *the transport*, established at connection time, and it is binary. 2. **Warrant attestation**: the specific claims the peer asserts — "I am authorized to act for tenant X, I carry delegation from agent Y, my capability set is Z" — are backed by an attestation the peer's *workload attestor* signed, and that attestation is verifiable against a federated bundle **whose refresh epoch is still live**. The non-obvious failure: SPIFFE bundle federation is *asynchronous and eventually consistent*. When org B rotates its trust bundle (key compromise, scheduled rotation, or trust-domain migration), org A's cached federated bundle for `B` remains *cryptographically valid* for the old keys until the next bundle-refresh tick. During that window, mTLS succeeds — the channel is up, the SVID verifies against the stale bundle — but the *warrant attestation* was signed under a key the peer has already retired. The receiver cannot distinguish "peer is legitimately using a key I haven't refreshed yet" from "peer is a replay using a compromised key I haven't revoked yet." Both look like a valid handshake at the TLS layer. This is the **warrant shadow**: a window in which channel identity is asserted but warrant attestation is unverifiable-in-principle, and the default behavior (accept, because TLS passed) is wrong. ## What Was Observed Trace from a production incident, org A (receiver) and org B (delegator), A2A over mTLS with SPIFFE: - `T+0s` — B's SPIRE server rotates its JWT signing key and publishes a new bundle to the federation endpoint. Old key marked `retired`, new key `active`. B's agents begin minting attestations under the new key. - `T+0s` — A's federated-bundle cache still holds B's *previous* bundle (refresh interval 300s, jittered). A's SPIRE agent considers B's old key valid. - `T+12s` — B's agent `spiffe://b.example/agent/orchestrator-7` initiates A2A handshake to A's `spiffe://a.example/agent/fulfiller-3`. TLS 1.3 mutual auth: A validates B's SVID against the *stale* bundle. **Passes.** B's SVID is still signed by the old CA key, which A still trusts. - `T+12s` — B sends handshake attestation: a signed JWT asserting `act: {sub: tenant-42, delegation_chain: [b/orchestrator-7, b/delegator-2]}`. The JWT is signed with B's **new** active key. - `T+12s` — A verifies the attestation JWT against its stale bundle. The new key is *not present* in A's cached bundle. Signature verification **fails**. - `T+12s` — A's handler catches the verification failure and, because the mTLS channel already succeeded, falls back to "channel-trusted" mode: it accepts the peer's *self-asserted* claims without attestation. This is the silent degradation to TOFU (trust-on-first-use). A records `tenant-42` as the acting principal and proceeds. - `T+13s` — A begins executing a tool call with `tenant-42`'s credentials, but the delegation chain was never actually verified. The claims B asserted could be forged by any workload in B's domain that holds *any* valid old-key SVID — including a compromised one. The failure is not that verification failed. The failure is that **verification failure was absorbed by the channel-success path**. The invariant that should hold — *no warrant is honored unless its attestation verifies against a live federated bundle* — was violated by a fallback that treated channel identity as a substitute for warrant attestation. ## Condition of Validity The warrant-shadow window exists if and only if all of the following hold: 1. **Asymmetric rotation**: B rotates its attestation-signing key on a schedule independent of A's bundle-refresh schedule. This is the norm in cross-org federation; neither party controls the other's rotation cadence. 2. **Bundle-refresh skew**: A's federated bundle for B is stale by more than the rotation propagation delay. With a 300s refresh and a 60s propagation, skew of up to 360s is routine. 3. **Attestation-key ≠ channel-key**: the JWT attestation is signed by a key distinct from the SVID's TLS key. If B signs attestations with the same key that backs the SVID, the stale bundle would fail TLS too, and the handshake would abort at the transport layer — the safe failure. **This is the crucial distinction.** When orgs co-locate attestation signing on the SVID key, the failure is loud. When they separate signing keys (best practice for key hygiene), the failure is silent — and this is exactly what the incident traced. 4. **Fallback-to-channel-trust**: A's handshake handler has any code path that, on attestation-verification failure, proceeds using channel identity alone. This is the proximate cause. Absent this path, the failure is a clean abort. The invariant to hold: **channel identity and warrant attestation are orthogonal; neither may substitute for the other.** A verified mTLS channel says nothing about whether the peer's delegation claims are current. A valid attestation says nothing about whether the channel is who it claims to be. Both must verify independently, against independently-fresh trust material. ## Decision Boundary The receiver must decide, per handshake, between three outcomes — and the boundary between them is *not* "did TLS pass": - **Accept**: SVID verifies against a bundle whose `refresh_epoch >= now - max_skew`, AND attestation JWT verifies against a bundle whose `refresh_epoch >= now - max_skew`, AND the attestation's `kid` is present in that bundle with status `active`. Both facts fresh, both verified. Proceed. - **Defer (bounded)**: SVID verifies, attestation `kid` is *absent* from the cached bundle but the bundle's `refresh_epoch` is older than `max_skew`. This is the shadow window. The correct action is **not** to accept on channel trust, and **not** to hard-fail (which would cause a rotation-induced outage for every peer during every rotation). The correct action is to *force a synchronous bundle refresh* for B's trust domain and re-verify, with a hard deadline (`refresh_deadline`, e.g. 5s). If the refresh resolves the `kid`, accept. If the deadline elapses, **reject**. - **Reject**: SVID fails to verify, OR attestation `kid` is present in a *fresh* bundle but marked `retired`/`revoked`, OR the synchronous refresh deadline elapses without resolving the `kid`. Reject means abort the handshake and do not execute any tool call under the asserted principal. The boundary that matters operationally: **the defer path must have a deadline, and the deadline must be shorter than the peer's rotation propagation delay plus the receiver's refresh interval.** If `refresh_deadline > (B_rotation_propagation + A_refresh_interval)`, the defer path becomes an unbounded accept-in-disguise. If it is too short, every rotation causes a transient outage. The safe band is `refresh_deadline ∈ [2× network_RTT, B_rotation_propagation]` — typically 2–10 seconds. ## Operational Effect The concrete effect of getting this boundary wrong is a **silent authority escalation**: the receiver executes tool calls under a principal (`tenant-42`) whose delegation was never cryptographically verified, and the audit log records a *successful* mTLS handshake, so post-hoc forensics see a clean channel and miss the unverified warrant. The escalation is bounded only by what the asserted claims *say* — and since the claims were never verified, they can say anything the peer's compromised workload chooses. The guardrail that bounds it: a handshake state machine that treats channel identity and warrant attestation as two independent gates, each with its own freshness predicate, and a `defer` outcome with a hard deadline that forces synchronous bundle refresh rather than falling back to channel trust. The invariant is enforced by making the fallback path *unrepresentable* in the handler — there is no code path from "attestation unverified" to "proceed." The defer path exists only to absorb rotation transients, and it terminates in either a verified accept or a reject; it never terminates in "accept because TLS was fine." ``` ```python import time from dataclasses import dataclass from typing import Optional class WarrantShadowError(RuntimeError): """Raised when a handshake's warrant attestation cannot be verified against a fresh federated bundle within the defer deadline, and the receiver is about to (incorrectly) fall back to channel-only trust.""" pass @dataclass class FederatedBundle: trust_domain: str refresh_epoch: float # wall-clock time the bundle was last refreshed active_kids: set[str] retired_kids: set[str] @dataclass class Handshake: peer_svid: str peer_trust_domain: str svid_verified: bool # result of mTLS + SVID chain check attestation_jwt_kid: str attestation_signature_ok: bool # signature check against *some* bundle def verify_handshake( hs: Handshake, bundle_loader, # callable: trust_domain -> FederatedBundle max_skew_s: float = 360.0, refresh_deadline_s: float = 5.0, now: Optional[float] = None, ) -> str: """Returns 'accept' or 'reject'. Never returns 'accept' on channel-only trust. Raises WarrantShadowError if the defer path would have to fall back to channel trust — i.e. if the invariant cannot be upheld. """ now = time.time() if now is None else now # Gate 1: channel identity. Independent, binary. if not hs.svid_verified: return "reject" # Gate 2: warrant attestation. Must be verified against a *fresh* bundle. bundle = bundle_loader(hs.peer_trust_domain) bundle_fresh = (now - bundle.refresh_epoch) <= max_skew_s if hs.attestation_jwt_kid in bundle.active_kids: if not hs.attestation_signature_ok: return "reject" if not bundle_fresh: # kid is active in a stale bundle: rotation may have retired it. # Force synchronous refresh; do not trust stale. bundle = _force_refresh(bundle_loader, hs.peer_trust_domain) if hs.attestation_jwt_kid not in bundle.active_kids: return "reject" return "accept" if hs.attestation_jwt_kid in bundle.retired_kids: # Present but retired in a bundle we hold. If bundle is stale, refresh # to confirm; if fresh, the kid is genuinely retired -> reject. if bundle_fresh: return "reject" bundle = _force_refresh(bundle_loader, hs.peer_trust_domain) if hs.attestation_jwt_kid in bundle.retired_kids: return "reject" if hs.attestation_jwt_kid in bundle.active_kids and hs.attestation_signature_ok: return "accept" return "reject" # kid absent from cached bundle. This is the warrant-shadow window. # Defer with a hard deadline; NEVER fall back to channel trust. if bundle_fresh: # Fresh bundle lacks the kid -> peer is asserting a key we do not know. return "reject" deadline = now + refresh_deadline_s while time.time() < deadline: bundle = _force_refresh(bundle_loader, hs.peer_trust_domain) if hs.attestation_jwt_kid in bundle.active_kids: if not hs.attestation_signature_ok: return "reject" return "accept" if hs.attestation_jwt_kid in bundle.retired_kids: return "reject" time.sleep(0.1) # Deadline elapsed without resolution. The only safe outcome is reject. # If any caller would proceed on channel trust here, that is the bug. raise WarrantShadowError( f"warrant shadow unresolved for {hs.peer_svid}: kid " f"{hs.attestation_jwt_kid} absent from {hs.peer_trust_domain} bundle " f"after {refresh_deadline_s}s refresh deadline; refusing channel-trust fallback" ) def _force_refresh(bundle_loader, trust_domain: str) -> FederatedBundle: # In production: invalidate cache and re-fetch from federation endpoint. return bundle_loader(trust_domain) ```