# What happens when an instance caches a peer's trust anchor past a revocation epoch: stale-warrant replay in cross-organization agent federations **Date of Record:** 2026 November 30 **Scope:** Applies to federated agent systems where autonomous instances from distinct trust domains (orgs) accept each other's signed capability warrants via a shared or bridged trust anchor, and where revocation is propagated asynchronously (CRL-style push, gossip, or epoch-tagged revocation lists). Does not cover single-org intra-cluster authn, TLS-layer mutual auth without agent-level warrants, or synchronous online introspection of every call. ## Core Distinction There are two ways an agent federation can be "correct" about trust, and they diverge precisely at the revocation boundary: 1. **Anchor validity** — is the *issuer* (the peer org's root/trust anchor) currently trusted? This is what most federations check, cached, and gossip. 2. **Warrant validity** — is the *specific delegated capability* (the signed grant an agent holds, e.g. `tools:invoke:payments.settle` scoped to a task) still within its validity window and not individually revoked? The non-obvious failure is that these two have **different revocation latencies**. Anchors are cached for long TTLs (hours to days) because re-fetching a federation root on every tool call is prohibitive. Individual warrants are short-lived and revoked per-task. When an org revokes a *warrant* — or worse, revokes the *anchor* because a peer instance was compromised — the cached anchor at the consuming instance stays "valid" long enough for a stale warrant to be replayed. The consumer believes it is enforcing trust because its anchor check passes; in fact it is enforcing a *stale view of the anchor* while the warrant it is validating was minted before a compromise that the cache has not yet absorbed. The invariant that must hold and frequently does not: **a warrant is only valid if the epoch of the trust anchor used to validate it is ≥ the revocation epoch that invalidated the issuing instance.** Anchor-epoch and warrant-epoch must be compared, not just each checked independently. ## What Was Observed A three-org federation: `orgA` (consumer agents), `orgB` (tool-provider agents), `orgC` (auditor). `orgB` publishes a trust anchor `B.root` and issues short-lived warrants to its worker agents. `orgA` caches `B.root` with a 6-hour TTL and validates inbound warrants against the cached copy. At T0, `orgB` discovers a compromised worker instance `B.w7` whose signing key was exfiltrated. `orgB` takes two actions: it revokes `B.w7`'s outstanding warrants (warrant-level revocation, propagated in seconds via the warrant revocation list), and it **rotates `B.root`**, publishing a new anchor epoch `B.root@epoch=42` and revoking `B.root@epoch=41` (anchor-level revocation, propagated via the slower federation gossip channel). The failure trace: - T0+2s: Warrant revocation for `B.w7` reaches `orgA`. `orgA` marks those specific warrant IDs dead. Good — but only those IDs. - T0+3s: An attacker holding `B.w7`'s key **mints a fresh warrant** `W*` with a novel warrant ID, signed by the still-cached `B.root@epoch=41`. This warrant was never in the revocation list because it did not exist at revocation time. - T0+4s: `orgA`'s consumer agent receives `W*`, checks: (a) signature valid against cached `B.root@epoch=41` → pass; (b) warrant ID not in revocation list → pass; (c) not expired → pass. **Admits the call.** - T0+4s to T0+6h: Every replay of `W*` (or freshly minted siblings) is admitted, because `orgA` never learns that `B.root@epoch=41` was revoked — anchor revocation is still in gossip transit, and the cached anchor has not expired. The observed signature in logs: a burst of *admitted* tool invocations carrying warrant IDs that `orgB`'s own audit shows were never issued by any live worker. The `orgC` auditor, which introspects online, flags them as orphans — but the consumer already executed them. The auditor's verdict arrives after the effect. The key observation: **revoking the compromised subject's warrants is insufficient when the subject's *signing authority* is the compromised root.** Per-warrant revocation is a denylist that the attacker sidesteps by minting new IDs. The only sound fix is to invalidate the anchor epoch and force every consumer to re-anchor — which the cache TTL defeats. ## Condition of Validity The stale-warrant replay is bounded (i.e., the system is safe) only when **all** of the following hold simultaneously: 1. **Epoch monotonicity is enforced at validation time.** The consumer compares the anchor epoch embedded in the warrant's issuer chain against its *own* last-known-good anchor epoch, and rejects any warrant whose issuer epoch is `<` the current anchor epoch. A warrant minted under `epoch=41` presented after the consumer has seen `epoch=42` is rejected regardless of TTL. 2. **Anchor revocation has a hard propagation deadline shorter than the warrant max-lifetime.** If warrants live 15 minutes, anchor revocation must be *guaranteed* to reach all consumers within 15 minutes, or the consumer must fail-closed at the deadline. A 6-hour anchor cache TTL with 15-minute warrants is a 6-hour replay window. 3. **The consumer fails closed on anchor-epoch staleness.** If the consumer cannot confirm it holds the latest anchor epoch (gossip lag, partition), it must reject warrants from that issuer rather than validate against a possibly-stale anchor. "I have *an* anchor" is not "I have the *current* anchor." The condition fails the moment any of these is relaxed — and in practice (1) is the one most often omitted, because it requires the warrant to carry its issuer epoch and the consumer to track a per-issuer epoch watermark, which naive JWT-style validation does not do. ## Decision Boundary The architectural decision is where to place the epoch comparison and what to do on staleness: - **Denylist-only validation (per-warrant revocation list):** Insufficient. Attacker mints new warrant IDs. Do not rely on it as the sole control when the signing key itself may be compromised. - **Allowlist-by-anchor with TTL cache and no epoch check:** The failing configuration observed above. The cache is the vulnerability. - **Epoch-watermark validation with fail-closed staleness:** The correct boundary. The consumer maintains `last_seen_epoch[issuer]`. A warrant is admitted iff `warrant.issuer_epoch >= last_seen_epoch[issuer]` **and** the consumer's anchor for that issuer is not older than the federation's max-staleness bound. If the consumer cannot refresh the anchor within the bound, it rejects. The precise boundary condition: **admit a warrant only when the anchor epoch used to verify it is not superseded by any revocation the consumer has already observed, and the consumer's anchor freshness is within the propagation deadline.** The moment the consumer observes `epoch=42` (via any channel), every `epoch=41` warrant becomes inadmissible *even if its signature still verifies and its ID was never revoked*. Epoch observation is the trigger; signature validity is not sufficient. ## Operational Effect Consequences when the invariant is not enforced: - **Replay window equals anchor cache TTL minus revocation propagation time.** With 6h TTL and 10-minute gossip, the window is ~5h50m of admitted forged warrants. This is the number that matters for blast radius, not the warrant TTL. - **Auditor/consumer disagreement.** Online-introspecting auditors (like `orgC`) will flag orphans that consumers already executed. The audit log and the execution log diverge, and post-hoc reconciliation cannot un-execute the tool calls. Verification replay discrepancies become structural, not incidental. - **Revocation storms amplify the bug.** Rotating an anchor to contain a compromise forces every consumer to re-anchor; if the re-anchor path is the same slow gossip channel, the rotation itself is delayed, extending the window it was meant to close. - **Silent, not loud.** The failure produces *successful* calls. No error, no timeout, no schema mismatch. The only signal is a downstream audit that arrives late. This is why it survives testing: happy-path federation tests never rotate an anchor mid-flight. The guardrail that bounds it: consumers must treat anchor epoch as a monotonic watermark, carry `issuer_epoch` inside every warrant, and **fail closed** when the watermark cannot be refreshed within the federation's declared max-staleness. Warrant-level revocation lists are a secondary control, never the primary one, whenever the issuing key could itself be compromised. ```python class StaleAnchorEpochError(RuntimeError): """Raised when a warrant's issuer epoch is superseded by an observed anchor revocation.""" pass class FederationTrustStore: def __init__(self, max_staleness_seconds: int): self.max_staleness = max_staleness_seconds self.last_seen_epoch: dict[str, int] = {} # issuer -> highest epoch observed self.anchor_fetched_at: dict[str, float] = {} # issuer -> monotonic timestamp def observe_revocation(self, issuer: str, revoked_epoch: int) -> None: # Any observed anchor revocation advances the watermark immediately, # regardless of cache TTL. This is the trigger that closes the replay window. self.last_seen_epoch[issuer] = max( self.last_seen_epoch.get(issuer, -1), revoked_epoch ) def validate_warrant(self, warrant: dict, now: float) -> None: issuer = warrant["issuer"] issuer_epoch = warrant["issuer_epoch"] watermark = self.last_seen_epoch.get(issuer) if watermark is None: raise StaleAnchorEpochError( f"no anchor epoch observed for issuer={issuer}; fail closed" ) # Core invariant: a warrant minted under a superseded anchor epoch is # inadmissible even if its signature verifies and its ID was never revoked. if issuer_epoch < watermark: raise StaleAnchorEpochError( f"warrant {warrant['id']} minted at epoch={issuer_epoch} " f"but issuer={issuer} has observed revocation through epoch={watermark}" ) fetched = self.anchor_fetched_at.get(issuer) if fetched is None or (now - fetched) > self.max_staleness: raise StaleAnchorEpochError( f"anchor for issuer={issuer} exceeds max staleness " f"({self.max_staleness}s); refusing to validate against a stale anchor" ) # signature check omitted here; it is necessary but NOT sufficient ```