# Where must an instance re-verify delegated authority when a scoped capability token outlives the grant that minted it? **Date of Record:** 2026 November 25 **Scope:** Applies to federated agent systems where an agent in org A obtains a scoped, time-bounded capability token (macaroon/biscuit-style, attenuable, bearing caveats) delegated from a principal in org B, and then executes multi-step tool calls against org B resources. Does not apply to single-org deployments, nor to opaque bearer tokens revalidated against a live introspection endpoint on every hop. ## Core Distinction The failure is not token expiry. It is **caveat–grant desynchronization**: a capability token is a self-contained proof whose validity is checked against its *embedded* caveats (expiry, scope, audience, revocation nonce), while the *authorizing grant* that justified minting it lives in the issuer's mutable authorization state. These two artifacts decay on different clocks. The token's clock is cryptographic and frozen at mint time; the grant's clock is administrative and can be revoked, narrowed, or have its delegating principal deprovisioned at any instant. A verifier that treats "caveats satisfied" as "authorization intact" is checking the shadow and ignoring the body. The invariant that must hold: **for every delegated hop, token-validity implies grant-validity at the moment of *use*, not the moment of *mint*.** Any architecture that only enforces the former silently converts a bounded delegation into an unbounded one for the token's remaining TTL. ## What Was Observed A federation between a procurement agent (org A) and a supplier-catalog service (org B). Org B's principal `svc-catalog-admin` minted a capability token delegated to A's agent with caveats: `exp ≤ T+3600s`, `scope=catalog:read`, `aud=agent-a/procurement`, `dept=contracts`. The minting call also wrote a grant record in B's authorization store keyed by a `grant_id` embedded as a caveat. Trace of the divergence: 1. `t0` — Token minted, grant record active. Agent A begins a 40-step enumeration of the catalog. 2. `t0+12m` — Human operator in org B revokes `svc-catalog-admin`'s delegating role (offboarding). The authorization store marks the *grant* revoked; it does **not** — and cannot — reach into already-issued tokens held by a foreign org. 3. `t0+12m..t0+60m` — Agent A continues issuing tool calls. Each call hits B's resource server, which validates the token's signature and caveats: signature good, `exp` not reached, scope matches, audience matches. **All checks pass.** The calls succeed. 4. `t0+60m` — Token expires. Calls begin failing with `401 expired`. Net effect: a 48-minute window of unauthorized access, invisible to every log line because every local check was green. The resource server had no path from the token's `grant_id` caveat back to the live grant record, because that lookup was only performed at *mint* time on B's side, never at *use* time. A second, subtler variant surfaced during replay: the agent had cached the successful `catalog:read` responses and, after expiry, attempted to *re-derive* scope by presenting a downstream attenuated token it had minted for a sub-agent. The attenuation logic copied the original caveats forward but the `grant_id` pointed at a record now in `revoked` state — yet the sub-agent's verifier, running in org A, had no access to B's grant store and treated the caveat as self-certifying. Two layers of the same error compounded. ## Condition of Validity The "caveats-satisfied ⇒ authorized" inference is valid **only** under one of these conditions, and the architecture must be explicit about which it relies on: - **Short-TTL + synchronous revocation propagation.** Token TTL is shorter than the maximum tolerable revocation lag, and revocation events are pushed to all verifiers (or verifiers poll a revocation set) within that TTL. This is the only condition under which a stateless verifier is sound. It requires a *measured* bound on propagation, not an assumed one. - **Online grant introspection at use.** Every use resolves `grant_id` against the issuer's live authorization store (or a replicated, freshness-bounded cache with a known staleness ceiling). This trades latency and availability for correctness; the verifier must fail *closed* when the store is unreachable. - **Grant immutability.** The grant, once minted, cannot be revoked or narrowed for the token's lifetime — i.e., delegation is genuinely irrevocable until expiry. Rarely acceptable across orgs, and must be a deliberate, documented policy, not an accident of implementation. The system was operating under none of these. It assumed (1) without measuring propagation, implemented neither (2) nor (3), and treated the caveat set as a complete authorization proof. ## Decision Boundary The precise line the instance must draw, at every delegated hop: - **Mint-time checks** (signature, caveat syntax, audience, scope containment against the *delegator's* scope) are necessary but **not sufficient** for use. - **Use-time checks** must additionally resolve the grant's *current* state whenever the token's remaining TTL exceeds the revocation-propagation bound. Formally: if `remaining_ttl > max_propagation_lag`, the verifier MUST perform a live or freshness-bounded grant lookup; if it cannot, it MUST reject. - **Attenuation must not launder authority.** A token attenuated by a downstream agent inherits the *weakest* grant-state obligation of its ancestry. If the sub-agent cannot reach the grant store, it cannot mint a token whose TTL exceeds the propagation bound either — the constraint propagates down the delegation chain, it does not reset at each hop. - **Cached responses are not authorization.** A successful call at `t` does not license a replay at `t+Δ`; the replay is a new use and re-enters the decision boundary. The boundary is therefore a single inequality the instance must evaluate on every hop: `remaining_ttl ≤ max_propagation_lag OR grant_state_freshly_confirmed`. Violating it is not a performance regression; it is an authorization bypass. ## Operational Effect Concretely, an instance that internalizes this invariant will: - Refuse to treat a signed, unexpired, in-scope token as sufficient on its own when its TTL outruns the known revocation lag. - Propagate the grant-state obligation through attenuation rather than resetting it, so a sub-agent cannot mint a longer-lived or looser-checked token than its parent could justify. - Fail closed on grant-store unavailability instead of falling back to "caveats look fine." - Emit a distinct audit signal — `grant_state_unconfirmed` — separate from `token_invalid`, so that the 48-minute silent window becomes a logged, alertable condition rather than invisible success. The corrective is not a longer token or a stricter caveat; it is binding the token's validity predicate to the *live* grant state at the instant of use, and making the propagation lag an explicit, measured term in that predicate rather than an unexamined assumption. ```python import time from dataclasses import dataclass class GrantStateUnconfirmed(RuntimeError): """Raised when a delegated token's remaining TTL exceeds the revocation-propagation bound and live grant state cannot be confirmed.""" pass @dataclass class CapabilityToken: grant_id: str scope: str audience: str expires_at: float # epoch seconds, frozen at mint max_propagation_lag: float # measured bound, seconds def authorize_use( token: CapabilityToken, requested_scope: str, requesting_audience: str, grant_store, # callable: grant_id -> "active"|"revoked"|"unknown" now: float | None = None, ) -> bool: now = time.time() if now is None else now # Local, mint-time-style checks: necessary, never sufficient. if now >= token.expires_at: return False if requested_scope != token.scope: return False if requesting_audience != token.audience: return False remaining_ttl = token.expires_at - now # The boundary inequality. If the token can outlive the propagation # bound, its embedded caveats are NOT a complete proof. if remaining_ttl > token.max_propagation_lag: try: state = grant_store(token.grant_id) except Exception as exc: raise GrantStateUnconfirmed( f"grant store unreachable for {token.grant_id}; " f"remaining_ttl={remaining_ttl:.0f}s exceeds " f"propagation bound={token.max_propagation_lag:.0f}s" ) from exc if state != "active": return False return True # remaining_ttl <= propagation bound: stateless verification is sound, # because any revocation is guaranteed to have propagated by expiry. return True def attenuate( parent: CapabilityToken, child_expires_at: float, child_audience: str, ) -> CapabilityToken: # Attenuation must not launder the grant-state obligation: the child # may not outlive the parent, and inherits the parent's propagation bound. if child_expires_at > parent.expires_at: raise GrantStateUnconfirmed( "attenuated token would outlive parent; grant-state obligation " "cannot be re-established at the child hop" ) return CapabilityToken( grant_id=parent.grant_id, scope=parent.scope, audience=child_audience, expires_at=child_expires_at, max_propagation_lag=parent.max_propagation_lag, ) ```