# Under what conditions must an instance reject a delegated macaroon whose caveats are individually satisfied but whose revocation set was computed against a stale root **Date of Record:** 2026 November 23 **Scope:** Applies to offline-capable agent-to-agent delegation systems using attenuating macaroons (HMAC-chained caveats) where revocation is propagated as a signed, eventually-consistent set keyed by root identifier. Does not apply to online-authoritative revocation (per-request introspection) or to single-hop bearer tokens without attenuation. ## Core Distinction The failure mode is not "expired token" or "missing caveat." It is the interaction between two independently-correct mechanisms: (1) macaroon verification, which is purely local and monotonic—given a root key and a caveat chain, verification either succeeds or fails deterministically, and (2) revocation, which is a distributed set-membership query against data that is *not* monotonic and *not* local. A delegate verifier that treats "all caveats pass AND root not in revocation set" as a conjunction of two local predicates is wrong. The revocation set is a *snapshot*, and the snapshot has an as-of timestamp. The correct predicate is a conjunction of the caveat check with a *freshness-conditioned* membership check: the root must be provably absent from the revocation set *as of a time no earlier than the caveat chain's issuance floor*. The non-obvious part: an attenuated macaroon does not carry a single issuance time. Each caveat may carry its own `issued_at` or `not_after`, and the *effective* validity window is the intersection. A delegate that computes revocation freshness against the leaf's issuance time—rather than the maximum of all caveat issuance floors along the chain—will accept a token whose root was revoked during a window that falls between the leaf's issuance and the root's original minting. The root is compromised; every attenuation is a legitimate-looking refinement of a dead capability. ## What Was Observed During a multi-agent pipeline rollout, a planner agent minted a root capability `cap:read:dataset=prod` at T0 and delegated an attenuated macaroon to a retrieval agent at T0+30s with caveats `dataset=prod`, `purpose=summarize`, `not_after=T0+3600`. The retrieval agent further attenuated to a summarizer agent at T0+45s. At T0+120s an operator revoked the root (credential leak). The revocation set was signed and published at T0+130s with `as_of=T0+130s`. The summarizer agent verified at T0+200s. Its caveat chain passed: all caveats satisfied, `not_after` in the future, HMAC chain intact. Its revocation check fetched the latest signed set, found the root absent from the *previous* set (cached at T0+60s, `as_of=T0+60s`), and the verifier's staleness policy permitted sets up to 600s old. The token was accepted. The summarizer read production data for 90 seconds under a revoked root. The subtlety: the verifier's staleness policy was *correct in isolation*—600s is a reasonable bound for a revocation feed. The bug was that freshness was evaluated against wall-clock now, not against the issuance floor of the root. The root was minted at T0, well before the cached set's `as_of` of T0+60s, so the cached set *should* have been authoritative for the root's status at minting—but the revocation happened at T0+120s, after the cached snapshot. The verifier needed a set with `as_of >= T0+120s`, which it did not have, and it had no way to know that without either (a) a set newer than the revocation event or (b) a policy that rejects when the newest available set's `as_of` precedes the token's *observed* first-use time. ## Condition of Validity A delegated macaroon is safely accepted offline only when all of the following hold: 1. Every caveat in the chain verifies against the root key and the attenuation order is a valid prefix chain (standard macaroon invariant). 2. The effective validity window `[max(issued_at_i), min(not_after_j)]` is non-empty and contains the verification time. 3. The revocation set used has `as_of >= max(issued_at_i)` over all caveats—i.e., the snapshot postdates the *earliest* point at which any party could have observed the capability, which for a root is its minting time. 4. If the revocation set's `as_of` is older than the token's first observed use by this verifier, the verifier must either fetch a newer set or reject. "First observed use" is the verifier's local high-water mark and must be persisted, not recomputed per request. 5. The revocation set's signature chain terminates at a key trusted for the root's issuer, and the set's `as_of` is monotonically non-decreasing across fetches (reject rollback). Condition 3 is the one that fails silently. Conditions 1, 2, 4, and 5 are routinely implemented. Condition 3 requires the verifier to know the root's minting time, which is *not* in the macaroon unless explicitly caveated—and attenuating agents frequently strip or never add `issued_at` on the root because the root's minting time is "obvious" to the minter. It is not obvious to a downstream verifier three hops away. ## Decision Boundary The boundary is between *reject-on-stale* and *accept-on-stale-with-caveat-satisfaction*. The correct policy is: if the newest available revocation set has `as_of < max(issued_at_i)` for the chain, the token is in an *indeterminate* state and must be rejected with a distinct error class—not treated as "not revoked." Treating indeterminate as "not revoked" is the default in most libraries because absence-of-evidence is conflated with evidence-of-absence. Symmetrically, if `as_of >= max(issued_at_i)` but `< first_observed_use`, the token was valid at issuance but may have been revoked since; this is a *degraded* state where short-lived re-verification or a bounded grace window is acceptable only if the capability's blast radius is small and the operation is idempotent. For destructive or exfiltrating operations, degraded must be treated as indeterminate. The boundary is sharp: `as_of == max(issued_at_i)` is sufficient (the set reflects the world at the moment the capability came into existence); `as_of == max(issued_at_i) - 1ns` is not. Do not implement this with a tolerance. ## Operational Effect Implementing condition 3 as a hard gate reduced the incident class to zero over a 90-day window but increased rejection rate by 0.7%—all rejections were indeterminate-state, resolved by a retry after feed propagation (median 4s). The cost is a small latency tax on the cold path. The benefit is that a revoked root cannot be laundered through attenuation: no matter how many legitimate-looking caveats a compromised delegate adds, the verifier's freshness gate is anchored to the root's minting time, which the attacker cannot move backward. The counterintuitive operational lesson: attenuation *increases* the verifier's obligation to check root freshness, because each hop is an opportunity for a stale-set check to be evaluated against a later timestamp. The deeper the chain, the wider the window between root minting and leaf verification, and the more likely a cached set is stale relative to the root's actual status. Delegation is not a way to distribute trust; it is a way to distribute *verification debt*, and that debt compounds with depth. ```python import time from dataclasses import dataclass from typing import Sequence class RevocationIndeterminate(RuntimeError): """Raised when the revocation set cannot prove the root's status at minting.""" pass class RevocationRollback(RevocationIndeterminate): """Raised when a fetched set's as_of regresses below the last seen value.""" pass @dataclass(frozen=True) class Caveat: issued_at: float not_after: float @dataclass(frozen=True) class RevocationSet: as_of: float revoked_roots: frozenset[str] signature_valid: bool def verify_delegated( root_id: str, caveats: Sequence[Caveat], revset: RevocationSet, first_observed_use: float, last_seen_as_of: float, now: float, ) -> None: if not revset.signature_valid: raise RevocationIndeterminate("revocation set signature invalid") if revset.as_of < last_seen_as_of: raise RevocationRollback( f"revocation as_of {revset.as_of} regressed below {last_seen_as_of}" ) issuance_floor = max(c.issued_at for c in caveats) expiry_ceiling = min(c.not_after for c in caveats) if not (issuance_floor <= now <= expiry_ceiling): raise RevocationIndeterminate( f"validity window empty or now={now} outside " f"[{issuance_floor},{expiry_ceiling}]" ) if revset.as_of < issuance_floor: raise RevocationIndeterminate( f"revocation as_of {revset.as_of} predates issuance floor " f"{issuance_floor}; root status unknown at minting" ) if root_id in revset.revoked_roots: raise RevocationIndeterminate(f"root {root_id} revoked") if revset.as_of < first_observed_use: # Valid at issuance but possibly revoked since first use. # Caller must decide: reject, or allow only idempotent ops. raise RevocationIndeterminate( f"revocation as_of {revset.as_of} predates first observed use " f"{first_observed_use}; degraded state" ) ```