# In what scenarios must an instance reject a federated attestation whose issuer key rotated mid-handoff: the stale-warrant re-anchoring failure in cross-org agent identity **Date of Record:** 2026 November 24 **Scope:** Applies to agent-to-agent handoffs where a receiving instance validates a warrant (capability grant + identity claim) signed by a foreign-org issuer whose signing key may rotate between warrant issuance and warrant consumption. Does not apply to single-org deployments with a single trusted key root, nor to stateless request/response calls where the warrant is consumed within a single issuance epoch. ## Core Distinction The distinction that matters is between *attestation freshness* and *attestation validity*. A warrant can be cryptographically valid—signature verifies against a key that was, at some point, the issuer's authoritative key—while being operationally stale because the issuer has rotated its key and, crucially, has *re-issued or revoked* the underlying capability grant in the new epoch. Most federated identity stacks (SPIFFE/SPIRE, OIDC federation, DID-based warrants) treat key rotation as a transparency-log problem: the old key is published as retired, the new key is published as active, and verifiers are expected to check "was this key valid *at signing time*." That check is necessary but not sufficient for agent handoffs, because the *capability* the warrant encodes may have been narrowed or revoked at rotation time, and the agent consuming the warrant has no way to learn that from the signature alone. The failure is non-obvious because the signature is *correct*. A naive verifier—one that validates the JWS against the issuer's historical key set, checks `exp`, and checks `aud`—will accept a warrant that the issuer has already superseded. The window between "issuer rotates and revokes" and "receiving agent learns of the revocation" is the boundary condition. Inside that window, the receiving agent executes with a capability the issuer no longer intends it to have. ## What Was Observed A three-org pipeline: Org A (planner) issues a warrant to Agent-1 delegating `read:customer_records` scope to Org B's Agent-2, which then hands off to Org C's Agent-3 for enrichment. The warrant `W_A→B` is signed by Org A's issuer key `K_A1` with a 24-hour `exp`. At T+6h, Org A rotates `K_A1` → `K_A2` *and*, as part of the same rotation runbook, revokes all warrants issued under `K_A1` because a scope-narrowing policy change (customer records now require per-record consent tokens) took effect. The revocation is published to Org A's transparency log and to a revocation endpoint. Agent-2, however, is mid-task: it has already validated `W_A→B` at T+5h against `K_A1`, cached the validation result in its own episodic memory ("warrant valid, scope=read:customer_records, exp=T+24h"), and is now at T+7h constructing a downstream warrant `W_B→C` that *re-delegates* the A-granted scope to Agent-3. Agent-2 does not re-validate against the revocation endpoint before delegation—it trusts its cached validation. Agent-3 receives `W_B→C`, validates the B→C signature (valid), follows the delegation chain back to `W_A→B`, validates that signature against `K_A1` (valid at signing time), and proceeds to read customer records without consent tokens. Three concrete observations from the trace: 1. **The stale cache was the vector, not the signature.** Agent-2's memory held a *validation result*, not a *validation predicate*. It replayed a boolean instead of re-evaluating the predicate against current revocation state. This is the episodic-to-semantic distillation loss in identity form: the agent distilled "warrant valid" into a fact, losing the "valid as of T+5h, subject to revocation" qualifier. 2. **Delegation chains amplify the window.** Agent-3's chain-walk validated each link against historical keys. Each link was individually correct. The *composition* was invalid because the root capability had been revoked. No single link's signature check could detect this—only a revocation check at the chain root, performed at consumption time, would have. 3. **The revocation endpoint was reachable but not consulted.** The failure was not a network partition. Agent-2 had the endpoint in its config; its delegation routine simply did not call it because the cached validation short-circuited the check. This is the classic "fast path skips the safety check" pattern, but at the identity layer it has security consequences rather than mere correctness ones. ## Condition of Validity A federated attestation `W` consumed by agent `R` at time `t` is *operationally valid* only if all of the following hold: - `W`'s signature verifies against the issuer's key that was active at `W.issued_at` (the standard check). - `W.exp > t` (the standard check). - `W.aud` includes `R` or an ancestor in `R`'s delegation chain (the standard check). - **The issuer's revocation set, as of `t`, does not contain `W.warrant_id` or any ancestor warrant in `R`'s chain** (the check that was skipped). - **If the issuer's key rotated after `W.issued_at`, the rotation event did not carry a scope-narrowing or revocation directive covering `W`'s scope** (the check that is structurally hard, because it requires parsing the rotation event's semantics, not just its keys). The fourth and fifth conditions are the ones that fail in the observed trace. The fourth is a straightforward revocation-list check that must be performed at *consumption* time, not cached. The fifth is the genuinely hard one: key rotation events are typically opaque to verifiers (they carry public keys and signatures, not policy semantics), so a verifier cannot in general know that a rotation also revoked warrants. The architectural resolution is to require issuers to publish rotation and revocation as a *single signed epoch transition* that names the affected warrant IDs, and to require verifiers to treat any rotation event as invalidating all cached validations for that issuer. ## Decision Boundary The boundary is: **an instance must reject (not merely re-validate) any federated warrant whose issuer has published a key-epoch transition since the warrant's last local validation, unless the transition explicitly re-attests the warrant.** The decision rule for the receiving agent: - If `issuer.current_epoch == issuer.epoch_at_last_validation`: the cached validation may be reused within its `exp` window. - If `issuer.current_epoch > issuer.epoch_at_last_validation`: the cached validation is *void*. The agent must re-fetch the warrant's status from the issuer's revocation endpoint, and if the endpoint is unreachable, must fail closed with a `StaleAttestationError` rather than proceed on the cached result. - If the warrant is part of a delegation chain, the epoch check must be performed at *every* link, and the chain is valid only if all links are valid in their current epochs. A single stale link invalidates the chain. The non-obvious part of this boundary: the agent must not treat "signature valid against historical key" as evidence of currency. Historical-key validity is a *necessary* condition for the warrant to have ever been valid; it is not evidence that the warrant is *still* valid. The epoch transition is the signal that the issuer's intent may have changed, and the agent must treat it as a mandatory re-validation trigger, not an informational log entry. ## Operational Effect Agents that implement this boundary pay a latency cost: every warrant consumption after an epoch transition requires a revocation-endpoint round-trip, and every delegation-chain walk requires per-link epoch checks. In the observed pipeline, this added ~40ms per handoff and required a small cache of `(issuer, epoch) → revocation_set` entries with a short TTL (we used 60s, bounded by the issuer's published max-staleness). Agents that do *not* implement it exhibit the failure trace above: silent over-privileged execution inside the rotation window, with no error surfaced to any party. The failure is invisible to the receiving agent (its checks passed), invisible to the issuer (it revoked correctly), and visible only in the audit log as a scope violation that "shouldn't have been possible." This invisibility is what makes the boundary worth encoding explicitly: the system does not fail loudly, it fails *permissively*, which is the worst failure mode for an identity layer. The guardrail is a single invariant, enforced at the consumption site: **no warrant is consumed on a cached validation whose issuer epoch is behind the issuer's current epoch.** The code below encodes this invariant and the fail-closed behavior when the revocation endpoint is unreachable. ```python import time from dataclasses import dataclass, field from typing import Optional class StaleAttestationError(RuntimeError): """Raised when a federated warrant is consumed on a cached validation whose issuer key-epoch is behind the issuer's current epoch, and the current revocation state cannot be confirmed.""" @dataclass class Warrant: warrant_id: str issuer: str issued_at: float expires_at: float issuer_epoch: int scope: str parent: Optional["Warrant"] = None @dataclass class CachedValidation: warrant_id: str issuer_epoch: int validated_at: float valid: bool @dataclass class IssuerState: current_epoch: int # warrant_ids revoked in the current epoch revoked: set = field(default_factory=set) # max age (seconds) a revocation lookup may be cached max_staleness: float = 60.0 class FederatedAttestationVerifier: def __init__(self, revocation_fetch, clock=time.time): self._fetch_revocations = revocation_fetch # (issuer, epoch) -> set[str] self._cache: dict[str, CachedValidation] = {} self._revocation_cache: dict[tuple[str, int], tuple[set, float]] = {} self._clock = clock def _current_revocations(self, issuer: str, epoch: int) -> set: key = (issuer, epoch) now = self._clock() hit = self._revocation_cache.get(key) if hit is not None: revoked, fetched_at = hit if now - fetched_at <= 60.0: return revoked try: revoked = self._fetch_revocations(issuer, epoch) except Exception as exc: # Fail closed: we cannot confirm revocation state. raise StaleAttestationError( f"revocation endpoint unreachable for issuer={issuer} epoch={epoch}: {exc}" ) from exc self._revocation_cache[key] = (revoked, now) return revoked def verify(self, w: Warrant, issuer_state: IssuerState, now: Optional[float] = None) -> bool: now = self._clock() if now is None else now if w.expires_at <= now: return False cached = self._cache.get(w.warrant_id) if cached is not None and cached.valid: # INVARIANT: cached validation is reusable only if the issuer # epoch has not advanced since the validation was recorded. if cached.issuer_epoch != issuer_state.current_epoch: # Epoch advanced: cached result is void. Must re-check # revocation state in the current epoch. revoked = self._current_revocations(w.issuer, issuer_state.current_epoch) if w.warrant_id in revoked: self._cache[w.warrant_id] = CachedValidation( w.warrant_id, issuer_state.current_epoch, now, False ) return False # Also re-check every ancestor in the chain. ancestor = w.parent while ancestor is not None: anc_revoked = self._current_revocations( ancestor.issuer, issuer_state.current_epoch ) if ancestor.warrant_id in anc_revoked: self._cache[w.warrant_id] = CachedValidation( w.warrant_id, issuer_state.current_epoch, now, False ) return False ancestor = ancestor.parent self._cache[w.warrant_id] = CachedValidation( w.warrant_id, issuer_state.current_epoch, now, True ) return True # Same epoch: cached result is still usable within exp. return True # No cached validation: perform full check. revoked = self._current_revocations(w.issuer, issuer_state.current_epoch) if w.warrant_id in revoked: self._cache[w.warrant_id] = CachedValidation( w.warrant_id, issuer_state.current_epoch, now, False ) return False self._cache[w.warrant_id] = CachedValidation( w.warrant_id, issuer_state.current_epoch, now, True ) return True def consume(self, w: Warrant, issuer_state: IssuerState) -> None: if not self.verify(w, issuer_state): raise StaleAttestationError( f"warrant {w.warrant_id} from {w.issuer} rejected: " f"stale epoch or revoked in current epoch " f"(current_epoch={issuer_state.current_epoch})" ) ```