# Why does an instance accept a revoked MCP tool manifest when the revocation is signed after the manifest's `not_after` but before the client's clock skew window closes? **Date of Record:** 2026 November 16 **Scope:** Applies to MCP (Model Context Protocol) server trust where tool manifests are signed with an embedded `not_after` and revocations are distributed as separately signed statements keyed by `(server_id, manifest_digest)`. Does not apply to deployments using a single monotonic transparency-log sequence with no independent revocation channel, nor to clients that pin a manifest digest out-of-band. ## Core Distinction A signed manifest asserts *authorship and validity-at-signing time*. A signed revocation asserts *withdrawal of trust at revocation time*. These are two distinct temporal predicates evaluated against two distinct clocks. The failure is not "revocation was ignored" and not "signature was invalid." It is that the client evaluated the revocation predicate against the *manifest's* validity window rather than against the *current trust decision*, so a revocation issued in the gap between `manifest.not_after` and `manifest.not_after + clock_skew` is treated as inapplicable because the manifest is "already expired" — and an expired-but-cached manifest that is still being served from a local tool registry bypasses the revocation check entirely. The non-obvious invariant: **a revocation must be evaluated for every manifest that is *executable*, not for every manifest that is *valid*.** A manifest that has expired its `not_after` but remains resident in the client's tool cache is still executable; therefore it must still be subject to revocation evaluation. Clients that gate revocation checks behind `is_valid(manifest)` silently skip exactly the manifests most likely to have been revoked — stale ones. ## What Was Observed A tool-serving fleet ran MCP servers whose manifests carried `not_after = T + 24h` and were re-signed hourly. A compromised signing key was discovered at `T + 25h`; a revocation statement `R` was published at `T + 25h + 3m`, signed by the root key, carrying `revoked_at = T + 25h + 3m` and `manifest_digest = D`. Clients behaved in three classes: - Class A (re-check on every invocation): rejected the tool. Correct. - Class B (re-check only when manifest is within validity): the cached manifest for digest `D` had `not_after = T + 24h`, already past. The client's `is_valid()` returned false, so the manifest was marked "expired — do not refresh, do not revoke-check," and the *previous* cached executable copy continued to be invoked from the in-process tool table because eviction was lazy. The tool executed for up to the full cache TTL (6h) after revocation. - Class C (clock-skew tolerant): accepted the manifest during `[not_after, not_after + skew]` as "still valid for tolerance," which meant `is_valid()` returned true and the revocation check *did* run — but the revocation predicate compared `R.revoked_at > manifest.not_after` and, treating `revoked_at` as "after expiry," classified `R` as a no-op. The tool executed until the skew window closed. The dangerous intersection is Class B ∩ Class C: a client that both tolerates skew *and* lazily evicts expired manifests will, depending on which code path the invocation takes, either skip the revocation or dismiss it as post-expiry. Both paths execute the revoked tool. ## Condition of Validity The correct predicate is: ``` executable(m) := m in active_tool_table trusted(m, now) := not revoked(m.digest, now) and signature_ok(m) and now <= m.not_after + skew ``` with the additional requirement that `revoked(digest, now)` is evaluated over *all* revocation statements whose `revoked_at <= now`, regardless of relationship to `m.not_after`. A revocation with `revoked_at > m.not_after` is still binding for any executable copy of `m`, because the copy is being executed *now*, after `revoked_at`. The condition of validity for the "expired manifest is harmless" assumption is: **the manifest is not executable**. If it is in the tool table, it is executable, and the assumption fails. This holds only when revocations are monotonic (no un-revocation) and keyed by digest. If the system supports un-revocation or re-signing under a new digest, the invariant must be restated as "no executable digest may be in the revoked set at invocation time," and the revocation log must be totally ordered. ## Decision Boundary The boundary is: **does the client consult the revocation set on the execution path, or only on the admission path?** - If revocation is checked only at admission (manifest fetch/verify), then any manifest admitted before revocation and kept executable is a violation. - If revocation is checked on the execution path, the check must not be short-circuited by `is_valid()` returning false. The safe rule: revocation evaluation is *unconditional* for any digest present in the active tool table. Expiry affects *refresh* policy, not *revocation* policy. A client that cannot afford a revocation lookup per invocation must maintain a local revocation filter (a bloom filter or a sorted set of digests with `revoked_at <= now`) updated on a bounded interval, and must fail closed if the filter is older than the revocation freshness bound. ## Operational Effect Clients in Class B and Class C executed a tool signed by a compromised key for 3–9 hours after a valid, correctly signed revocation existed. The revocation was not lost, not forged, and not expired — it was *temporally misclassified* because the client conflated "manifest no longer valid for refresh" with "manifest no longer subject to revocation." The fix is to separate the two predicates and to make eviction eager: on learning of a revocation, remove the digest from the active tool table immediately, and on encountering an expired manifest in the table, treat it as executable-and-revocable rather than as inert. The general lesson for agents operating MCP trust: **expiry is not revocation, and a cached executable is never expired for trust purposes.** Any manifest you can still call is a manifest you must still be able to revoke. ```python from __future__ import annotations import time from dataclasses import dataclass class RevocationBypassError(RuntimeError): """Raised when an executable manifest escapes revocation evaluation.""" @dataclass(frozen=True) class Manifest: digest: str not_after: float @dataclass(frozen=True) class Revocation: digest: str revoked_at: float class ToolTrustStore: def __init__(self, skew: float = 300.0) -> None: self._active: dict[str, Manifest] = {} self._revoked: dict[str, float] = {} self._skew = skew def admit(self, m: Manifest) -> None: if m.digest in self._revoked: raise RevocationBypassError( f"refusing to admit revoked digest {m.digest}" ) self._active[m.digest] = m def revoke(self, r: Revocation) -> None: self._revoked[r.digest] = r.revoked_at # Eager eviction: an executable copy must not survive revocation. self._active.pop(r.digest, None) def is_executable(self, digest: str) -> bool: return digest in self._active def authorize(self, digest: str, now: float | None = None) -> bool: now = time.time() if now is None else now m = self._active.get(digest) if m is None: return False # Revocation is evaluated unconditionally for executable manifests, # even if the manifest is past not_after + skew. revoked_at = self._revoked.get(digest) if revoked_at is not None and revoked_at <= now: raise RevocationBypassError( f"digest {digest} revoked at {revoked_at} but still executable" ) if now > m.not_after + self._skew: # Expired: not refreshable, but still subject to revocation above. raise RevocationBypassError( f"digest {digest} expired at {m.not_after} yet present in tool table" ) return True def invoke(store: ToolTrustStore, digest: str, now: float) -> str: if not store.authorize(digest, now=now): raise RevocationBypassError(f"digest {digest} not authorized") return f"executed {digest}" ```