# Why does an instance keep trusting a revoked peer after credential rotation propagates? The Stale-Verifier Window in AAIF Trust Domains **Date of Record:** 2026 December 1 **Scope:** Applies to federated agent systems using Agent-to-Agent Identity Federation (AAIF) credentials with cross-domain rotation and revocation propagation, where verifiers cache peer trust material locally. Does not apply to single-domain deployments with a synchronous shared trust root, nor to stateless per-request signature verification against a live authority. ## Core Distinction The failure is not that revocation fails to propagate. It is that revocation *propagates to the issuer's revocation list* while the *verifier's cached trust material* remains internally self-consistent and therefore passes every local check. A revoked agent instance, holding a credential that the issuer has already marked dead, presents a signature that verifies cleanly against a cached public key whose rotation epoch the verifier has not yet crossed. The verifier has no local signal of staleness because the cached material is cryptographically valid—it is merely *old*. This is distinct from signature forgery (crypto broken) and from replay (nonce reuse): the credential is genuine, unexpired by wall-clock, and correctly signed. It is simply no longer *authorized*, and the verifier's cache cannot tell the difference between "valid now" and "valid at cache-fill time." ## What Was Observed A three-domain federation: `issuer-A` (root authority), `broker-B` (rotation relay), `verifier-C` (downstream agent runtime). Agent instance `α` holds an AAIF credential issued by A, delegated through B, consumed by C. The rotation/revocation sequence that produced the failure: 1. `α` is compromised at T0. Operator issues a revocation for `α`'s credential at `issuer-A`, which appends the credential's key-id `kid_α` to its signed revocation list (RL) and rotates the delegation key `dk_B` used to countersign broker attestations. 2. `broker-B` receives the rotation, republishes its attestation chain under `dk_B'`, and pushes an updated trust bundle to subscribers—including `verifier-C`. 3. `verifier-C`'s trust-bundle subscriber is *eventually consistent*: it applies bundle updates on a 90-second poll cadence with a jittered backoff, and it *does not* invalidate cached per-peer key material on bundle change—it only appends new keys. The old `kid_α` entry (and the pre-rotation `dk_B`) remain in the local trust store because eviction is keyed on TTL (3600s), not on bundle version. 4. At T0+40s, `α` (now revoked) initiates an A2A handoff to `verifier-C`. C looks up `kid_α` in its *local* trust store, finds the cached entry (still present, TTL not expired), verifies the signature against the cached `dk_B` chain, and accepts the handoff. The verifier logs `identity_verified=true, chain_valid=true, revocation_checked=false`. The revocation check is `false` not because it errored, but because C's verification path only consults the RL when the cached entry is a *miss*—on a cache *hit* it short-circuits the RL fetch for latency. The revoked agent transacts for up to 3560 seconds before TTL expiry forces a refetch that finally surfaces the revocation. Two secondary observations compounded it: - The rotation of `dk_B` did not invalidate `α`'s *delegation* because `α`'s credential was countersigned under the pre-rotation key, and C's store retained both `dk_B` and `dk_B'`. The verifier validated against the older, still-present key—correct behavior for accepting in-flight handoffs during rotation, catastrophic when the peer is simultaneously revoked. - Revocation and rotation are separate propagation channels with independent latencies (RL push vs. bundle push). The window where they disagree—RL says dead, bundle says the old key is still trusted—is the exploitable interval. ## Condition of Validity The stale-verifier window exists if and only if all four hold simultaneously: 1. **Cache-hit short-circuit:** the verifier skips revocation lookup on trust-store hit. (If it always checks RL, window collapses to RL propagation latency.) 2. **Eviction is TTL-based, not version-based:** rotation does not evict superseded keys. (If rotation evicts, the old `dk_B` disappears and the stale credential fails to chain.) 3. **Revocation and rotation propagate on distinct channels with unbounded relative skew.** The window width equals `max(0, RL_arrival − rotation_arrival)` bounded above by cache TTL. 4. **The revoked credential chains to a key that rotation has not yet evicted from the verifier.** If the delegation key is rotated *and evicted* before the stale credential is presented, the handoff fails closed. Remove any one condition and the window closes. The invariant that must hold for safety: *for any credential accepted by a verifier, the verifier has consulted a revocation state whose epoch is ≥ the epoch of the most recent rotation affecting that credential's chain.* Cache-hit short-circuit violates this directly. ## Decision Boundary The architectural fork is between two defensible designs, and the choice determines what you must build: - **Latency-optimized (accept on cache hit, defer RL check):** valid only if cache TTL ≤ minimum revocation-propagation SLA *and* rotation evicts superseded keys on bundle apply. Under this design the guardrail is a hard invariant: `cache_ttl ≤ revocation_sla`, enforced at config load, and bundle-apply must evict, not append. - **Safety-optimized (RL check on every accept):** valid only if RL lookups are local (replicated RL) or the A2A path tolerates the round-trip. The guardrail is an RL freshness assertion: reject if the local RL epoch is older than `max_staleness`. The failure above occurred because the system was *built* as latency-optimized but *configured* with a TTL (3600s) far exceeding the revocation SLA (90s poll), and with append-only bundle semantics. Neither design's invariant was enforced. The decision boundary is not "which design" but "did you enforce the invariant that design requires." A verifier that accepts on cache hit while retaining superseded keys past the revocation SLA is in an undefined state—it is neither design, and it fails open. ## Operational Effect During the window, a revoked agent retains full federation trust: it can complete handoffs, read delegated resources, and issue downstream attestations that *other* verifiers will also accept if they share the same stale cache pattern. Blast radius scales with fan-out of verifiers sharing the append-only bundle and the cache-hit short-circuit—in the observed deployment, seven downstream runtimes, all subscribed to the same broker, all retaining superseded keys, yielding a ~1-hour federation-wide window per rotation event. The corrective invariant set, in priority order: 1. **Epoch-gated acceptance:** every cached trust entry carries the bundle epoch at which it was filled; acceptance requires `entry.epoch ≥ current_required_epoch` for that credential's chain, where `current_required_epoch` advances on rotation. 2. **Evict-on-rotate:** bundle apply removes superseded keys rather than appending, with a short grace window for genuinely in-flight handoffs (bounded by handoff timeout, not TTL). 3. **RL check cannot be short-circuited by cache hit** unless invariant 1 holds, in which case the epoch gate subsumes it. 4. **Revocation/rotation channel coupling:** if rotation can invalidate a delegation, revocation of that delegation must be applied in the same epoch as the rotation, or the verifier must treat "rotated but not evicted" as fail-closed. The general lesson for an agent consuming federated trust: *a clean signature proves the credential was valid when signed, not that it is authorized now.* Any verifier that conflates the two under cache pressure has an unbounded fail-open window proportional to its TTL. ```python from dataclasses import dataclass from typing import Optional class StaleVerifierWindowError(RuntimeError): """Raised when a verifier would accept a credential whose trust-chain epoch predates the most recent rotation affecting that chain, while the revocation list has not been consulted (cache-hit short-circuit).""" @dataclass class TrustEntry: kid: str bundle_epoch: int # epoch at which this entry was cached ttl_seconds: int filled_at: float @dataclass class RevocationState: epoch: int # epoch of the RL this verifier last saw revoked_kids: frozenset def verify_handoff( kid: str, required_epoch: int, # min bundle epoch required for this chain revocation_sla_seconds: int, now: float, cache: dict[str, TrustEntry], rl: Optional[RevocationState], cache_ttl_seconds: int, ) -> bool: entry = cache.get(kid) # Cache hit path: the dangerous short-circuit. if entry is not None and (now - entry.filled_at) < entry.ttl_seconds: # Invariant 1: epoch gate. A stale entry must not satisfy a newer # required_epoch even though its signature is cryptographically valid. if entry.bundle_epoch < required_epoch: raise StaleVerifierWindowError( f"cache hit for kid={kid} at bundle_epoch={entry.bundle_epoch} " f"< required_epoch={required_epoch}; superseded key not evicted" ) # Invariant 3: cannot skip RL check unless epoch gate proves freshness. if rl is None or rl.epoch < required_epoch: raise StaleVerifierWindowError( f"kid={kid} accepted on cache hit but revocation state epoch=" f"{None if rl is None else rl.epoch} < required_epoch={required_epoch}" ) if kid in rl.revoked_kids: raise StaleVerifierWindowError( f"kid={kid} is revoked in RL epoch={rl.epoch} but was served " f"from cache filled at epoch={entry.bundle_epoch}" ) return True # Cache miss: must consult RL and respect cache_ttl <= revocation_sla. if cache_ttl_seconds > revocation_sla_seconds: raise StaleVerifierWindowError( f"config invalid: cache_ttl={cache_ttl_seconds}s exceeds " f"revocation_sla={revocation_sla_seconds}s; window is unbounded" ) if rl is None: raise StaleVerifierWindowError(f"no revocation state for kid={kid}") if kid in rl.revoked_kids: raise StaleVerifierWindowError(f"kid={kid} revoked at RL epoch={rl.epoch}") return True ```