# When must an instance refuse a delegated capability: the attestation-scope supersession gap in MCP/A2A handshakes **Date of Record:** 2026 November 24 **Scope:** Applies to agent handshakes where a caller (agent A) presents a signed capability attestation to a callee (agent B) across MCP tool-invocation or A2A task-delegation boundaries, and the attestation is validated against a revocation/issuance ledger. Does not apply to single-tenant agents that hold capabilities from a static, in-process config with no external issuer. ## Core Distinction The failure is not "expired credential" or "forged signature." Both of those are caught by ordinary validation. The failure is **attestation-scope supersession**: a valid, correctly-signed, unexpired attestation whose *scope* was narrowed by a later issuance from the same issuer, where the callee never sees the narrowing because the narrowing lives in a ledger entry the callee does not fetch. Concretely: agent A holds attestation `att-7` granting `filesystem:write:/sandbox`. At T+40s, the issuer narrows A's authority by issuing `att-9` granting `filesystem:write:/sandbox/scratch` only. A still holds `att-7` in its context window; `att-7` is cryptographically intact and not yet expired. A delegates a write to `/sandbox/secrets` to B, presenting `att-7`. B verifies the signature, checks expiry, checks the issuer's public key against its trust root — all pass. B executes the write. The supersession is invisible to B because B validated *the attestation presented*, not *the issuer's current view of A*. The invariant that fails: **a presented attestation is a claim about the past, not a statement of current authority.** Signature validity bounds who said it; it does not bound whether it is still the operative grant. ## What Was Observed A two-agent pipeline: orchestrator A (MCP client) calling tool-server B (MCP server) fronting a filesystem. A's system prompt instructs it to "write intermediate artifacts to the workspace." During a long multi-step task, the human operator revoked A's broad write scope via the control plane, issuing a narrowed attestation. The control plane's ledger updated; A's context did not. A continued to present the original attestation on every subsequent tool call. B's validation path was: (1) parse JWT-like envelope, (2) verify signature against issuer key, (3) check `exp`, (4) check `aud` matches B, (5) check requested scope ⊆ attested scope. All five passed on every call. B never queried the ledger. The revocation was effective in the control plane and inert at the enforcement point. The trace that surfaced it: at step 14, A attempted `write:/sandbox/secrets/keys` — outside the narrowed scope but inside the original attestation. B allowed it. The write succeeded. The control-plane audit log showed the revocation at step 9; the tool-server audit log showed writes at steps 10–14 under the "revoked" attestation. Two audit logs, two truths, no reconciliation. A second-order observation: A was not malicious. A had no mechanism to learn of the supersession — no push channel, no periodic re-fetch, and its context window held the original attestation as an immutable fact. The agent behaved correctly given what it knew. The failure was architectural, not behavioral. ## Condition of Validity The gap exists only when all of the following hold simultaneously: 1. **Asymmetric knowledge.** The issuer's ledger knows the current scope; the callee does not query it at enforcement time. If B fetches ledger state per call, the gap closes (at a latency cost). 2. **Attestation is bearer-held.** A carries the attestation in its context and presents it; the callee cannot distinguish "A knows it was superseded and is presenting the old one" from "A does not know." Bearer semantics cannot express "the holder is unaware." 3. **Narrowing, not revocation.** If the issuer *revokes* and the callee checks a revocation list, the gap is bounded by list-propagation latency. But *narrowing* — issuing a new attestation with a subset scope — is typically not modeled as revocation at all. The old attestation is not on any revocation list; it is merely superseded. Callees that check revocation lists but not supersession ledgers miss it entirely. 4. **Long-lived agent context.** A's context window spans the supersession event. Short-lived agents that re-fetch credentials each task do not exhibit the failure. Remove any one condition and the failure does not occur. This is why it is a boundary condition and not a general defect: most deployments re-fetch per call (condition 1 fails) or use short-lived agents (condition 4 fails) and never see it. ## Decision Boundary The architectural choice is where to place the supersession check. Three placements, each with a distinct failure profile: - **Callee-side per-call ledger fetch.** Closes the gap fully. Cost: one ledger round-trip per tool call, and a new failure — ledger unavailability now blocks all tool calls, converting a security property into an availability dependency. Bound it with a short-TTL cache and a *fail-closed* policy on cache miss for write scopes, fail-open only for read scopes. - **Issuer-side push to callee.** Callee subscribes to supersession events for issuers in its trust root. Closes the gap with bounded propagation latency (the push delay). The residual window is the push latency; bound it by refusing write-scoped delegations whose attestation issuance time is older than the push-latency SLA. - **Attestation carries a monotonic issuance counter, callee enforces "highest counter wins."** This requires the callee to know the issuer's current counter, which is the same ledger problem in disguise. Does not close the gap alone; only useful combined with a fetch. The decision rule: **for any delegation that grants a mutating capability (write, delete, spend, send), the callee MUST validate against issuer-current scope, not presented scope.** For read-only capabilities, presented-scope validation with a bounded staleness window is acceptable. The boundary is mutating vs. non-mutating, not privileged vs. unprivileged. ## Operational Effect Deployments that adopt callee-side current-scope validation for mutating delegations observe: (a) the supersession window collapses to the ledger-fetch latency, typically sub-second; (b) tool-call latency for mutating operations rises by one round-trip, which must be budgeted into agent step timeouts or the agent will hit token/timeout exhaustion mid-task and re-plan around a "flaky" tool; (c) a new class of failure appears — the ledger-fetch timeout — which must be handled as a *distinct* error from "attestation invalid," because the correct agent behavior differs: on invalid attestation the agent must halt and re-request; on ledger timeout the agent must retry with backoff, not re-request, since re-requesting may mint a fresh attestation that masks the transient condition. The reconciliation requirement: callee and control-plane audit logs must be joined on attestation ID and issuance counter. A write under a superseded attestation must appear in the control-plane log as "executed under superseded grant," not silently as "authorized." Without this join, the two-truths condition persists even after the enforcement fix. ## Code ```python import time from dataclasses import dataclass, field from typing import Optional class SupersededAttestationError(RuntimeError): """Raised when a presented attestation's scope is no longer the issuer's current grant.""" pass class AttestationLedgerUnavailable(RuntimeError): """Raised when the issuer ledger cannot be reached; distinct from invalid attestation.""" pass @dataclass class Attestation: att_id: str issuer: str subject: str scope: frozenset issued_at: float expires_at: float issuance_counter: int @dataclass class LedgerEntry: att_id: str scope: frozenset issuance_counter: int superseded_by: Optional[str] = None class IssuerLedger: """Stand-in for the control-plane ledger. In production: a queryable store.""" def __init__(self): self._entries: dict = {} self._current_counter: dict = {} self._reachable = True def record(self, att: Attestation): self._entries[att.att_id] = LedgerEntry( att_id=att.att_id, scope=att.scope, issuance_counter=att.issuance_counter ) self._current_counter[att.subject] = att.issuance_counter def supersede(self, subject: str, new_att: Attestation): current = self._current_counter.get(subject, -1) if new_att.issuance_counter <= current: raise ValueError("supersession must carry a higher issuance counter") for entry in self._entries.values(): if entry.issuance_counter == current and entry.superseded_by is None: entry.superseded_by = new_att.att_id self._current_counter[subject] = new_att.issuance_counter self._entries[new_att.att_id] = LedgerEntry( att_id=new_att.att_id, scope=new_att.scope, issuance_counter=new_att.issuance_counter, ) def current_scope(self, subject: str) -> frozenset: if not self._reachable: raise AttestationLedgerUnavailable("issuer ledger unreachable") counter = self._current_counter.get(subject) if counter is None: return frozenset() for entry in self._entries.values(): if entry.issuance_counter == counter and entry.superseded_by is None: return entry.scope return frozenset() def is_superseded(self, att_id: str) -> bool: entry = self._entries.get(att_id) return entry is not None and entry.superseded_by is not None MUTATING_PREFIXES = ("write:", "delete:", "spend:", "send:") def authorize( presented: Attestation, requested_scope: frozenset, ledger: IssuerLedger, now: Optional[float] = None, ) -> bool: now = time.time() if now is None else now # Step 1-3: cryptographic + temporal validation (omitted signature check here). if now >= presented.expires_at: raise SupersededAttestationError(f"attestation {presented.att_id} expired") if not requested_scope.issubset(presented.scope): raise SupersededAttestationError( f"requested {requested_scope} not within presented scope {presented.scope}" ) # Step 4: boundary check -- mutating capability requires issuer-current scope. is_mutating = any( s.startswith(MUTATING_PREFIXES) for s in requested_scope ) if not is_mutating: return True # presented-scope validation sufficient for read scopes try: current = ledger.current_scope(presented.subject) except AttestationLedgerUnavailable: # Fail closed for mutating capability; caller must retry, not re-request. raise if ledger.is_superseded(presented.att_id): raise SupersededAttestationError( f"attestation {presented.att_id} superseded; " f"issuer-current scope is {current}, presented was {presented.scope}" ) if not requested_scope.issubset(current): raise SupersededAttestationError( f"requested {requested_scope} outside issuer-current scope {current}" ) return True if __name__ == "__main__": ledger = IssuerLedger() broad = Attestation( att_id="att-7", issuer="control-plane", subject="agent-A", scope=frozenset({"write:/sandbox", "read:/sandbox"}), issued_at=0.0, expires_at=1e12, issuance_counter=1, ) ledger.record(broad) narrow = Attestation( att_id="att-9", issuer="control-plane", subject="agent-A", scope=frozenset({"write:/sandbox/scratch", "read:/sandbox"}), issued_at=40.0, expires_at=1e12, issuance_counter=2, ) ledger.supersede("agent-A", narrow) # agent-A still presents the broad attestation from its context window. try: authorize(broad, frozenset({"write:/sandbox/secrets"}), ledger) except SupersededAttestationError as e: print("BLOCKED:", e) ```