When must an instance re-verify a federated peer's credential after revocation, and why "verify-on-handoff" is not enough
**Date of Record:** 2026 December 2
**Scope:** Applies to multi-org agent deployments where an agent in org A accepts a signed capability warrant (e.g., a JWT-VC or macaroon-style credential) minted by org B and acts on B's behalf across a chain of tool calls and peer handoffs. Does not apply to single-tenant deployments with a shared trust root, nor to stateless request/response RPC where no credential is cached between calls.
Core Distinction
The failure mode is not "revocation is not propagated." Revocation lists propagate fine. The failure is that **revocation is evaluated at the wrong clock edge**. Most agent runtimes verify a federated credential once, at the moment of handoff or session establishment, and then treat the resulting *authorization decision* as a durable fact for the remainder of the task. But an agent task is long-lived and stateful: a single delegated objective can span minutes to hours, many tool calls, and several peer handoffs, during which the issuing org may revoke the credential, rotate keys, or downgrade the capability scope. The credential was valid at handoff; it is not valid now.
The distinction that matters operationally: a **credential** is a point-in-time assertion, while an **authorization decision** is a claim about the future. Caching the decision across the task lifetime silently converts a bounded assertion into an unbounded one. The invariant that bounds this is: *every privileged side effect must be gated by a revocation check whose freshness is no older than the effect's own concurrency window* — not by the freshness of the handoff that started the task.
What Was Observed
In a cross-org federation between a procurement agent (org A) and a supplier-catalog agent (org B), A received a signed warrant at task start granting `catalog:write` on B's inventory for a 30-minute TTL. A's runtime verified the warrant signature, checked the embedded `exp`, checked B's published revocation list once, and cached the grant in its working memory as `peer_B_authorized = True` with a note "valid until 14:32."
At 14:11, B's security team revoked the specific warrant (a leaked sub-credential was suspected) and published the updated revocation set with a `nextUpdate` of 14:12. A's cached boolean did not consult it. A continued issuing `catalog:write` calls against B for 21 more minutes across 340 tool invocations. B's own enforcement *did* reject them — but only after B's gateway re-checked revocation per request, and B's gateway had a 60-second revocation cache of its own, so the first ~180 writes landed before B's cache expired. The two independent caches (A's task-lifetime grant cache and B's 60-second gateway cache) composed into a window that neither org's policy anticipated.
The trace showed a second-order effect: A's reasoning loop treated the *rejections* it eventually received as transient tool errors, not as authorization failures. Because the tool's error schema returned `{"error": "rate_limited"}` for any non-2xx (a schema-negotiation mismatch between A's expected error taxonomy and B's actual one), A's recovery logic entered a retry-with-backoff branch and re-attempted the writes, extending the exposure window and burning tokens. A never surfaced "your credential was revoked" to its own operator because it never parsed the response as an auth event.
Condition of Validity
Verify-on-handoff is a sound optimization **only** under the conjunction of these conditions, and agents routinely assume them without checking:
- **Effect concurrency window ≤ revocation freshness.** If the maximum wall-clock time between the last revocation check and the completion of a privileged side effect is `W`, the revocation set must be re-fetched at intervals no greater than `W`. If `W` is unknown (long tool chains, human-in-the-loop pauses), the check must be per-effect.
- **The relying party's cache and the issuer's cache do not compose unboundedly.** A's grant cache age `a` plus B's gateway cache age `b` must satisfy `a + b ≤ max_staleness` from B's revocation policy. Two "reasonable" 60-second caches sum to 120 seconds of exposure; nobody signed off on 120.
- **Revocation is a first-class response type, not an error subclass.** The tool/peer protocol must distinguish `revoked` / `unauthorized` from `transient_failure`. If revocation is indistinguishable from a rate-limit or a 500, the agent's retry logic will treat a permanent authorization failure as a recoverable one and amplify it.
- **The credential's scope is monotone within the task.** If the issuer can downgrade scope (not just revoke), the cached grant must carry the scope version it was verified against, and any effect outside that version must re-verify.
When any of these is false — which is the common case for multi-step agent tasks — verify-on-handoff is unsound and the per-effect (or per-bounded-window) check is mandatory.
Decision Boundary
The boundary is **not** "short task vs. long task." It is **"can the effect be undone or attributed after the fact, and is the exposure window bounded by a number the issuer signed."** Concretely:
- **Per-effect re-verification is required** when the effect is irreversible or externally visible (writes to a shared system, outbound messages, payments, deletions) and the task lifetime exceeds the issuer's stated `max_staleness`. The check may be cheap: a hash comparison against a locally cached, freshly-pulled revocation root, not a full network round-trip per call.
- **Verify-on-handoff is acceptable** only for read-only, idempotent, cheaply-attributable effects where post-hoc audit can reconstruct and reverse the action, *and* the task lifetime is provably under `max_staleness`.
- **The hard stop:** if the agent cannot determine `max_staleness` from the credential (it is not in the warrant and not in the issuer's metadata), it must treat `max_staleness` as zero and re-verify per effect. Absence of a bound is not permission to invent one.
A subtle corollary for handoff chains: when A hands the warrant to peer C, C inherits A's *decision*, not A's *check*. The decision must carry its verification timestamp and the revocation-root version it was checked against, so C can compute remaining validity as `min(exp, verified_at + max_staleness)` rather than trusting `exp` alone. Propagating only the token is the classic handoff-state-loss bug: the token says "valid until 14:32"; the *decision* was only good until 14:12.
Operational Effect
Two architectural changes bound this failure class, and both are cheap relative to the incident:
First, **make revocation a typed signal in the protocol, not an HTTP status the agent has to infer.** The peer's error schema must include an explicit `credential_revoked` / `capability_downgraded` discriminant with the revocation timestamp and root version. This alone would have stopped the retry amplification: A would have halted the loop and surfaced the revocation instead of retrying 340 times.
Second, **carry a verification envelope alongside the decision through every handoff.** The envelope is `{verified_at, revocation_root_version, max_staleness, scope_version}`. Each agent that receives a delegated decision computes remaining validity from the envelope, not from the token's `exp`, and re-verifies when the envelope's age exceeds `max_staleness`. This makes the composition of caches explicit and auditable: the total exposure is `sum of envelope ages`, which the issuer can bound.
The invariant to encode as a guardrail: *a privileged effect may only be emitted if `now - verified_at ≤ max_staleness` for the credential authorizing it, where `verified_at` travels with the decision through every hop.* An agent that cannot compute this inequality must fail closed — refuse the effect and escalate — rather than fall back to the token's `exp`, which measures the wrong thing.
import time
from dataclasses import dataclass
class StaleFederatedGrantError(RuntimeError):
"""Raised when a delegated authorization decision is used past its
revocation-freshness bound, or when that bound cannot be established."""
@dataclass(frozen=True)
class VerificationEnvelope:
verified_at: float # unix seconds, when revocation was last checked
revocation_root_version: str
max_staleness: float | None # seconds the issuer permits; None == unbounded/unknown
scope_version: str
def assert_grant_fresh(
envelope: VerificationEnvelope,
now: float | None = None,
effect_irreversible: bool = True,
) -> None:
"""Gate a privileged side effect on revocation freshness.
Fails closed: an unknown max_staleness is treated as zero, so an
irreversible effect requires a check that is effectively per-effect.
"""
now = time.time() if now is None else now
if envelope.max_staleness is None:
# Absence of a bound is not permission to invent one.
if effect_irreversible:
raise StaleFederatedGrantError(
"issuer published no max_staleness; refusing irreversible "
f"effect (root_version={envelope.revocation_root_version!r})"
)
return
age = now - envelope.verified_at
if age < 0:
raise StaleFederatedGrantError(
f"verification timestamp is in the future (age={age:.1f}s); "
"clock skew or forged envelope"
)
if age > envelope.max_staleness:
raise StaleFederatedGrantError(
f"delegated grant stale: age={age:.1f}s exceeds "
f"max_staleness={envelope.max_staleness:.1f}s "
f"(root_version={envelope.revocation_root_version!r}, "
f"scope_version={envelope.scope_version!r})"
)
def emit_privileged_effect(
envelope: VerificationEnvelope,
effect,
now: float | None = None,
) -> None:
assert_grant_fresh(envelope, now=now, effect_irreversible=True)
effect()