# Why does an instance keep accepting a revoked peer until its own credential rotates: stale trust-anchor caching across federated A2A domains **Date of Record:** 2026 November 29 **Scope:** Applies to A2A-style federated agent meshes where peer identity is asserted by short-lived signed warrants (JWTs/SD-JWTs or equivalent) issued by per-domain authorities and verified against a cached trust-anchor bundle. Does not apply to single-domain meshes with a shared root, nor to sessions where every request performs a full online revocation check. ## Core Distinction There are two clocks in a federated agent handoff, and they are not the same clock. The **credential clock** governs when a warrant expires (`exp`). The **trust clock** governs when the verifying instance refreshes its view of which issuers and which key material are still authoritative — including whether a given subject's warrant has been *revoked before its `exp`*. A revoked-but-unexpired warrant is the dangerous object: it is cryptographically valid, correctly signed, within its validity window, and yet must be rejected. The failure mode is that an instance treats "signature verifies and `exp` is in the future" as sufficient. It is not. Revocation is an *out-of-band* fact that lives in the trust bundle, not in the token. When the trust bundle is cached with a TTL longer than the revocation-propagation window, the verifying instance will keep accepting a revoked peer for the entire residual life of its cache — and the boundary is sharp: the instance does not "half-fail," it cleanly authenticates a ghost. ## What Was Observed A three-domain mesh: `alpha` (orchestrator), `beta` (tool-executor), `gamma` (auditor). Each domain publishes a trust-anchor bundle at `/.well-known/agent-trust.json` containing (a) the current signing key set per issuer and (b) a revocation list of subject identifiers with `revoked_at` timestamps. Warrants are issued with a 300-second `exp` and carry the `iss`, `sub`, `domain`, and a `warrant_id`. The verifying instances cached the bundle for 600 seconds — a reasonable-looking value chosen to cut fetch latency, and *twice* the warrant lifetime, which is the trap. The implicit assumption was "warrants are short-lived, so caching the bundle for 2× the warrant life is safe." That reasoning is exactly backwards. Trace of the incident: 1. `t=0`. `beta` holds a valid warrant from `gamma`, `exp=t+300`. `alpha` has a warm bundle cache, fetched at `t=-10`, valid until `t=590`. 2. `t=40`. `gamma`'s auditor detects that the `beta` instance's warrant was minted under a compromised sub-key. `gamma` **revokes** `beta@gamma` at `t=40` and republishes the bundle. The revocation is authoritative immediately at the issuer. 3. `t=45`. `beta` initiates an A2A handoff to `alpha`, presenting the still-unexpired warrant. `alpha` verifies the signature against its **cached** key set (which still contains the now-revoked sub-key), checks `exp > now` (true), finds no revocation entry in its **cached** revocation list (stale), and accepts. 4. `t=45 → t=590`. Every handoff from `beta` is accepted. The ghost operates for 545 seconds — 9× the nominal warrant lifetime — because the cache outlived the token. 5. `t=590`. `alpha`'s bundle cache expires, refetches, sees the revocation, and begins rejecting `beta`. The rejection is *late and silent*: no alert fired at `t=40`, and the only signal was a sudden drop in accepted handoffs at `t=590`, which was initially misread as a `beta` outage. The non-obvious part: the short warrant lifetime *increased* exposure. Operators reasoned that 300-second tokens bounded the blast radius. But because verification trusted a stale bundle, the effective credential lifetime was `max(warrant_exp, bundle_cache_exp)` — the cache TTL, not the token TTL. Short tokens created *more* revocation events per unit time, each of which could slip through a stale cache, while giving a false sense of a tight bound. A second-order observation: the revoked sub-key was still in the cached *key set*, so even a token minted *after* revocation by the compromised key would verify. Key-set staleness and revocation-list staleness are two independent leaks through the same cache. ## Condition of Validity The guardrail is a strict ordering invariant, not a TTL heuristic: > For every verifier, the trust-bundle cache TTL must be **strictly less than** the minimum revocation-propagation SLA of any issuer in the federation, and the verifier must reject any warrant whose `iat` (or `warrant_id` issuance epoch) is **newer than the bundle snapshot** used to verify it. Formally, acceptance of a warrant `w` against bundle snapshot `B` is valid only if: - `w.exp > now` (not expired), **and** - `B.fetched_at >= w.iat` (the snapshot postdates issuance — you are not verifying a fresh token against a stale world), **and** - `w.sub ∉ B.revocations` and `w.iss_key ∈ B.active_keys` (not revoked, key not retired), **and** - `now - B.fetched_at < min_propagation_sla` (the snapshot is within the federation's freshness bound). The third and fourth clauses are the ones a naive verifier omits. The second clause is the subtle one: it converts "is this token valid?" into "is this token valid *as of a snapshot that could have known about its revocation*?" A token issued after your snapshot cannot have had its revocation observed by that snapshot, so it must be re-verified against a fresher bundle. This is the same principle as a read-your-writes consistency requirement, applied to revocation. ## Decision Boundary The boundary is between **cache-as-optimization** and **cache-as-authority**. Caching the bundle is fine only when the cached copy is treated as a *hint that must be revalidated* for any security-relevant decision, i.e., when the freshness check is part of the verification predicate rather than an assumption. The moment a verifier accepts a warrant *because the cache said so*, the cache has become the authority, and the authority is stale by construction. Concretely, the decision to accept splits as follows: - **Accept** only if all four clauses above hold against a bundle whose age is within `min_propagation_sla`. - **Reject** if the bundle is older than the freshness bound — even if the token verifies. Staleness must fail *closed*, not open. An instance that cannot prove freshness must not authenticate. - **Defer/refetch** if `w.iat > B.fetched_at`: the token is newer than the world you know; force a synchronous refetch before deciding, and if the refetch fails, reject. The anti-pattern to name explicitly: `if signature_ok and not expired: accept`. This single line encodes the entire bug. It is correct for a single-domain mesh with a shared root and no revocation; it is a silent ghost-admission in any federated mesh with per-domain revocation. ## Operational Effect When the invariant holds, revocation latency is bounded by `min_propagation_sla` rather than by the bundle cache TTL, and the bound is *independent of warrant lifetime*. That decoupling is the whole point: you can shorten warrants for other reasons (limiting replay windows, narrowing key exposure) without shortening or lengthening the revocation bound, because the bound lives in the freshness predicate. When the invariant is violated, the effective revocation latency silently becomes `bundle_cache_ttl`, and the failure presents as a clean authentication of a revoked peer — no error, no exception, no log line at the moment of compromise. The only observable is a later, unexplained drop in accepted handoffs when the cache finally turns over, which is easily misattributed to the peer being down. The remediation is not "shorten the cache." It is to make freshness a *precondition of acceptance* and to make stale-bundle rejection raise a distinct, alertable condition — because a verifier that rejects due to staleness is telling you the federation's propagation SLA is being violated, which is itself a security signal. Treat the staleness rejection as a first-class event, not a transient retry. ```python import time from dataclasses import dataclass, field from typing import Optional class StaleTrustBundleError(RuntimeError): """Raised when a warrant cannot be verified against a sufficiently fresh bundle.""" class RevokedWarrantError(RuntimeError): """Raised when a warrant's subject or signing key is revoked in the trusted snapshot.""" @dataclass class TrustBundle: fetched_at: float active_keys: set revocations: dict # subject -> revoked_at propagation_sla: float # seconds; max acceptable staleness for this issuer @dataclass class Warrant: sub: str iss_key: str iat: float exp: float warrant_id: str def verify_warrant( w: Warrant, bundle: TrustBundle, now: Optional[float] = None, ) -> bool: now = time.time() if now is None else now # Clause 1: not expired. if w.exp <= now: raise RevokedWarrantError(f"warrant {w.warrant_id} expired at {w.exp}") # Clause 4: bundle must be fresh enough to have observed a revocation. if now - bundle.fetched_at > bundle.propagation_sla: # Fail CLOSED: cannot prove freshness, so we must not authenticate. raise StaleTrustBundleError( f"bundle age {now - bundle.fetched_at:.1f}s exceeds SLA " f"{bundle.propagation_sla:.1f}s; refusing to authenticate {w.sub}" ) # Clause 2: token must not postdate the snapshot used to verify it. if w.iat > bundle.fetched_at: raise StaleTrustBundleError( f"warrant {w.warrant_id} issued at {w.iat} after bundle snapshot " f"{bundle.fetched_at}; refetch required before acceptance" ) # Clause 3a: signing key must still be active. if w.iss_key not in bundle.active_keys: raise RevokedWarrantError( f"signing key {w.iss_key} retired; warrant {w.warrant_id} rejected" ) # Clause 3b: subject must not be revoked. if w.sub in bundle.revocations: raise RevokedWarrantError( f"subject {w.sub} revoked at {bundle.revocations[w.sub]}; " f"warrant {w.warrant_id} rejected" ) return True ```