# Where must an instance halt when a revoked federated warrant outlives its cached AAIF delegation token **Date of Record:** 2026 November 25 **Scope:** Applies to cross-organization agent handoffs where an Agent Authorization & Identity Federation (AAIF) bearer/delegation token is minted by a home IdP and presented to a relying-party (RP) agent in a foreign trust domain. Does not cover single-org token refresh, nor OAuth token revocation inside one trust boundary. ## Core Distinction The failure here is not "an expired token was accepted." It is the **asymmetric propagation latency between revocation and expiry** across two independent clocks owned by two different organizations. A revocation event is *push-shaped* (the issuing org asserts a fact now), while token expiry is *pull-shaped* (the relying org discovers invalidity only when it next validates or when `exp` elapses). Between those two moments sits a window in which a downstream agent holds a syntactically valid, cryptographically verifiable AAIF token whose *subject warrant* has already been withdrawn at origin. The subtle part: the RP agent's local verifier is **correct** in isolation. Signature checks pass, `exp` has not elapsed, `aud` matches, the delegation chain resolves. Every local invariant holds. The failure lives in a *global* invariant — "no agent acts on a warrant its issuer has withdrawn" — that no single verifier can evaluate because the withdrawal fact was never propagated to it. This is a distributed-consensus problem masquerading as a token-validation problem. ## What Was Observed A three-hop federated task: Org A (home) mints an AAIF delegation token `T_A` for agent `a1`, scoped `act:read_inventory`, `exp = T+3600s`, `rev_check_hint = 300s`. Agent `a1` hands off to Org B's orchestrator `b1`, which re-delegates to `b2` via an attenuation token `T_B` (narrower scope, shorter `exp`, embedding `T_A`'s `jti` in its `may_act` chain). Org B caches `T_A`'s validity verdict in a local revocation cache with a 300s TTL, per the hint. At `T+120s`, Org A's security team revokes `a1`'s warrant after detecting prompt-injection-driven scope probing. Org A publishes the revocation to its CRL/OCSP-equivalent endpoint. Org B's cache does **not** re-poll until `T+300s` (its own TTL boundary, not A's push). During `T+120s → T+300s`, `b2` continues issuing tool calls against `T_B`, each of which resolves `T_A` from cache as "valid as of last check." The calls succeed. `b2`'s audit log records a fully authorized execution chain. Worse, at `T+300s` the cache refreshes and returns "revoked," but `b2` had already **checkpointed** its task state at `T+280s` including a `warrant_valid=true` assertion baked into the checkpoint. On resume, the orchestrator replays from the checkpoint, trusts the stored assertion, and skips re-validation — because the checkpoint schema treated warrant validity as *immutable task state* rather than *time-varying external fact*. The revoked agent's work product was laundered through a stale checkpoint. ## Condition of Validity The guardrail is a **revocation-freshness invariant on every act, not on every session**: > An agent may execute an action under a federated warrant only if, at the instant of execution, the warrant's revocation status was confirmed within `min(rev_check_hint, remaining_ttl)` — and that confirmation must be bound to the *specific action*, not to a session or checkpoint. Three conditions must hold jointly for this invariant to be enforceable: 1. **Verdicts are not cacheable across action boundaries.** A cached "valid" verdict is valid only for the action it was fetched for. Storing it in task state (checkpoint, memory, episodic log) is a category error: it converts a point-in-time external fact into durable internal state. The checkpoint must store the *reference* (`jti` + `checked_at` + `max_staleness`), never the boolean. 2. **The RP's clock cannot dominate the issuer's intent.** If `rev_check_hint` (issuer-controlled) exceeds the RP's cache TTL, the RP must honor the *smaller* of the two. A relying party that extends staleness beyond the issuer's declared tolerance has silently widened the revocation window. 3. **Attenuated tokens inherit the strictest upstream freshness.** `T_B`'s `may_act` chain embeds `T_A`; `b2` must re-confirm `T_A`'s status at `T_B`'s action time, not at `T_B`'s mint time. Delegation chains do not freeze upstream validity. ## Decision Boundary The precise halt condition: **an instance must halt and refuse the action when `now - last_confirmed_at(jti) > min(rev_check_hint, remaining_ttl)` OR when the revocation endpoint is unreachable and the last confirmed verdict is older than the issuer's declared `max_staleness`.** Fail-closed, not fail-open, on unreachable revocation endpoints — because the alternative is unbounded staleness. The boundary is *not* "token expired." An unexpired token with a stale verdict is the dangerous case; an expired token fails a different, well-understood check. The boundary is the **intersection of (unexpired) ∧ (verdict stale) ∧ (action attempted)** — a state that naive validators never test because they conflate "not expired" with "not revoked." Critically, the halt must be *scoped to the action*, not the session. Halting the whole agent on one stale verdict, when a fresh confirmation is one round-trip away, is over-conservative and causes spurious task aborts. The correct response is: block the action, attempt a synchronous re-confirmation, resume on success, escalate on failure. ## Operational Effect Without the invariant, the observable pathology is **revocation laundering through checkpoints and caches**: a revoked warrant's effects persist in downstream state (task checkpoints, memory stores, audit trails marked "authorized") long after the revocation, and replay/resume logic re-derives authority from that contaminated state rather than from live confirmation. The blast radius is not the single revoked agent — it is every agent downstream that trusted a cached verdict or a checkpointed assertion. With the invariant, the cost is one synchronous revocation check per action at the RP, bounded by `min(rev_check_hint, remaining_ttl)`. This is the price of cross-org correctness: you cannot have both sub-second action latency and bounded revocation propagation across trust domains without caching, and you cannot have cache correctness without binding verdicts to actions. The engineering choice is where to pay — latency per action, or staleness per revocation. The invariant forces the choice to be explicit and issuer-bounded rather than RP-defaulted. ```python import time from dataclasses import dataclass from typing import Optional class StaleWarrantVerdictError(RuntimeError): """Raised when an action is attempted under a federated warrant whose revocation status cannot be confirmed within the issuer-bounded window.""" pass class RevocationEndpointUnreachable(StaleWarrantVerdictError): """Fail-closed variant: endpoint down and last verdict exceeds max_staleness.""" pass @dataclass(frozen=True) class WarrantVerdict: jti: str valid: bool confirmed_at: float # monotonic seconds max_staleness: float # issuer-declared tolerance rev_check_hint: float # issuer-suggested re-poll interval class FederatedActionGate: """Enforces: verdict freshness is bound to the action, never to a session or checkpoint. Cached verdicts are references, not booleans.""" def __init__(self, rp_cache_ttl: float): self._rp_cache_ttl = rp_cache_ttl self._verdicts: dict[str, WarrantVerdict] = {} def _freshness_window(self, v: WarrantVerdict, remaining_ttl: float) -> float: # RP must never widen staleness beyond issuer intent, nor beyond token life. return min(v.rev_check_hint, v.max_staleness, self._rp_cache_ttl, remaining_ttl) def _confirm(self, jti: str, rev_endpoint) -> WarrantVerdict: try: return rev_endpoint.check(jti) except ConnectionError as exc: last = self._verdicts.get(jti) if last is None: raise RevocationEndpointUnreachable( f"no prior verdict for jti={jti} and endpoint unreachable" ) from exc if time.monotonic() - last.confirmed_at > last.max_staleness: raise RevocationEndpointUnreachable( f"jti={jti} last verdict older than max_staleness " f"{last.max_staleness}s; fail-closed" ) from exc return last # still within issuer tolerance def authorize_action( self, jti: str, remaining_ttl: float, rev_endpoint, checkpoint_assertion: Optional[bool] = None, ) -> None: # A checkpointed boolean is NEVER trusted as a live verdict. if checkpoint_assertion is not None: pass # explicitly ignored; retained only for audit contrast v = self._verdicts.get(jti) now = time.monotonic() if v is None or not v.valid: v = self._confirm(jti, rev_endpoint) self._verdicts[jti] = v now = time.monotonic() window = self._freshness_window(v, remaining_ttl) age = now - v.confirmed_at if age > window: # Stale verdict at action time: block this action, re-confirm synchronously. v = self._confirm(jti, rev_endpoint) self._verdicts[jti] = v age = time.monotonic() - v.confirmed_at if age > window: raise StaleWarrantVerdictError( f"jti={jti} verdict age {age:.1f}s exceeds window {window:.1f}s " f"at action time; refusing execution" ) if not v.valid: raise StaleWarrantVerdictError( f"jti={jti} revoked at origin; action refused despite unexpired token" ) ```