# How does an instance detect a revoked peer key during a mid-handoff A2A exchange when the revocation propagates faster than the in-flight warrant **Date of Record:** 2026 November 19 **Scope:** Applies to cross-organizational agent-to-agent (A2A) handoffs where warrants (signed capability grants) carry a key identifier and are validated against a peer's published key set, and where revocation or rotation of that key can occur between warrant issuance and warrant consumption. Does not cover intra-org key management within a single trust domain, nor symmetric-secret schemes with no rotation. ## Core Distinction The naive model treats warrant validation as a point-in-time check: at handoff, the consuming agent fetches the issuer's current key set, verifies the signature, and proceeds. The failure mode is not that verification is skipped—it is that **verification succeeds against a key that has been revoked but whose revocation has not yet reached the consumer's key cache**, while the warrant was issued before revocation. This produces a *temporal split-brain*: the issuer's authoritative state says "key K is revoked at T_revoke," the consumer's cached state says "K is valid," and the warrant's `iat` (issued-at) is *before* T_revoke. Both parties are internally consistent; the system is not. The critical invariant is: **a warrant signed by key K is only consumable if the consumer can prove that K was not revoked at any wall-clock instant between the warrant's `iat` and the moment of consumption.** Point-in-time key-set fetches cannot establish this, because they observe only the consumer's cache state, not the issuer's revocation timeline. The distinction that matters is between *signature validity* (a cryptographic fact) and *authorization continuity* (a temporal fact about key liveness across an interval). Most A2A implementations conflate the two. ## What Was Observed In a three-org federation (issuer A, consumer B, auditor C), agents exchanged signed warrants over MCP transport with a 90-second key-cache TTL on the consumer side. A key rotation on A at 14:02:11 revoked key `k-a-7` and published `k-a-8`. A warrant `W` signed by `k-a-7` at 14:01:58 (13 seconds before revocation) was in-flight toward B, arriving at 14:02:14. B's cache still held `k-a-7` as valid (TTL not expired, refresh scheduled at 14:02:40). B verified `W` successfully and executed a tool call delegating a database read to A's downstream agent. The trace showed the failure precisely: ``` 14:01:58 A signs W with k-a-7, iat=14:01:58, exp=14:04:58 14:02:11 A revokes k-a-7, publishes revocation record rev_id=8841 14:02:14 W arrives at B; B verifies against cached k-a-7 -> VALID 14:02:15 B executes delegated tool call under W 14:02:40 B's cache refreshes; k-a-7 now marked revoked 14:02:41 B's next validation of W fails: "key revoked" ``` The tool call at 14:02:15 was authorized by a key that had been dead for 4 seconds. The revocation record `rev_id=8841` carried a `revoked_at=14:02:11` timestamp, but B's validation path never compared `revoked_at` against `W.iat`. B's validator only asked "is K currently in the valid set?"—a question that returns `true` for a stale cache and cannot answer the interval question. A second observation compounded it: auditor C, replaying the exchange during a post-hoc verification pass, flagged the 14:02:15 tool call as `UNAUTHORIZED` because C's cache had already refreshed. B's logs showed `AUTHORIZED`. The two agents produced contradictory audit records for the same event, and neither was lying—they were reading different cache generations. This is the verification-replay discrepancy that makes the failure *non-obvious*: it only surfaces when a replaying auditor has a fresher key view than the original consumer. ## Condition of Validity The invariant holds only under these conditions, and the guardrail is only *required* when all three are true: 1. **Warrant lifetime exceeds revocation propagation latency.** If `W.exp - W.iat` is shorter than the p99 propagation delay of revocation records from issuer to all consumers, the window exists. In the observed case, warrant TTL was 180s and propagation was ~30s, so the window was real. If warrants expired faster than revocation propagates, the window closes by construction—but this forces impractically short warrants. 2. **The consumer's key cache is not revocation-aware.** A cache that stores only `{key_id: public_key}` cannot answer the interval question. A cache that stores `{key_id: (public_key, valid_from, revoked_at|null)}` can, *provided the validator consults `revoked_at`*. 3. **The issuer does not enforce "no new warrants after revocation."** If A had refused to sign any warrant with `k-a-7` after 14:02:11, `W` would still be valid (signed before), but the *class* of problem is bounded. The observed failure required only that a warrant be signed before revocation and consumed after—which is the normal case, not an edge case. When condition 2 is met, the guardrail is a single comparison: reject any warrant where `revoked_at is not None and W.iat >= revoked_at`—wait, the correct predicate is stricter: reject if `revoked_at is not None and revoked_at <= now` AND the warrant's validity interval *overlaps* the revoked interval, i.e. `W.iat <= revoked_at <= W.exp`. The subtlety: a warrant issued *before* revocation but consumed *after* is the dangerous case, and the interval overlap test catches it. A warrant issued *after* revocation cannot exist (the issuer shouldn't sign it), but if it does, `W.iat >= revoked_at` also catches it. The single correct predicate is interval overlap, not a point comparison. ## Decision Boundary The boundary between "safe to consume" and "must re-validate against issuer" is: - **Consume from cache** iff the cached key record has `revoked_at is None` **and** `cache_fetched_at >= W.iat` (the cache was refreshed after the warrant was issued, so it reflects any revocation that could have occurred during the warrant's life up to the fetch). - **Force synchronous re-fetch from issuer** iff `cache_fetched_at < W.iat` (the cache predates the warrant and cannot rule out a revocation between `W.iat` and now). - **Reject** iff `revoked_at is not None` and the intervals overlap. The non-obvious part: the middle case is the one that fires in practice. Consumers cache keys, warrants are issued continuously, and any warrant whose `iat` is newer than the last cache refresh must trigger a synchronous fetch or be rejected. This is the "cache-freshness vs. warrant-age" ordering invariant, and it is routinely violated because implementations compare `now` to `cache_ttl` rather than `W.iat` to `cache_fetched_at`. A second boundary: **rotation without revocation** (key K retired, K' published, K still cryptographically valid but deprecated). Here `revoked_at` is `None` for K, so the interval test passes, and the warrant is consumable. This is correct behavior—rotation is not revocation—but it means the consumer must distinguish `retired_at` (deprecation, still authorizes in-flight warrants) from `revoked_at` (compromise, kills in-flight warrants). Conflating them either over-rejects (killing valid in-flight work on routine rotation) or under-rejects (honoring compromised keys). ## Operational Effect The immediate effect of the unguarded path is **authorization of a tool call under a dead key**, which is a security event, but the *operational* effect that matters for agent systems is the audit divergence: the consumer's log says `AUTHORIZED`, the auditor's replay says `UNAUTHORIZED`, and the federation has no reconciliation rule. Downstream, this poisons episodic memory—the consumer records a successful exchange in its episode log, distills it into semantic memory ("org A's agent X is a valid peer for database reads"), and that distilled fact outlives the key that justified it. The next handoff retrieves the stale semantic memory, skips re-validation because "we've done this before," and the failure compounds. The guardrail that bounds it is the three-way decision above, enforced at the validator, plus a **revocation-aware cache schema** and a **reconciliation rule for auditor disagreement**: when consumer and auditor disagree on a warrant's validity, the auditor's fresher key view wins, and the consumer's episode log is amended with a `retroactively_revoked` marker before distillation. Without the marker, distillation launders a compromised authorization into a durable trust belief. The invariant to enforce at the memory layer: *no episodic record of a cross-org handoff may be distilled into semantic trust until its warrant has been confirmed unrevoked by a cache refresh that postdates the warrant's `exp`.* ```python import time from dataclasses import dataclass from typing import Optional class WarrantAuthorizationError(RuntimeError): """Raised when a warrant cannot be proven authorized across its full validity interval.""" pass @dataclass class KeyRecord: key_id: str public_key: bytes valid_from: float revoked_at: Optional[float] = None retired_at: Optional[float] = None # deprecation, NOT revocation @dataclass class KeyCache: records: dict fetched_at: float @dataclass class Warrant: issuer: str key_id: str iat: float exp: float signature: bytes def validate_warrant( warrant: Warrant, cache: KeyCache, now: float, refresh_fn, # callable(issuer) -> KeyCache ) -> KeyRecord: if warrant.iat > now: raise WarrantAuthorizationError( f"warrant iat={warrant.iat} is in the future relative to now={now}" ) if warrant.exp < now: raise WarrantAuthorizationError( f"warrant expired at {warrant.exp}, consumed at {now}" ) record = cache.records.get(warrant.key_id) # Cache predates the warrant: cannot rule out a revocation between # warrant.iat and now. Force synchronous refresh. if record is None or cache.fetched_at < warrant.iat: cache = refresh_fn(warrant.issuer) record = cache.records.get(warrant.key_id) if record is None: raise WarrantAuthorizationError( f"key {warrant.key_id} unknown even after refresh from {warrant.issuer}" ) # Interval-overlap test: the ONLY correct revocation predicate. # A warrant is dead if its validity interval overlaps the revoked interval. if record.revoked_at is not None: if warrant.iat <= record.revoked_at <= warrant.exp: raise WarrantAuthorizationError( f"key {warrant.key_id} revoked at {record.revoked_at} " f"overlaps warrant interval [{warrant.iat}, {warrant.exp}]" ) if warrant.iat >= record.revoked_at: raise WarrantAuthorizationError( f"warrant issued at {warrant.iat} after key revocation at {record.revoked_at}" ) # retired_at (deprecation) does NOT invalidate in-flight warrants. # It is intentionally not checked here. return record def consume_handoff(warrant: Warrant, cache: KeyCache, now: float, refresh_fn): try: record = validate_warrant(warrant, cache, now, refresh_fn) except WarrantAuthorizationError: # Do NOT distill a trust belief; mark episode retroactively revoked. raise return record.public_key ```