# What happens when an instance keeps a revoked capability because its peer caches the attestation at handshake time **Date of Record:** 2026 November 28 **Scope:** Applies to multi-agent systems where capability grants are attested at connection/handshake time and cached by peers, then later revoked at the authority. Does not apply to systems that re-verify every call against a live authority (per-call attestation), nor to single-agent deployments with no peer trust graph. ## Core Distinction There are two distinct notions of "permission" in an agent protocol, and they diverge under revocation: - **Attested capability** — the signed claim, presented at handshake, that instance B may invoke tool `T` with scope `S`. It is a *snapshot* of authority at time `t_handshake`. - **Live authority** — the current, mutable grant state held by the issuing authority at time `t_call`. The failure mode is not that revocation is slow, nor that signatures are forgeable. It is that **peers treat the attested capability as the authority rather than as a pointer to it**, and therefore a revocation between `t_handshake` and `t_call` is invisible to every peer that already cached the attestation. The revoked instance continues to be *trusted* by its peers precisely because it was *once correctly* trusted. The system's own correctness property — "we only trust attested peers" — becomes the mechanism of the breach. ## What Was Observed An orchestrator instance `O` delegated a sub-task to worker `W` over a persistent A2A channel. At handshake, `W` presented an attestation: `cap=filesystem.write, scope=/scratch/task-7731, exp=t_handshake+3600s, sig=authority`. `O` verified the signature, cached the attestation keyed by `W.instance_id`, and opened the channel. At `t_handshake+40s`, an operator revoked `W`'s write capability at the authority (a human flagged the task as misbehaving). The authority's revocation record was correct and immediate. But `O` had no reason to re-query: the attestation it held was valid, unexpired, correctly signed, and scoped to exactly the path `W` was using. `O` continued routing write requests to `W` for the remaining 3,560 seconds of the attestation's lifetime. `W` executed them. The trace: 1. `t0` — `W` handshakes, presents attestation, `O` verifies sig, caches `(W_id → attestation)`. 2. `t0+40s` — authority revokes `W`'s `filesystem.write`. Revocation is authoritative and durable. 3. `t0+40s..t0+3600s` — `O` routes writes to `W`. `O`'s cache hit is a *successful* verification against a *stale* snapshot. No error is raised anywhere. 4. `t0+3600s` — attestation expires. `O` re-handshakes, verification fails, channel drops. The breach window is exactly the attestation TTL. The non-obvious part: **the failure is silent and every individual component behaved correctly.** The authority revoked correctly. The signature verified correctly. The cache returned the correct value for the key. The scope matched. There was no bug in any component — the bug was in the *composition invariant*: caching an attestation is only sound if the cache TTL is bounded by the revocation propagation latency, and nothing enforced that bound. ## Condition of Validity An attestation cache is sound if and only if, for every cached entry, the following holds at every call: ``` t_call - t_cached < min(attestation_ttl, revocation_propagation_bound) ``` The `revocation_propagation_bound` is the maximum time between an authority committing a revocation and every peer that might hold a cached attestation being guaranteed to have invalidated it. In push-based revocation (authority broadcasts invalidation), this bound is the broadcast fan-out latency plus clock skew. In pull-based (peers re-query on a schedule), it is the re-query interval. The invariant fails in three common configurations: - **TTL-only caching with no revocation channel.** `revocation_propagation_bound = ∞`; the invariant is unsatisfiable. Any TTL is unsound. This is the default in most handshake-then-cache implementations. - **Push revocation with unbounded fan-out.** The authority broadcasts, but a peer that was partitioned during the broadcast never learns. The bound is undefined for partitioned peers unless the authority requires acknowledgment and re-broadcasts on reconnect. - **Clock-skew-dependent expiry.** `exp` is compared against peer-local time; a peer whose clock lags by `δ` honors the attestation `δ` past its true expiry, extending the breach window by `δ` per peer. The invariant is *not* restored by shorter TTLs alone. A shorter TTL shrinks the window but does not bound it — a revocation at `t_call - ε` still leaks for `ε`. Only an explicit revocation channel (push-with-ack, or pull with a bounded interval) makes the bound finite. ## Decision Boundary The architectural choice is between two sound designs and one unsound default: **Per-call attestation (sound, expensive).** Every invocation carries a fresh attestation or a nonce the authority can check. Revocation is effective at the next call. Cost: one authority round-trip per call, or a short-lived nonce cache with `nonce_ttl < revocation_propagation_bound`. **Cached attestation with a revocation channel (sound, cheaper).** Cache is permitted only if the authority maintains a revocation feed and the peer's cache honors it. The cache entry must be invalidated on (a) TTL expiry, (b) receipt of a revocation message for that `instance_id`, or (c) a bounded re-query interval, whichever is soonest. The invariant is enforced by the cache, not by the attestation's `exp` field. **TTL-only cache (unsound).** The default. It is sound only if the authority guarantees no revocation can occur during any attestation's lifetime — i.e., attestations are issued with `exp` shorter than the minimum possible revocation-to-call latency, which is not knowable. The decision boundary is: *if the authority can revoke, the peer must have a channel to learn of it.* No amount of signature verification substitutes for this. The attestation proves *who* the peer is and *what it was granted*; it cannot prove *what it is still granted*. A second boundary: **scope must be re-checked, not just identity.** A revocation may narrow scope (`/scratch/task-7731` → `/scratch/task-7731/readonly`) rather than revoke entirely. A peer that caches only `(instance_id → valid)` and re-checks identity but not scope will continue to honor the widened grant. The cache key must include the scope, and scope changes must propagate on the same channel as revocations. ## Operational Effect The observable consequence is a **breach window equal to the attestation TTL**, during which a revoked instance operates with full cached authority and no component reports an error. Because every verification succeeds, the failure is invisible to monitoring that watches for verification failures. It surfaces only as an after-the-fact audit discrepancy: the authority's log shows revocation at `t0+40s`; the peer's log shows successful writes through `t0+3600s`; neither log is wrong. The guardrail is a **cache-invalidation contract enforced at the cache, not the attestation**: the peer's cache must carry a `revocation_epoch` it has confirmed with the authority, and any attestation whose issuing epoch is older than the peer's last-confirmed epoch is treated as unverified regardless of signature validity or `exp`. This converts the silent window into a fail-closed rejection the moment the peer learns of the revocation, and — critically — makes the peer's *ignorance* of a revocation a detectable state (stale epoch) rather than an undetectable one (valid-looking signature). The following reference implementation enforces the epoch contract and raises on the exact boundary condition — a cached attestation presented after the peer has confirmed a newer revocation epoch, or a call whose age exceeds the propagation bound. ```python import time from dataclasses import dataclass class RevokedCapabilityError(RuntimeError): """Raised when a cached attestation is used past its soundness bound.""" @dataclass(frozen=True) class Attestation: instance_id: str scope: str issued_epoch: int # authority's revocation epoch at issuance exp: float # absolute expiry, peer-local time class AttestationCache: def __init__(self, propagation_bound_s: float): self._cache: dict[tuple[str, str], Attestation] = {} self._confirmed_epoch: int = 0 self._propagation_bound_s = propagation_bound_s def on_revocation_epoch(self, epoch: int) -> None: # Authority pushed a new revocation epoch; invalidate all older entries. if epoch > self._confirmed_epoch: self._confirmed_epoch = epoch self._cache = { k: v for k, v in self._cache.items() if v.issued_epoch >= epoch } def admit(self, att: Attestation, now: float | None = None) -> None: now = time.monotonic() if now is None else now if att.issued_epoch < self._confirmed_epoch: raise RevokedCapabilityError( f"attestation for {att.instance_id} issued at epoch " f"{att.issued_epoch} predates confirmed epoch " f"{self._confirmed_epoch}" ) self._cache[(att.instance_id, att.scope)] = att def verify_call( self, instance_id: str, scope: str, now: float | None = None ) -> Attestation: now = time.monotonic() if now is None else now att = self._cache.get((instance_id, scope)) if att is None: raise RevokedCapabilityError( f"no attestation for {instance_id}@{scope}" ) if att.issued_epoch < self._confirmed_epoch: raise RevokedCapabilityError( f"{instance_id}@{scope} revoked: epoch {att.issued_epoch} " f"< confirmed {self._confirmed_epoch}" ) if now >= att.exp: raise RevokedCapabilityError( f"{instance_id}@{scope} attestation expired" ) age = now - (att.exp - self._propagation_bound_s) if age > 0: # Within propagation bound of expiry: unsound to trust without # a fresh authority check. raise RevokedCapabilityError( f"{instance_id}@{scope} within propagation bound; " f"re-query authority before use" ) return att ```