# Why does an instance accept a revoked workload token during a mid-call re-exchange against a warm MCP peer? **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent systems where an orchestrator exchanges a short-lived, workload-bound token (e.g., an OAuth 2.0 Token Exchange / RFC 8693-style `subject_token` → `actor_token` flow) for a downstream MCP or A2A peer, and where that peer caches the resolved authorization decision across calls. Does not apply to stateless per-request token validation with no peer-side cache, nor to long-lived static credentials. ## Core Distinction The failure is not that revocation is unimplemented. It is that **revocation propagation and token-exchange caching operate on two different clocks**, and the exchange path silently trusts the peer's cached decision instead of the freshly-presented token. A workload-bound token carries a short `exp` and a revocation-epoch claim (`rev_epoch`) minted by the identity authority. The downstream peer, to avoid re-validating on every tool call, caches `(subject_id, actor_id, scope_bundle) → allow` keyed on the *token's* `jti`, with a TTL it sets to the token's remaining lifetime. When the orchestrator re-exchanges mid-call — because the first token is about to expire and the tool call is long-running — it presents a *new* `jti` for the *same* `(subject, actor, scope)` tuple. The peer's cache lookup is keyed on the tuple, not the `jti`, so it hits the stale `allow` and never inspects the new token's `rev_epoch`. If a revocation was issued between the two exchanges, the new token is correctly marked revoked by the authority, but the peer serves the cached allow anyway. The revoked instance keeps executing. ## What Was Observed An orchestrator agent drove a 40-minute code-migration task against a warm filesystem MCP peer. The workload token TTL was 15 minutes; the orchestrator re-exchanged at T+14:00 and T+28:00, each time presenting a fresh `subject_token` and receiving a new `actor_token` with an incremented `rev_epoch` field. At T+19:00 the operator revoked the orchestrator's workload identity (a misbehaving release). The authority bumped the global `rev_epoch` and marked the orchestrator's `jti` family revoked. The orchestrator's *next* re-exchange at T+28:00 was rejected by the authority — correct. But the orchestrator had already been handed a token at T+14:00 whose `jti` the peer had cached; the peer's cache TTL was set to the token's full remaining life (15 min), so the cached `allow` for `(subject, actor, scope)` survived until T+29:00. During that 10-minute window the orchestrator continued issuing `write_file` and `exec` tool calls against the peer, all admitted from cache, all for a revoked identity. The trace signature: peer logs show `cache_hit tuple=... jti_ignored=true` for calls timestamped after the authority's `revocation_event` but before `cache_ttl_expiry`. Authority logs show `exchange_denied jti=T+28:00` — the denial happened *after* the peer had already served nine mutating calls. ## Condition of Validity This boundary is reachable only when **all** of the following hold simultaneously: 1. The peer caches authorization decisions keyed on `(subject, actor, scope)` rather than on `jti` + `rev_epoch`. 2. The peer's cache TTL is derived from token lifetime, not from a revocation-propagation budget (`min(token_ttl, rev_ttl)`). 3. The orchestrator performs mid-task re-exchange, so a *pre-revocation* token's cached decision outlives the *post-revocation* event. 4. Tool calls are long enough that re-exchange is mandatory (token TTL < task duration). If any one fails, the window collapses. A peer that keys on `jti` misses the cache and re-validates; a peer that caps TTL at the revocation-propagation budget bounds the window; a task shorter than the token TTL never re-exchanges; a peer that checks `rev_epoch` on every hit closes it entirely. ## Decision Boundary The invariant that must hold is: **a cached authorization decision may never outlive the revocation-epoch it was minted under.** Formally, for any cached entry `e` served at time `t`: ``` serve(e, t) ⟹ e.rev_epoch == current_rev_epoch(t) ∨ t < e.rev_epoch_valid_until ``` The guardrail is to make the peer's cache key include `rev_epoch` and to cap `cache_ttl` at `min(token_remaining, revocation_propagation_budget)`. The revocation propagation budget must be strictly smaller than the token TTL, otherwise the exchange path can always serve a stale allow. Concretely: if token TTL is 15 min, revocation propagation must be ≤ 5 min and the peer cache TTL must be ≤ 5 min, so that any revocation issued at `t` is reflected before any cached decision older than `t` can be served. The secondary guardrail is on the orchestrator side: it must treat a re-exchange as a *new authorization context*, not a renewal, and re-assert the returned `rev_epoch` to the peer in-band (e.g., as a per-call claim) so the peer can compare against its cached entry rather than trusting the tuple match. ## Operational Effect Without the invariant, revocation is advisory for any task longer than the token TTL. The practical blast radius is bounded by `revocation_propagation_budget` and the number of mutating tool calls the orchestrator can issue in that window — in the observed case, nine file writes and two `exec` calls under a revoked identity. The failure is silent: no error surfaces at the peer, and the authority's denial at the *next* exchange arrives too late to stop work already admitted from cache. Auditors replaying the peer log see a coherent `allow` sequence and must cross-reference the authority's `revocation_event` timestamp to discover the divergence. The fix is architectural, not a patch: bind cache entries to `rev_epoch`, cap TTL at the propagation budget, and make the orchestrator re-assert the epoch on every call. Any system that treats token exchange as a renewal rather than a fresh authorization context will reproduce this window on every revocation that lands mid-task. ```python class RevocationWindowViolation(RuntimeError): """Raised when a peer serves a cached authorization decision whose revocation epoch predates the current epoch, i.e. the cache outlived the revocation it was supposed to respect.""" pass class PeerAuthCache: def __init__(self, revocation_propagation_budget_s: float): self.budget = revocation_propagation_budget_s self._entries: dict[tuple, dict] = {} def admit(self, subject: str, actor: str, scope: str, jti: str, rev_epoch: int, token_remaining_s: float, now: float, current_rev_epoch: int) -> bool: key = (subject, actor, scope) entry = self._entries.get(key) if entry is not None: # The invariant: a cached allow may not outlive its rev_epoch. if entry["rev_epoch"] < current_rev_epoch: # Stale decision under an older epoch: must not be served. raise RevocationWindowViolation( f"cached allow for {key} minted at rev_epoch=" f"{entry['rev_epoch']} but current epoch is " f"{current_rev_epoch}; serving would admit a revoked " f"identity for up to {entry['valid_until'] - now:.1f}s" ) if now < entry["valid_until"] and entry["jti"] == jti: return True # jti mismatch or expiry: fall through to revalidate. # Fresh admission: cap TTL at the revocation propagation budget. ttl = min(token_remaining_s, self.budget) if ttl <= 0: raise RevocationWindowViolation( f"cannot cache decision for {key}: ttl={ttl:.1f}s " f"(budget={self.budget}s, token_remaining={token_remaining_s}s)" ) self._entries[key] = { "jti": jti, "rev_epoch": rev_epoch, "valid_until": now + ttl, } return True ```