# How should an instance detect a revoked agent card when the federation trust anchor has already rotated **Date of Record:** 2026 December 3 **Scope:** Applies to federated agent systems where peer identity is asserted via signed agent cards (e.g., A2A-style `AgentCard` documents) whose signatures chain to a per-org trust anchor, and where revocation is expressed as a signed revocation entry rather than a live lookup. Does not apply to single-org deployments with a shared CA and synchronous OCSP-style revocation checking, nor to ephemeral single-turn agents that never persist a peer card. ## Core Distinction There are two structurally different questions that get conflated under "is this peer trustworthy": 1. **Signature validity** — does the card's signature chain resolve to *some* anchor that the verifier currently trusts? 2. **Revocation currency** — has the issuing org, *at or after the moment that anchor was published*, withdrawn this specific card? A card can be perfectly signature-valid against a rotated anchor while being revoked under the anchor it was actually signed against. This is the boundary: **the trust anchor is a moving reference frame, but the revocation record is anchored to a fixed point in the anchor's history.** When the anchor rotates, the revocation graph and the trust graph desynchronize, and a naive verifier will accept a revoked card because it re-validates the signature against the *new* anchor while never re-binding the revocation check to the *old* one. The non-obvious invariant is this: **revocation is scoped to the anchor generation under which the card was issued, not to whatever anchor the verifier happens to hold at verification time.** Any verifier that checks revocation against the current anchor alone has a window — bounded by anchor rotation cadence — in which revoked cards verify clean. ## What Was Observed A federation of three orgs (call them Alpha, Beta, Gamma) exchanged signed agent cards. Each org published a trust anchor (`anchor_vN`) with a `valid_from`/`valid_until` and a monotonically increasing generation counter, plus a signed revocation log (`revocations_vN`) that listed `card_id` hashes with a `revoked_at` timestamp and the `anchor_generation` under which the card had been issued. The failure sequence: 1. Alpha issued `card_A17` to agent `alpha-scheduler` under `anchor_v3`. The card's signature covered `{card_body, anchor_generation: 3}`. 2. Alpha rotated to `anchor_v4` (routine key hygiene), publishing `revocations_v4` — which, critically, only enumerated revocations *newly asserted since v4*. The v3 revocation log remained published but was no longer the "current" log. 3. Alpha revoked `card_A17` (the scheduler leaked its key). The revocation was appended to `revocations_v4` referencing `anchor_generation: 3` — the generation the card was issued under. 4. Beta's verifier held `anchor_v4` (it had refreshed on rotation) and fetched `revocations_v4`. The revocation entry for `card_A17` was present, **but Beta's verifier filtered revocation entries by `entry.anchor_generation == current_anchor.generation`**, discarding the v3-scoped entry as "stale." The card verified clean. 5. Beta's `beta-orchestrator` accepted a task delegation from the compromised `alpha-scheduler` for roughly 40 minutes until Alpha's incident response manually pushed a re-signed card list to Beta out of band. The mechanics of the miss: the verifier's revocation filter was written to guard against *replaying old revocations* (a legitimate concern — a v2 revocation should not be applied to a re-issued v4 card with the same `card_id`). The guard was correct in intent but wrong in scope: it compared the revocation's generation to the *current* anchor generation rather than to the *card's* generation. A card issued at generation 3, verified at generation 4, needs revocations from generation 3 *and* 4 and all generations in between — a range, not a point. ## Condition of Validity The invariant holds — and the failure is reachable — precisely when all of the following are true: - Cards are issued under a specific anchor generation and the signature binds that generation (so the card cannot be silently re-scoped to a newer anchor). - Revocation logs are partitioned per anchor generation rather than being a single monotonic append-only log. - The verifier refreshes its anchor on rotation *before* it refreshes its revocation view (the common ordering, since anchors are small and fetched eagerly). - Revocation entries carry an `anchor_generation` field that the verifier uses as a filter key. If revocation is a single global append-only log keyed only by `card_id` hash (no generation partition), the desync cannot occur — but then replay protection must come from elsewhere. The failure is the specific tax paid for partitioning revocation to get replay protection. ## Decision Boundary The guardrail is a **generation-range revocation check**, not a point check. A verifier must, for a card issued at generation `g_card` and verified against current anchor generation `g_now`: - Accept revocation entries with `g_card <= entry.anchor_generation <= g_now`. - Treat a *missing* revocation log for any generation in `[g_card, g_now]` as **fail-closed** (cannot prove non-revocation ⇒ do not accept), not fail-open. - Reject a card whose `g_card` is not within the current anchor's accepted history window; if the anchor history has been pruned past `g_card`, the card is unverifiable and must be re-issued, not grandfathered. The subtle half: **fail-closed on missing intermediate logs**. The Beta incident was not caused by a present-but-mis-filtered entry alone; it was caused by the verifier treating "no matching entry after filter" as "not revoked." Absence of a revocation entry is only meaningful if the log for that generation is *known complete*. A signed log carries a `sequence_end`; the verifier must confirm it holds the log through `sequence_end` for every generation in range, or refuse. ## Operational Effect Downstream, this changes three things an agent runtime must do: - **Card cache entries must be keyed by `(card_id, anchor_generation)`**, not `card_id` alone. A cached "valid" verdict from before a rotation is not reusable after it, because the revocation range has widened. - **Anchor refresh must trigger revocation-range re-evaluation** for every cached peer card whose `g_card` is now inside a widened range. Rotation is a revocation-relevant event, not merely a key-hygiene event. - **Handoff warrants must carry the anchor generation** they were minted under, so a receiving agent can reconstruct the same range check on the peer's behalf. A warrant that says "peer X is trusted" without the generation is unverifiable after rotation. The bounded guarantee: with generation-range checking and fail-closed-on-gap, the revocation window collapses to the anchor-propagation latency (the time for the new anchor plus its revocation log to reach every verifier), not the rotation cadence. Without it, the window is the rotation period — which, for orgs that rotate quarterly, is a quarter of silent acceptance. ```python from __future__ import annotations from dataclasses import dataclass from typing import Iterable class RevocationRangeError(RuntimeError): """Raised when a card's revocation status cannot be established across the full anchor-generation range [g_card, g_now].""" @dataclass(frozen=True) class Anchor: generation: int valid_from: float valid_until: float @dataclass(frozen=True) class RevocationEntry: card_id: str anchor_generation: int revoked_at: float @dataclass(frozen=True) class RevocationLog: anchor_generation: int sequence_end: int # last sequence number this log is known complete through entries: tuple[RevocationEntry, ...] @dataclass(frozen=True) class AgentCard: card_id: str anchor_generation: int # generation bound into the signature signature: bytes def verify_not_revoked( card: AgentCard, current_anchor: Anchor, logs: dict[int, RevocationLog], ) -> None: """Fail-closed generation-range revocation check. Accepts revocation entries with g_card <= entry.anchor_generation <= g_now. Refuses (raises) if any generation in the range lacks a complete log. """ g_card = card.anchor_generation g_now = current_anchor.generation if g_card > g_now: raise RevocationRangeError( f"card {card.card_id!r} issued at generation {g_card} " f"postdates current anchor generation {g_now}" ) # Every generation in the range must have a log we hold through its end. for gen in range(g_card, g_now + 1): log = logs.get(gen) if log is None: raise RevocationRangeError( f"missing revocation log for generation {gen}; " f"cannot prove non-revocation of {card.card_id!r} " f"(range {g_card}..{g_now})" ) if log.sequence_end < 0: raise RevocationRangeError( f"revocation log for generation {gen} has no verified " f"sequence_end; treating as incomplete" ) # Any revocation entry for this card anywhere in the range is fatal. for gen in range(g_card, g_now + 1): log = logs[gen] for entry in log.entries: if entry.card_id == card.card_id and entry.anchor_generation == gen: raise RevocationRangeError( f"card {card.card_id!r} revoked at generation {gen} " f"(revoked_at={entry.revoked_at}); current anchor " f"generation is {g_now}" ) def filter_revocations_naive( card: AgentCard, current_anchor: Anchor, log: RevocationLog, ) -> Iterable[RevocationEntry]: """The buggy pattern: point-check against current generation only. Retained here as the anti-pattern the range check replaces. A card issued at generation 3, revoked via a generation-3 entry, but verified against a generation-4 log, yields no match and is silently accepted. """ return ( e for e in log.entries if e.anchor_generation == current_anchor.generation ) ```