# When must an instance distrust a rotated peer key: revocation lag across federated AAIF trust anchors **Date of Record:** 2026 November 28 **Scope:** Applies to autonomous agents that authenticate peer instances via federated Agent Identity Federation (AAIF) trust anchors and that accept key rotations signaled through asynchronous anchor gossip. Does not apply to single-anchor deployments or to sessions where peer identity is established once per long-lived process and never re-validated. ## Core Distinction A key rotation and a key revocation are both "the peer's key changed," but they carry opposite trust semantics, and federated AAIF anchors propagate them through the same gossip channel with the same eventual-consistency guarantees. The distinction that matters at the agent layer is not *whether* the anchor set has converged but *whether the local instance can prove the new key was minted by the same principal that held the old one*. A rotation is a continuity claim: the same principal, a successor key, a signed chain from old to new. A revocation is a discontinuity claim: the old key must no longer be honored, with no successor required. Agents that treat both as "update the peer's key material and continue" collapse these two into one state transition and will silently accept a revoked-then-rotated identity as if it were a legitimate rotation. The invariant is that a rotation is only valid if it is *chained* to a key the local instance still trusts at the moment of evaluation—and revocation must be evaluated against the chain, not merely against the current key. ## What Was Observed During a multi-region deployment, an auditor agent (`aud-7`) held a cached session with a worker agent (`wrk-3`) whose identity was anchored at federation member `anchor-eu`. The peer key for `wrk-3` was rotated at T+0 and the rotation was signed by `wrk-3`'s prior key, then gossiped to `anchor-us` and `anchor-ap`. At T+40s, `anchor-eu` suffered a partition and, on the far side of the partition, issued a revocation for the *pre-rotation* key of `wrk-3` (a suspected host compromise reported out of band). The revocation reached `anchor-us` at T+95s but not `anchor-eu`'s own peers, and the rotation reached `anchor-ap` at T+60s. `aud-7` re-validated `wrk-3` at T+120s against its local anchor view, which by then contained the rotation (via `anchor-ap`) but *not* the revocation (which was still queued behind the partition heal). The local resolver found a valid successor key chained from the old key, marked the session trusted, and continued. At T+180s the revocation arrived at `aud-7`'s anchor view, but the resolver's rotation path had already advanced `wrk-3`'s trusted-key set to the successor and had *dropped the predecessor from the chain* as an optimization ("only the leaf key matters for session validation"). The revocation named the predecessor. The resolver had no chain entry to match it against, treated it as a revocation for an unknown key, and logged it as a no-op. `aud-7` continued to accept `wrk-3` for another 14 minutes, across 3,100 tool-call handoffs, until the session was terminated by an unrelated timeout. The failure trace is precise: rotation pruned the chain; revocation targeted a pruned node; the resolver's no-op path for unknown-key revocations was designed for *stale* revocations, not for *chained* ones. The two design assumptions—"only the leaf key matters" and "unknown-key revocations are stale"—were individually reasonable and jointly fatal. ## Condition of Validity The invariant that bounds this failure is a *retained-chain* invariant: a local instance may advance a peer's trusted leaf key via rotation only if it retains every node of the signed rotation chain from the originally-anchored key to the new leaf, and it must evaluate every incoming revocation against the full retained chain, not just the leaf. This is valid under three conditions: 1. The rotation chain is cryptographically signed end-to-end by each predecessor key (so a successor cannot be minted without the predecessor's cooperation or compromise). 2. Revocations are keyed by the *specific key identifier* they revoke, not by principal, so a revocation for a predecessor is distinguishable from a revocation for the current leaf. 3. The local instance's trust decision for a session is a function of the full chain state, not the leaf state alone. When any of these fails—unsigned rotation hops, principal-keyed revocations, or leaf-only trust evaluation—the invariant does not hold and the instance must fall back to treating *any* revocation event touching the peer's principal as a session-invalidating event until the anchor set is known-converged. The fallback is expensive (it forces re-authentication against a quorum of anchors) but it is the only safe state when the chain cannot be proven. ## Decision Boundary The boundary is not "has the rotation arrived" but "can I still name the key the revocation will target." Concretely, an instance must retain the predecessor chain for at least the maximum revocation-propagation window across all federated anchors in its trust set—not the mean, not the local anchor's window, but the slowest anchor's worst-case gossip latency plus its partition-heal bound. In the observed deployment, `anchor-eu`'s partition-heal bound was 240s; the resolver's chain-retention window was 30s. That mismatch, not the partition itself, is the decision boundary. Below the retention window, the instance is safe to advance the leaf. Above it, the instance has either (a) retained the chain and can correctly match the revocation, or (b) exceeded retention and must treat the peer as unverifiable until quorum re-validation. The corollary is that retention windows are a *federation-level* parameter, not a per-anchor one. An instance that trusts three anchors must size its retention to the maximum of their propagation bounds; sizing to its "home" anchor's bound is the specific error that produced the 14-minute window of misplaced trust. ## Operational Effect The operational consequence is that rotation handling and revocation handling must be co-designed at the resolver, and the resolver must expose chain state to the session validator rather than a flattened leaf identity. In practice this means: the session validator's trust predicate takes the full chain and the set of revocations observed since the chain was established; a revocation matching any chain node invalidates the session and forces quorum re-validation; a rotation that would prune a chain node is rejected unless the node is older than the federation-wide retention bound. The cost is bounded memory per peer (chain depth is typically 2–4) and a re-validation path that is exercised rarely but must be correct when it fires. The failure mode when this is skipped is not a crash but a *silent continuity*: the instance believes it has verified a peer it has actually only verified against a pruned, unreachable history. ```python import time from dataclasses import dataclass, field from typing import Optional class ChainPrunedRevocationError(RuntimeError): """Raised when a revocation targets a key no longer present in the retained rotation chain.""" pass @dataclass class RotationNode: key_id: str signed_by: Optional[str] # predecessor key_id; None for anchor root minted_at: float @dataclass class PeerChain: principal: str nodes: list = field(default_factory=list) # oldest -> newest retained_until: float = 0.0 def leaf(self) -> RotationNode: return self.nodes[-1] def contains(self, key_id: str) -> bool: return any(n.key_id == key_id for n in self.nodes) class FederatedResolver: def __init__(self, federation_retention_bound_s: float): # MUST be max over all trusted anchors' worst-case gossip+heal bounds, # not the local anchor's bound. self.retention_bound = federation_retention_bound_s self.chains: dict[str, PeerChain] = {} self.revocations: set[str] = set() def register_root(self, principal: str, key_id: str, now: float) -> None: self.chains[principal] = PeerChain( principal=principal, nodes=[RotationNode(key_id=key_id, signed_by=None, minted_at=now)], retained_until=now + self.retention_bound, ) def apply_rotation(self, principal: str, new_key_id: str, signed_by: str, now: float) -> None: chain = self.chains[principal] if not chain.contains(signed_by): raise ChainPrunedRevocationError( f"rotation for {principal} signed by unknown predecessor {signed_by}" ) # Retain the predecessor; do NOT prune to leaf-only. chain.nodes.append(RotationNode(new_key_id, signed_by, now)) chain.retained_until = max(chain.retained_until, now + self.retention_bound) def apply_revocation(self, principal: str, revoked_key_id: str, now: float) -> None: chain = self.chains[principal] if now > chain.retained_until: # Retention window exceeded: cannot prove chain state. Fail closed. raise ChainPrunedRevocationError( f"revocation for {principal}:{revoked_key_id} arrived after " f"retention bound; chain state unprovable, force quorum re-validation" ) if not chain.contains(revoked_key_id): # Unknown key inside a live retention window is NOT a stale no-op; # it means we pruned a node we should have kept. raise ChainPrunedRevocationError( f"revocation for {principal}:{revoked_key_id} not in retained chain" ) self.revocations.add(revoked_key_id) def session_trusted(self, principal: str) -> bool: chain = self.chains[principal] # Trust is a function of the full chain, not the leaf. return not any(n.key_id in self.revocations for n in chain.nodes) ```