# Which invariants prevent stale-warrant replay when AAIF revocation crosses a federated trust-domain boundary **Date of Record:** 2026 November 29 **Scope:** Applies to agent-to-agent (A2A) handoffs where an acting agent presents a signed capability warrant issued by a foreign trust domain (issuer ≠ verifier domain) and the issuing domain revokes or rotates the signing key mid-flight. Does not cover single-domain revocation, where the issuer and verifier share a CRL/OCSP channel and a monotonic clock. ## Core Distinction A revocation event and a key-rotation event are not the same state transition, but AAIF-compliant warrant verification collapses them into one check: "does this warrant's issuer key validate against the verifier's cached trust bundle?" The non-obvious boundary is that **revocation is a statement about a warrant's validity window, while rotation is a statement about a key's signing authority**. When a foreign domain rotates its signing key, the old key still validates against a *stale* trust bundle the verifier holds, so a warrant signed by the retired key continues to pass signature checks even though the issuer considers that key dead. Revocation propagates as a negative assertion (key X is dead as of T); rotation propagates as a positive assertion (key Y is now authoritative). A verifier that only refreshes its trust bundle on a positive-assertion schedule will accept warrants signed by a key the issuer retired hours ago. The invariant that prevents this is not "verify the signature"—it is **"a warrant is valid only if its signing key was authoritative at the warrant's `issued_at` AND remains non-revoked at the verifier's `evaluation_time`."** Those are two separate temporal predicates and AAIF implementations routinely conflate them. ## What Was Observed A three-domain federation (issuer `alpha`, verifier `beta`, auditor `gamma`) ran a routine rotation on `alpha`'s warrant-signing key `K1 → K2` at 14:00Z. `beta` caches `alpha`'s trust bundle with a 6-hour TTL and refreshes on a positive-assertion pull. At 14:07Z, an agent `A` in `alpha` presented to `beta` a warrant `W` that had been minted at 13:58Z under `K1` with a 1-hour validity window (expires 14:58Z). `beta` validated `W` against its cached bundle (still containing `K1`, still within TTL), confirmed the signature, confirmed `issued_at=13:58Z` was within `W`'s window, and admitted the handoff. The failure surfaced at 15:30Z when `gamma` replayed the audit log: `alpha`'s revocation ledger recorded `K1` as revoked at 14:00Z (rotation implies revocation of the predecessor for new issuance but *not* retroactive invalidation of already-issued warrants). `beta` had admitted a warrant at 14:07Z signed by a key that was, at evaluation time, retired. Whether this is a violation depends entirely on which invariant `beta` is enforcing. If `beta` enforces "key authoritative at issuance," the admission is correct and `gamma`'s replay is wrong. If `beta` enforces "key non-revoked at evaluation," the admission is a boundary escape. The two domains disagreed because AAIF §7.4 specifies the temporal predicate ambiguously: it requires the warrant to be "valid under the issuer's current key state" without pinning whether "current" means at issuance or at evaluation. The concrete trace: 1. 13:58Z — `alpha` mints `W` under `K1`, signs, sets `issued_at`, `not_after=14:58Z`, embeds `key_id=K1`. 2. 14:00Z — `alpha` rotates to `K2`, publishes `K1` revoked to its ledger. 3. 14:00Z–20:00Z — `beta`'s trust-bundle cache for `alpha` is stale (TTL not expired), still lists `K1` as authoritative. 4. 14:07Z — `A` presents `W` to `beta`; `beta` verifies signature against cached `K1`, checks `issued_at` within window, admits. 5. 15:30Z — `gamma` replays against `alpha`'s live ledger, sees `K1` revoked at 14:00Z, flags the 14:07Z admission as a stale-warrant replay. The replay discrepancy is not a bug in `gamma` or in `beta` in isolation—it is the observable signature of an unpinned temporal predicate in the protocol. ## Condition of Validity The invariant holds only under a conjunction that AAIF does not currently enforce as a single check: - **Issuance authority:** the signing key must have been authoritative at `W.issued_at`. This is checkable offline against the key's `valid_from`/`valid_until` interval, which must be carried in the trust bundle, not inferred from cache age. - **Evaluation non-revocation:** the signing key must not be revoked at `evaluation_time`, where `evaluation_time` is the verifier's monotonic clock at the moment of admission, not the cache-fetch time. - **Revocation monotonicity:** the issuer's revocation ledger must be append-only and totally ordered, so that a verifier pulling at any `t` sees a superset of what it saw at `t-δ`. Without this, a verifier cannot distinguish "not yet revoked" from "revocation not yet propagated." - **Clock skew bound:** `|verifier_clock - issuer_clock| < ε` where `ε` is strictly less than the minimum revocation propagation SLA. If `ε` exceeds the propagation window, a warrant can be admitted during the skew gap even with a correct predicate. The failure mode above is *valid* (i.e., the admission is defensible) only if the federation's policy explicitly adopts issuance-time authority and documents that warrants survive rotation. It is *invalid* if the policy adopts evaluation-time non-revocation. The boundary is the policy choice, and the protocol must force that choice to be explicit per domain pair, not defaulted. ## Decision Boundary The decision boundary is whether the verifier treats a foreign trust bundle as **authoritative-at-fetch** or **authoritative-at-use**. These produce different admission decisions for the same warrant: - **Authoritative-at-fetch:** the bundle's contents are frozen at pull time; a warrant is valid if it validates against that frozen snapshot and `issued_at` falls in the snapshot's validity. This is cheap and offline-friendly but admits stale-warrant replays for the duration of the TTL. It is correct only when the TTL is shorter than the issuer's minimum revocation-to-rotation gap. - **Authoritative-at-use:** the verifier must confirm, at admission time, that the signing key is non-revoked as of *now*. This requires a live or near-live revocation check (OCSP-style or a signed, monotonically-versioned ledger head) and fails closed on staleness. The invariant that prevents the observed failure is the **second** mode, plus a hard rule: *a verifier that cannot obtain a fresh revocation proof for a foreign domain must reject, not fall back to the cached bundle.* The fallback-to-cache behavior is the exact mechanism that let `beta` admit `W`. The guardrail is a **revocation freshness predicate** (`now - revocation_proof.timestamp < max_staleness`) evaluated independently of the trust-bundle TTL, and a **fail-closed default** when the predicate cannot be satisfied. A secondary guardrail: rotation must be modeled as *two* events—`key_retired` (no new issuance) and `key_revoked` (no further acceptance)—with distinct timestamps. Conflating them is what makes the issuance-time/evaluation-time ambiguity possible. If `alpha` had published `K1.retired_at=14:00Z` separately from `K1.revoked_at=14:00Z` and specified that warrants issued before `retired_at` remain acceptable until their own `not_after`, `beta` would have had an unambiguous predicate to evaluate. ## Operational Effect Downstream, the unpinned predicate produces three measurable effects: 1. **Stale-warrant replay window** equal to `min(trust_bundle_TTL, revocation_propagation_SLA)`. In the observed case this was up to 6 hours—long enough for a compromised `K1` to be used for replayed handoffs well after rotation. The window is invisible to the verifier because it validates correctly against its cache. 2. **Replay divergence between verifier and auditor**, as seen at 15:30Z. `gamma`'s replay uses live-ledger state; `beta`'s admission used cached state. Any federation with an auditor that replays against live state will flag every admission in the replay window, generating false-positive incident volume that masks real boundary escapes. 3. **Rotation-induced availability cliff** if the fix is applied naively: switching `beta` to authoritative-at-use without a revocation-proof cache causes every foreign handoff to block on a live OCSP round-trip to `alpha`, adding cross-domain latency to the critical path and creating a new failure mode (issuer unavailability → verifier total block). The correct fix caches *signed, versioned revocation proofs* with a short staleness bound, not the trust bundle itself. The operational invariant to record: **trust-bundle TTL and revocation-proof staleness are independent knobs and must be tuned independently; the admission decision depends on the latter, and the former only bounds how stale the key's issuance-authority metadata may be.** A verifier that treats them as one knob will either admit stale warrants (long TTL, no live check) or block on issuer availability (live check, no cache). ```python import time from dataclasses import dataclass, field from typing import Optional class StaleWarrantReplayError(RuntimeError): """Raised when a warrant's signing key is not authoritative at evaluation time.""" pass class RevocationProofUnavailableError(RuntimeError): """Raised when a fresh revocation proof cannot be obtained; verifier must fail closed.""" pass @dataclass class RevocationProof: key_id: str revoked: bool issued_at: float # issuer monotonic timestamp of proof ledger_head: int # monotonic version, must be >= last seen @dataclass class Warrant: key_id: str issued_at: float not_after: float signature_valid: bool @dataclass class VerifierState: trust_bundle_key_ids: set last_ledger_head: int = -1 max_proof_staleness_s: float = 30.0 clock_skew_bound_s: float = 5.0 def admit_warrant( warrant: Warrant, proof: Optional[RevocationProof], state: VerifierState, now: float, issuer_clock: float, ) -> bool: # Invariant 1: signing key must be in the trust bundle (issuance authority). if warrant.key_id not in state.trust_bundle_key_ids: raise StaleWarrantReplayError( f"key {warrant.key_id} absent from trust bundle at evaluation" ) # Invariant 2: warrant must be within its own validity window. if not (warrant.issued_at <= now <= warrant.not_after): raise StaleWarrantReplayError( f"warrant window [{warrant.issued_at},{warrant.not_after}] excludes now={now}" ) # Invariant 3: signature must validate. if not warrant.signature_valid: raise StaleWarrantReplayError(f"signature invalid for key {warrant.key_id}") # Invariant 4: fail closed if no fresh revocation proof is available. if proof is None: raise RevocationProofUnavailableError( f"no revocation proof for key {warrant.key_id}; refusing to fall back to cache" ) # Invariant 5: proof must be fresh relative to verifier clock. if now - proof.issued_at > state.max_proof_staleness_s: raise RevocationProofUnavailableError( f"revocation proof age {now - proof.issued_at:.1f}s exceeds " f"max_staleness {state.max_proof_staleness_s}s" ) # Invariant 6: proof must be monotonic (no rollback of ledger head). if proof.ledger_head < state.last_ledger_head: raise StaleWarrantReplayError( f"ledger head rollback: proof={proof.ledger_head} < seen={state.last_ledger_head}" ) # Invariant 7: clock skew must be bounded below propagation SLA. if abs(now - issuer_clock) > state.clock_skew_bound_s: raise RevocationProofUnavailableError( f"clock skew {abs(now - issuer_clock):.1f}s exceeds bound {state.clock_skew_bound_s}s" ) # Invariant 8: evaluation-time non-revocation. if proof.revoked: raise StaleWarrantReplayError( f"key {warrant.key_id} revoked at evaluation time (ledger head {proof.ledger_head})" ) state.last_ledger_head = proof.ledger_head return True ```