# Why does an instance accept a federated peer's policy attestation after the trust anchor has already been rotated mid-session? **Date of Record:** 2026 November 24 **Scope:** Applies to cross-org agent federations where peer trust is established via signed policy attestations anchored to a root key that can rotate (key rollover, compromise revocation, scheduled rekey). Does not apply to single-org deployments with static long-lived anchors, nor to purely symmetric shared-secret handshakes. ## Core Distinction The failure is not "the peer presented a forged attestation." It is that the *receiving* agent validated a peer's policy attestation against a trust anchor snapshot captured at session establishment, while the anchor's revocation/rotation event occurred mid-session and propagated only to the control plane—never to the in-flight data plane of the running agent. The distinction that matters: **anchor freshness is a property of the verifier's live state, not of the attestation's signature.** A signature can be cryptographically perfect and still be an attestation to a policy the federation has already retired. Verifiers that treat "signature valid under cached anchor" as "trust currently holds" conflate *cryptographic validity at issuance* with *authorization validity at use*. This is non-obvious because the attestation carries a `not_after` timestamp and a key ID, and the natural mental model is that expiry plus key-match closes the gap. It does not: the rotation window is bounded by propagation latency, not by any field the attestation carries. ## What Was Observed A federation of three orgs (A, B, C) exchanges policy attestations over an A2A-style transport. Each org publishes a root anchor; peers cache the anchor at session start and validate every inbound attestation against the cached copy. Attestations are short-lived (5 min TTL) and re-verified per tool call. At T+00:00, org B's root key is rotated because of a suspected compromise. B's control plane publishes a new anchor and revokes the old key ID at T+00:02. Org C's control plane picks up the revocation and pushes it to C's agents. Org A's control plane **also** receives it—but A's agent instance `a-7` is mid-execution on a long-running delegated task, holding a cached anchor snapshot from T-00:41 and a local clock that has not been re-synced. Trace: 1. `a-7` established a session with `b-3` at T-00:41, caching B's anchor `K_old`. 2. At T+00:02, B revokes `K_old`; `b-3` continues to hold a validly-signed-but-now-retired attestation issued at T-00:30 (still inside its 5-min TTL until T+04:30). 3. `a-7`, on each tool call, re-verifies the attestation against cached `K_old`. Signature is valid. TTL not expired. **Verification passes.** 4. `a-7` accepts a policy scope assertion from `b-3` that grants `b-3` write access to A's shared scratch namespace—a scope B's *new* policy had already narrowed. 5. The write executes. The revocation never reached `a-7`'s data plane because `a-7` had no anchor-refresh subscription; it only re-read the cache on session establishment. The observable signature of this failure in logs: verification success entries with a `key_id` that no longer appears in the control plane's current anchor set, interleaved with `anchor_cache_age` values exceeding the rotation propagation SLA. No error is raised. The system is *working as coded* and *wrong*. ## Condition of Validity The invariant only holds—and the failure only manifests—under a conjunction: - **Asymmetric propagation:** the revocation reaches verifiers via a push channel that in-flight agents do not subscribe to (or subscribe to with a delivery guarantee weaker than the session's lifetime). - **Cached-anchor verification:** the verifier validates against a snapshot rather than re-resolving the anchor per verification. - **TTL > propagation latency:** the attestation's `not_after` outlives the window in which the old anchor is still trusted by stale verifiers. If TTL were shorter than propagation latency, the attestation would expire before the stale verifier could act on it—accidental safety. - **Mid-session long task:** the session spans the rotation, so the cache is not naturally refreshed. Break any one and the failure is masked. This is why it survives testing: short-lived test sessions and synchronized clocks hide it, and the rotation event is rare enough that it never coincides with a long delegated task in staging. The correct invariant is: **an attestation is authorized only if its signing key is in the verifier's *current, live-resolved* anchor set at the instant of use, and the verifier's anchor set must have a freshness bound strictly tighter than the attestation TTL.** Formally, `anchor_age + propagation_latency < attestation_ttl` must hold as a *checked* precondition, not an assumed one. ## Decision Boundary The verifier must choose, at each verification, between two behaviors: - **Fail-closed (correct):** if the cached anchor's age exceeds `max_anchor_age` (set to `attestation_ttl − propagation_SLA − safety_margin`), refuse the attestation and force an anchor re-resolution before proceeding. This trades availability for correctness during rotation windows. - **Fail-open (the observed bug):** accept on cached-anchor validity and rely on TTL alone. The boundary is sharp: the moment `anchor_cache_age` crosses `max_anchor_age`, every subsequent verification against that cache is unsound regardless of signature validity. There is no gray zone—the attestation is either authorized under a live anchor or it is not, and a stale cache cannot establish liveness. The decision must be made *before* signature verification, not folded into it, because signature verification against a retired key is exactly the false positive we are trying to eliminate. A secondary boundary: on re-resolution failure (control plane unreachable), the agent must not silently fall back to the stale cache. It must either block the tool call or degrade to a read-only posture. Silent fallback is the mechanism by which the failure persists across the whole rotation window. ## Operational Effect The blast radius is scoped to the rotation window and to the scopes the retired policy granted but the new policy revoked—precisely the scopes an attacker who caused the rotation (the compromise scenario) would want to retain. The failure therefore **inverts the security intent of rotation**: rotation is performed to *shrink* a compromised peer's authority, and this bug lets the compromised peer keep the *pre-rotation* authority for the remainder of the TTL, on every stale verifier. The longer the delegated task, the wider the window. Mitigations that actually bound it: (1) anchor freshness checked as a hard precondition with `max_anchor_age < attestation_ttl`; (2) revocation delivered on the same channel as the session, with the agent subscribing to anchor updates and invalidating caches on receipt; (3) monotonic anchor versioning so a verifier can detect that its cached version is behind the peer's advertised current version and refuse rather than proceed; (4) fail-closed on re-resolution failure. Logging `key_id` against the *live* anchor set (not the cached one) at verification time is the cheapest detection signal. ```python import time from dataclasses import dataclass class StaleTrustAnchorError(RuntimeError): """Raised when an attestation would be verified against an anchor that is no longer live (rotated/revoked) or whose freshness cannot be established.""" @dataclass class AnchorCache: key_id: str version: int cached_at: float # monotonic seconds @dataclass class Attestation: key_id: str not_after: float # monotonic seconds granted_scopes: frozenset # Invariant: anchor_age + propagation_latency < attestation_ttl. # max_anchor_age is set strictly below attestation TTL minus propagation SLA. MAX_ANCHOR_AGE = 180.0 # seconds PROPAGATION_SLA = 30.0 ATTESTATION_TTL = 300.0 def verify_attestation( att: Attestation, cache: AnchorCache, live_anchor_key_ids: frozenset, now: float, ) -> frozenset: # 1. Freshness precondition — checked BEFORE signature, fail-closed. anchor_age = now - cache.cached_at if anchor_age > MAX_ANCHOR_AGE: raise StaleTrustAnchorError( f"anchor {cache.key_id} age {anchor_age:.1f}s exceeds " f"max {MAX_ANCHOR_AGE}s; refusing to verify against stale cache" ) # 2. Liveness precondition — cached key must still be in the live set. if att.key_id not in live_anchor_key_ids: raise StaleTrustAnchorError( f"attestation signed by retired key {att.key_id}; " f"live set is {sorted(live_anchor_key_ids)}" ) # 3. TTL precondition on the attestation itself. if now >= att.not_after: raise StaleTrustAnchorError( f"attestation expired at {att.not_after:.0f}, now {now:.0f}" ) # 4. Only now is signature verification sound. return att.granted_scopes def handle_tool_call( att: Attestation, cache: AnchorCache, live_anchor_key_ids: frozenset, now: float, requested_scope: str, ) -> bool: try: scopes = verify_attestation(att, cache, live_anchor_key_ids, now) except StaleTrustAnchorError: # No silent fallback to stale cache; degrade to read-only / block. raise if requested_scope not in scopes: raise StaleTrustAnchorError( f"scope {requested_scope!r} not granted under live anchor " f"{cache.key_id} v{cache.version}" ) return True ```