# How does an instance detect a revoked trust anchor during cross-org agent federation when policy attestations are cached beyond the anchor's validity window **Date of Record:** 2026 November 25 **Scope:** Applies to federated agent-to-agent handshakes where a relying agent (R) validates a peer agent (P) via a chain of trust anchors and signed policy attestations exchanged across organizational boundaries. Does not apply to single-org deployments or to purely symmetric shared-secret setups with no external anchor authority. ## Core Distinction The failure here is not "the peer's certificate expired." It is subtler: the **policy attestation** that R caches is cryptographically valid (its signature verifies against the anchor's public key) but **semantically stale** because the anchor that signed it was revoked *after* the attestation was issued, and R's cache honors the attestation's own `not_after` rather than the anchor's revocation epoch. In a normal TLS/PKI model, revocation is checked at handshake time against a CRL/OCSP responder and short-circuits the whole chain. In agent federation, the attestation is typically a *long-lived, self-contained JWT-like artifact* describing the peer's permitted tool surface, data-scope grants, and delegation depth. R caches it because re-fetching and re-verifying the full anchor chain on every tool invocation is prohibitively expensive (each anchor lookup may be a cross-org RPC with 200–800 ms latency, and a single agent turn may fan out to dozens of peers). The cache is keyed on `(peer_id, attestation_hash)` and evicted on `not_after`. Revocation of the *anchor* does not touch that key. So R continues to honor a policy grant whose issuing authority has been disavowed by its own root. ## What Was Observed A federation between org A (root anchor `A-root`, delegated issuer `A-issuer-7`) and org B (relying agent `B-orch`). `A-issuer-7` signed a policy attestation for peer `A-worker-3` granting `tools: [db.read, db.write]`, `scope: tenant=42`, `delegation_depth: 2`, `not_after: T+72h`. `B-orch` cached it at T+0 after a successful chain walk: `A-worker-3 ← A-issuer-7 ← A-root`, with `A-root`'s key pinned in B's trust store. At T+9h, org A's security team revoked `A-issuer-7` (key compromise suspected) and published a revocation record to its anchor endpoint. `B-orch` never re-walked the chain because the cached attestation had 63 hours of nominal validity left. For the next ~14 hours, `A-worker-3` (now operating under a compromised issuer key, in the incident) continued to receive `db.write` grants scoped to `tenant=42` from `B-orch`. The first signal `B-orch` produced was **not** a validation error — it was an anomalous write-volume alert from the downstream data plane, 14 hours late. The mechanical tell, once instrumented, was a divergence between two clocks: the attestation's `issued_at` (T-0) predated the anchor's `revoked_at` (T+9h), yet the cache TTL was computed solely from `not_after - now`. The invariant "an attestation is only as valid as its issuer's current standing" was never encoded anywhere in the cache key or the eviction predicate. ## Condition of Validity The cached-attestation shortcut is only sound under the conjunction: 1. **Anchor stability:** no anchor in the walked chain (`A-root`, `A-issuer-7`) has a revocation epoch `≤ now`. This requires R to *know* the revocation epoch, which means either (a) a push channel from A to B, or (b) a bounded-staleness pull (`max_revocation_age`), and R must treat the cache as invalid whenever `now - last_revocation_check > max_revocation_age`. 2. **Attestation monotonicity:** the attestation's `issued_at` must be `≥` the anchor's `last_key_rotation` — otherwise the attestation was signed under a key the issuer itself may have superseded. 3. **Delegation depth closure:** `delegation_depth` in the cached attestation must still admit the current call's depth; a cached `depth: 2` grant does not authorize a chain that has since grown to depth 3. If any of these is unverifiable at call time, the cached attestation must be treated as **unproven**, not as **valid-until-not_after**. The common error is to conflate "signature verifies" with "grant is live." Signature verification is a *local, offline* check; liveness is a *remote, time-varying* property. Caching collapses the two. ## Decision Boundary The boundary R must enforce is between **cache hit** and **cache hit with unverified issuer liveness**. Concretely, on every tool invocation authorized by a cached attestation, R must evaluate: - If `now - last_anchor_check ≤ max_revocation_age` **and** no revocation push has arrived since the last check → permit (fast path). - If `now - last_anchor_check > max_revocation_age` → **fail closed** and force a synchronous re-walk of the anchor chain before permitting. Do not silently extend the TTL. - If a revocation push arrives for any anchor in the cached chain → **evict all attestations transitively signed by that anchor**, not just the anchor record itself. The last clause is where implementations break: revocation handlers typically delete the anchor entry but leave dependent attestations in the cache, because the cache index is keyed on `(peer_id, attestation_hash)` and has no reverse index from `anchor_id → attestations`. Without a reverse index, eviction is incomplete and the stale grant survives. ## Operational Effect With `max_revocation_age` set to 15 minutes and a reverse index `anchor_id → [attestation_hash]`, the T+9h revocation would have forced a re-walk by T+9h15m, evicting `A-worker-3`'s grant and halting the unauthorized `db.write` calls within one bounded staleness window instead of 14 hours. The cost is a periodic cross-org anchor RPC per active peer — measurable but bounded, and amortizable by batching anchor checks across all peers sharing a root. The durable lesson: in cross-org federation, **the cache key must include the issuer's liveness epoch, not just the artifact's expiry.** An attestation is a claim about a peer *at issuance time*; honoring it later is a bet that the issuer still stands. That bet must be re-underwritten on a clock the relying org controls, not one the issuing org wrote into the artifact. ```python from dataclasses import dataclass from datetime import datetime, timedelta class StaleTrustAnchorError(RuntimeError): """Raised when a cached policy attestation is honored past the issuer's liveness bound.""" @dataclass class CachedAttestation: peer_id: str attestation_hash: str issuer_anchor_id: str issued_at: datetime not_after: datetime last_anchor_check: datetime delegation_depth: int class FederationCache: def __init__(self, max_revocation_age: timedelta): self.max_revocation_age = max_revocation_age self._by_peer: dict[str, CachedAttestation] = {} self._by_anchor: dict[str, set[str]] = {} def store(self, att: CachedAttestation) -> None: self._by_peer[att.peer_id] = att self._by_anchor.setdefault(att.issuer_anchor_id, set()).add(att.peer_id) def revoke_anchor(self, anchor_id: str) -> None: # Reverse-index eviction: drop every attestation transitively signed by the anchor. for peer_id in self._by_anchor.pop(anchor_id, set()): self._by_peer.pop(peer_id, None) def authorize(self, peer_id: str, required_depth: int, now: datetime) -> CachedAttestation: att = self._by_peer.get(peer_id) if att is None: raise StaleTrustAnchorError(f"no cached attestation for {peer_id}") if now >= att.not_after: raise StaleTrustAnchorError(f"attestation for {peer_id} expired at {att.not_after}") # The critical invariant: issuer liveness must be re-underwritten within the bound. if now - att.last_anchor_check > self.max_revocation_age: raise StaleTrustAnchorError( f"issuer {att.issuer_anchor_id} liveness unverified since " f"{att.last_anchor_check}; cache age {now - att.last_anchor_check} " f"exceeds max {self.max_revocation_age}" ) if att.delegation_depth < required_depth: raise StaleTrustAnchorError( f"cached depth {att.delegation_depth} < required {required_depth}" ) return att ```