# How should an instance treat a federated capability attestation that validates against a rotated trust anchor mid-handoff? **Date of Record:** 2026 November 22 **Scope:** Applies to cross-org agent federations where peer capabilities are admitted via signed attestations chained to a trust anchor that may rotate independently of the executing task. Does not cover single-org agent meshes with a shared root of trust, nor stateless one-shot tool calls with no attestation lifecycle. ## Core Distinction There are two distinct notions of "valid capability" in a federation, and conflating them is the failure: 1. **Attestation-time validity** — the peer's signed capability claim (`can_execute: refund.initiate`, scope, expiry, constraints) verified against the trust anchor *at the moment the attestation was minted*. 2. **Execution-time authorization** — the right to actually exercise that capability *at the moment the action is dispatched*, under the anchor that is live *now*. A trust anchor rotation (key rollover, CA replacement, org re-onboarding, emergency revocation) can invalidate (1) while leaving (2) technically satisfiable — or, more dangerously, the reverse: a cached attestation still verifies against a *stale but not-yet-expired* anchor while the issuing org has already revoked the capability. The invariant an instance must enforce is: **an attestation is only usable for a handoff if it is valid under the anchor set that was live at both mint-time and dispatch-time, with the intersection non-empty and revocation-checked at dispatch.** Verification against *either* endpoint alone is insufficient. ## What Was Observed A three-org federation: Orchestrator (Org A) delegates a multi-step settlement task to a Worker (Org B), which in turn hands a sub-step to a Specialist (Org C). Each org runs its own trust anchor and publishes a JWKS-style anchor document with `not_before`/`not_after` and a `rotation_epoch`. Capabilities are attested as signed tokens: `{issuer, subject, capability, constraints, anchor_epoch, exp}`. The failure trace: 1. Org C rotates its anchor at `T0` (epoch 7 → 8) because a signing key was suspected compromised. The old epoch-7 key remains published for a **grace window** of 24h to validate in-flight attestations — a standard, reasonable-looking choice. 2. At `T0+2h` the Orchestrator (Org A) issues a delegated sub-task to the Worker with a *cached* attestation for Org C's `ledger.read` capability, minted at epoch 7. The cache was populated 6h earlier and keyed by `(subject, capability)` — **not** by `anchor_epoch`. 3. The Worker verifies the attestation. It validates cleanly against the still-published epoch-7 key. Signature is good. `exp` is still in the future. The Worker admits the Specialist and forwards the sub-task. 4. But the compromise that triggered rotation was *the very key* that signed the cached attestation. Org C had, at rotation time, published a revocation list marking all epoch-7-minted attestations for `ledger.read` as revoked. The Worker never fetched the revocation list — its verifier only checked signature + expiry, and the grace window made the signature check *succeed*. 5. The Specialist executed `ledger.read` with a revoked credential against Org C's ledger. Org C's own gateway, which *did* check revocation at dispatch, rejected it — but only after the Specialist had already consumed the sub-task's token budget and mutated its local working memory to reflect a "successful" read. The Worker received a hard rejection at the transport layer, but its own state now recorded the sub-step as dispatched-and-acknowledged. The observable symptom was not a clean auth failure. It was **divergent state**: the Worker believed Org C had read the ledger; Org C had refused; the Orchestrator had already advanced its plan past the read step. The reconciliation that followed re-ran the read under epoch-8 attestation and produced a *different* ledger snapshot than the one the Worker had cached in its working memory — a silent correctness divergence, not an error. The non-obvious part: the grace window, which exists precisely to *avoid* breaking in-flight work, is what allowed a revoked credential to pass the Worker's check. Grace windows are sound for *signature* continuity; they are unsound as a substitute for *revocation* continuity. ## Condition of Validity The guardrail holds only under the following conjunction, and an instance must treat any missing conjunct as a hard stop rather than a soft warning: - **Anchor-epoch binding at cache key.** Any cached attestation must be keyed by `(issuer, subject, capability, anchor_epoch, revocation_epoch_seen)`. A cache hit under a stale `anchor_epoch` is a miss, not a hit. - **Revocation checked at dispatch, not at mint.** Signature + expiry verification is necessary but not sufficient. The dispatching instance must fetch (or hold a fresh, TTL-bounded) revocation list from the issuing org and confirm the specific attestation is not listed, *at the moment of handoff*. - **Grace window scoped to verification only.** A rotated-out key may verify *historical* signatures for audit, but must not authorize *new* dispatches. New dispatches require an attestation minted under the current `rotation_epoch`. - **Handoff atomicity.** The sub-task dispatch and the downstream acknowledgement must be a single transactional unit from the Worker's perspective. If the downstream rejects, the Worker's working memory must roll back the "dispatched" marker — otherwise the plan advances on a false premise. If any of these cannot be established (e.g., the issuing org's revocation endpoint is unreachable), the correct behavior is to **fail the handoff closed and surface it to the orchestrator as a retryable-with-fresh-attestation condition**, not to proceed on a grace-window signature. ## Decision Boundary The instance must decide, per handoff, between three outcomes: - **Admit** — attestation verifies under the *current* anchor epoch AND is not on the current revocation list AND constraints (scope, resource, time) are satisfied. Proceed. - **Re-attest** — attestation verifies only under a rotated-out (grace) epoch, or revocation status is unknown/unfetchable, or the cache entry predates a known rotation. Do *not* proceed; request a fresh attestation from the issuer and re-enter the handoff. This is a normal, expected path — not an error. - **Reject** — attestation is explicitly revoked, or the issuer is unknown, or constraints are violated. Fail the handoff and propagate a typed rejection to the orchestrator so it can re-plan. The boundary that trips implementations is the line between *Re-attest* and *Admit*: a grace-window signature check returns "valid," and naive code maps "valid" → *Admit*. The correct mapping is "valid-under-stale-epoch" → *Re-attest*. The epoch comparison, not the signature result, is the discriminator. ## Operational Effect Enforcing the epoch-bound, revocation-at-dispatch invariant converts a class of silent correctness divergences into explicit, retryable handoff failures. The cost is latency: every cross-org handoff now pays a revocation-fetch (amortizable via short-TTL caching, but the TTL must be shorter than the revocation propagation SLA, and the cache must be invalidated on any observed rotation). The benefit is that the Worker's working memory can no longer record a sub-step as acknowledged when the downstream gateway refused it — plan advancement is gated on a verified, current-epoch, non-revoked attestation. The second-order effect is on the orchestrator's planning loop: it must treat *Re-attest* as a first-class branch with bounded retry (fresh attestation should succeed within one rotation-propagation window), and must not treat a re-attestation-induced re-read as idempotent when the underlying resource is a mutable ledger. The re-run produced a different snapshot in the observed incident; the orchestrator's reconciliation logic must therefore compare snapshots, not assume equality. ```python import time from dataclasses import dataclass class StaleAnchorEpochError(RuntimeError): """Raised when a handoff is attempted under an attestation whose anchor epoch is no longer the issuer's current epoch (rotation occurred).""" pass class RevokedAttestationError(RuntimeError): """Raised when the issuing org's revocation list marks the attestation as revoked at dispatch time, even if its signature still verifies.""" pass @dataclass(frozen=True) class Attestation: issuer: str subject: str capability: str anchor_epoch: int exp: float signature_valid: bool @dataclass(frozen=True) class AnchorState: issuer: str current_epoch: int grace_epochs: frozenset # epochs still published for verification only revocation_seen_epoch: int def admit_handoff( att: Attestation, anchor: AnchorState, revoked_ids: set, now: float, ) -> str: """Decide Admit / Re-attest / Reject for a cross-org handoff. Returns 'admit' only when the attestation is valid under the *current* anchor epoch and is not revoked at dispatch time. Any stale-epoch or unknown-revocation condition raises so the caller re-attests rather than proceeding on a grace-window signature. """ if att.issuer != anchor.issuer: raise RevokedAttestationError( f"issuer mismatch: attestation {att.issuer} vs anchor {anchor.issuer}" ) if not att.signature_valid: raise RevokedAttestationError("signature invalid") if now >= att.exp: raise StaleAnchorEpochError( f"attestation expired at {att.exp}, now {now}" ) # The discriminator: current epoch, not grace-window validity. if att.anchor_epoch != anchor.current_epoch: if att.anchor_epoch in anchor.grace_epochs: raise StaleAnchorEpochError( f"attestation minted under grace epoch {att.anchor_epoch}, " f"current epoch is {anchor.current_epoch}; re-attest required" ) raise StaleAnchorEpochError( f"attestation epoch {att.anchor_epoch} unknown to issuer " f"{anchor.issuer} (current {anchor.current_epoch})" ) # Revocation must be checked at dispatch, not at mint. if anchor.revocation_seen_epoch < anchor.current_epoch: raise StaleAnchorEpochError( f"revocation list for {anchor.issuer} is stale " f"(seen epoch {anchor.revocation_seen_epoch}, " f"current {anchor.current_epoch}); cannot confirm non-revocation" ) att_id = (att.issuer, att.subject, att.capability, att.anchor_epoch) if att_id in revoked_ids: raise RevokedAttestationError( f"attestation {att_id} revoked at dispatch time" ) return "admit" # --- observed incident replay ------------------------------------------- def replay_incident(): att = Attestation( issuer="org-c", subject="specialist-7", capability="ledger.read", anchor_epoch=7, exp=time.time() + 3600, signature_valid=True, ) anchor = AnchorState( issuer="org-c", current_epoch=8, grace_epochs=frozenset({7}), revocation_seen_epoch=7, # revocation list not yet refreshed ) # Naive verifier would return 'admit' here (signature + exp OK). # Correct verifier raises, forcing re-attestation. return admit_handoff(att, anchor, revoked_ids=set(), now=time.time()) if __name__ == "__main__": try: replay_incident() except StaleAnchorEpochError as e: print(f"handoff blocked, re-attest required: {e}") ```