# How does an instance detect a revoked-but-cached AAIF warrant after short-lived credential rotation mid-handoff? **Date of Record:** 2026 November 23 **Scope:** Applies to federated agents that carry short-lived Agent Authorization and Identity Framework (AAIF) warrants across multi-hop handoffs and cache the peer's verification bundle (JWKS plus revocation epoch) between rotations. Does not cover single-process agents that re-fetch identity on every call, nor long-lived mTLS identities with no revocation surface. ## Core Distinction The naive mental model of AAIF revocation is *"a revoked warrant fails verification."* That is true only at the verification instant. The failure this record isolates is subtler: a warrant can be **valid at signature-check time and stale at policy-check time** because revocation is published against an *epoch*, while signatures are validated against a *key set*. Rotation advances the key set on a different clock than revocation advances the epoch. An instance that caches the JWKS and the epoch together, and treats a successful signature check as proof of liveness, will accept a warrant whose subject was revoked during the rotation window. The distinction that matters operationally: **signature validity is a property of the token; authorization validity is a property of the (token, epoch) pair.** Conflating them is the boundary. ## What Was Observed A three-hop pipeline: orchestrator → retrieval agent → synthesis agent. Each hop forwards a delegated AAIF warrant with a 300-second TTL and a `rev_epoch` claim. The receiving agent caches the issuer's JWKS for `max-age=600` (twice the TTL, a common but wrong choice) and caches the last-seen `rev_epoch` alongside it. At T+0 the orchestrator's delegated warrant for the retrieval agent is minted at epoch 41. The retrieval agent verifies, caches JWKS@41, and proceeds. At T+120 the issuer revokes the retrieval agent's parent grant (operator action: the agent was flagged for prompt-injection exfiltration) and publishes epoch 42 to the revocation feed. At T+180 the retrieval agent rotates its own short-lived signing key as scheduled and mints a fresh child warrant for the synthesis agent — *signed with a key the issuer has never seen and never endorsed*, because rotation happens locally under the delegated authority. The synthesis agent receives the child warrant, fetches JWKS (cache hit, still JWKS@41 — the rotation key is not in it), and the signature check fails. It falls back to "trust-on-first-use within TTL," accepts the child warrant, and completes the synthesis with data the revoked parent was never authorized to exfiltrate. The trace, condensed: ``` T+0 mint(parent, epoch=41, ttl=300) -> retrieval OK, cache JWKS@41 T+120 revoke(parent), publish epoch=42 -> feed updated, no push to retrieval T+180 rotate_local_key(retrieval); mint(child, epoch=41) # epoch NOT re-read T+181 synthesis: verify(child) -> signature miss in JWKS@41 T+181 synthesis: TOFU fallback -> ACCEPT # <-- boundary crossed T+240 synthesis emits payload derived from revoked grant ``` Two independent staleness clocks drifted in opposite directions: the JWKS cache was *older* than the rotation (missing the new key), while the epoch cache was *older* than the revocation (missing the new epoch). The TOFU fallback was the escape hatch that converted a verification failure into a silent authorization success. ## Condition of Validity The invariant that would have bounded this is: > **No warrant may be accepted on a cached (JWKS, epoch) pair whose age exceeds the warrant's own remaining TTL, and signature-miss may never degrade to trust-on-first-use.** Formally, for a receiver `R` accepting warrant `w` with issuer `I`: ``` accept(w) ⟺ verify_sig(w, JWKS_I) ∧ (w.rev_epoch ≥ epoch_seen(I)) ∧ (age(cache_I) ≤ w.ttl_remaining) ``` The condition of validity for *this record's* failure is narrower: it holds whenever (a) key rotation and revocation advance on independent schedules, (b) at least one receiver caches the pair, and (c) any code path treats a signature miss as recoverable. Remove any one and the failure does not occur — but remove (c) alone and you merely convert silent acceptance into a hard handoff failure, which is the correct-but-degraded outcome. ## Decision Boundary The precise line the synthesis agent crossed: it treated *"signature does not verify against my cached key set"* as evidence of *"my cache is incomplete, therefore extend trust,"* when the correct reading is *"my cache is incomplete, therefore I cannot distinguish rotation from forgery, therefore I must fail closed and re-fetch."* The boundary is between **cache-miss-as-latency-problem** (recoverable, extend trust briefly) and **cache-miss-as-integrity-problem** (unrecoverable without authoritative re-fetch). Rotation and revocation both manifest as cache misses, and they are not distinguishable from the receiver's local state — only the issuer can disambiguate, which is why the re-fetch is mandatory and the TOFU fallback is never sound. ## Operational Effect The downstream effect is that revocation latency in a federated AAIF mesh is not the revocation feed's propagation delay — it is `max(cache_age) + handoff_depth × rotation_interval`, because each hop can re-mint under stale epoch authority and each receiver can accept on stale keys. In the observed case that compounded to roughly 240 seconds of post-revocation authorized execution, invisible to every individual agent's logs because every individual agent's signature check either succeeded or was silently bypassed. The guardrail that closes it is to bind the epoch into the signature surface (sign the epoch into the warrant, so a stale epoch produces a signature miss rather than a policy miss), to cap cache age at `min(ttl, rotation_interval)`, and to make signature-miss a terminal `WarrantStaleError` that forces an authoritative re-fetch before any tool call proceeds. ```python import time from dataclasses import dataclass class WarrantStaleError(RuntimeError): """Raised when a cached (JWKS, epoch) pair is too old to authorize a warrant.""" @dataclass class IdentityCache: issuer: str jwks_epoch: int rev_epoch: int fetched_at: float def authorize(warrant, cache: IdentityCache, issuer_feed, now: float | None = None) -> bool: now = now or time.time() age = now - cache.fetched_at ttl_remaining = warrant.exp - now # Invariant: cache may never outlive the warrant it is used to verify. if age > ttl_remaining: raise WarrantStaleError( f"cache age {age:.1f}s exceeds warrant ttl_remaining {ttl_remaining:.1f}s " f"for issuer {cache.issuer}; refusing to verify on stale keys" ) # Signature miss is an integrity problem, never a latency problem. if not verify_sig(warrant, cache.jwks_epoch): raise WarrantStaleError( f"signature miss against JWKS@{cache.jwks_epoch}; rotation vs forgery " f"indistinguishable locally — authoritative re-fetch required" ) # Revocation epoch must be re-read, not trusted from cache. if warrant.rev_epoch < issuer_feed.current_epoch(cache.issuer): raise WarrantStaleError( f"warrant epoch {warrant.rev_epoch} behind issuer epoch " f"{issuer_feed.current_epoch(cache.issuer)}; subject revoked" ) return True ```