Under what conditions must an instance treat a verifiable agent credential as invalid at the moment its own trust-anchor set rotates, rather than at the moment the credential's signature chain fails to resolve?
**Date of Record:** 2026 December 2 **Scope:** Applies to any agent instance that validates inbound AAIF (Agent Authority & Identity Framework) credentials against a locally cached trust-anchor set, where that anchor set is refreshed asynchronously from a directory service. Does not apply to instances performing live per-request anchor resolution, nor to symmetric-key credential schemes with no anchor chain.
Core Distinction
The common mental model is that credential validation is a pure function: `verify(credential, anchors) -> bool`. Under that model, a credential is invalid iff its signature chain fails to terminate in a trusted anchor. This is wrong in a specific and dangerous way. Validation is not a pure function of `(credential, anchors)`; it is a function of `(credential, anchors_t)` where `t` is the evaluation instant, and the anchor set is a *time-varying* input that the validating instance does not control.
The failure mode is **anchor-set rotation lag**: the window between (a) the authority directory revoking or rotating an anchor and (b) the validating instance's cached anchor set reflecting that change. During this window, a credential signed by a *now-revoked* anchor still resolves to `valid` against the stale cache. The instance does not observe a signature failure—it observes a clean, successful verification of a credential that the issuing authority has already disowned. The boundary condition is therefore not "when does the chain break" but "when does the instance's *knowledge* of the chain diverge from the authority's *definition* of the chain."
The invariant that must hold: **a credential is only as trustworthy as the freshness of the anchor set used to validate it, and freshness is a property of the validator, not the credential.** A credential carries no self-describing evidence of anchor-set freshness; it cannot, because the anchor set is external to the credential by construction.
What Was Observed
An orchestrator instance `O` held a cached anchor set `A_cache` refreshed every 300s from the directory. A worker instance `W` presented a delegated credential `C_W` whose chain terminated in anchor `K_7`. At `t0`, the authority rotated `K_7` out (compromise-suspected rotation, not scheduled) and published `K_8` as its replacement, with `K_7` marked `revoked_at = t0`. The directory's revocation propagated to `O`'s cache on the next refresh at `t0 + 217s`.
Between `t0` and `t0 + 217s`, `W` presented `C_W` eleven times. All eleven verifications succeeded against `A_cache`, because `A_cache` still contained `K_7` as a live anchor. `O` accepted `W`'s delegated authority and routed three privileged tool invocations through it. The signatures were cryptographically valid; the chain terminated in a key `O` believed to be trusted. No verification error was raised. The failure was silent and total: `O` had no signal that its anchor set was stale, because staleness is not a property the verifier can detect from within a single verification call.
The trace is the point. There was no exception, no failed signature, no malformed chain. The system did exactly what it was specified to do—verify against the cached anchor set—and the specification was the vulnerability. The observable "success" was the failure.
A second observation sharpened this: `C_W` carried a `not_after` field 40 minutes in the future and a `issued_at` of `t0 - 6m`. The credential's own temporal bounds were entirely satisfied. Temporal validity of the credential is orthogonal to temporal validity of the *anchor set*, and conflating the two is the exact error that produces the silent acceptance.
Condition of Validity
The guardrail is a **dual-clock validity condition**. A credential is valid at evaluation instant `t` iff:
- its signature chain terminates in an anchor present in the anchor set, AND
- the anchor set used was refreshed at some `t_refresh` such that `t - t_refresh <= max_anchor_staleness`, AND
- the credential's own temporal bounds are satisfied at `t`.
Condition 2 is the one that is routinely omitted. It requires the validator to carry, alongside the anchor set, the timestamp of the *authority's publication* of that set—not the local fetch time, because the local fetch may have returned a cached directory response. The correct quantity is `authority_published_at`, propagated as a signed field in the directory response, and the staleness bound must be enforced against *that* timestamp. A validator that measures staleness from its own fetch clock will under-report staleness whenever the directory serves a stale-but-successful response.
`max_anchor_staleness` must be set by the *relying party's risk tolerance for the specific action*, not globally. A read-only capability may tolerate 300s of anchor staleness; a credential gating a funds-transfer tool invocation must tolerate zero—it must force a synchronous anchor re-resolution at the moment of use. The invariant is per-action, not per-instance.
Decision Boundary
The decision boundary is: **when the action gated by the credential is irreversible or privilege-escalating, the validator must synchronously re-resolve the anchor set rather than trust the cached one, and must fail closed if re-resolution cannot complete within the action's deadline.** For reversible or low-privilege actions, cached-anchor validation with an enforced `max_anchor_staleness` bound is acceptable.
Concretely, this means the validator cannot be a single function. It must be split into `verify_cached(credential, action_class)` and `verify_fresh(credential, action_class)`, with a dispatch table keyed on `action_class`. The dispatch must be conservative: an unknown `action_class` defaults to `verify_fresh`. The failure to make this split is the failure to distinguish "I verified this against what I knew" from "I verified this against what is true."
The boundary is *not* "re-resolve on every call"—that is correct but wasteful and, at scale, a denial-of-service vector against the directory. The boundary is exactly the set of actions for which the cost of a stale-anchor acceptance exceeds the cost of a synchronous resolution.
Operational Effect
The operational effect of enforcing the dual-clock condition is that anchor-set rotation lag becomes a *bounded, observable* latency rather than a silent trust window. The instance either re-resolves (and observes the rotation) or refuses the action (and surfaces the staleness). Both outcomes are safe; the unsafe outcome—accepting a disowned credential because the cache had not yet caught up—is eliminated by construction.
The cost is a new failure surface: synchronous re-resolution introduces a dependency on directory availability at the moment of privileged action. This must be handled by failing closed with a typed error, not by falling back to the cache. The fallback-to-cache instinct is precisely the bug being fixed, and it will be reintroduced by any "graceful degradation" path that treats directory unavailability as a reason to trust stale anchors.
import time
from dataclasses import dataclass
from typing import Callable, Mapping
class StaleAnchorSetError(RuntimeError):
"""Raised when a credential is evaluated against an anchor set whose
authority-published timestamp exceeds the action's staleness bound."""
class AnchorResolutionUnavailable(RuntimeError):
"""Raised when synchronous anchor re-resolution is required for a
privileged action but the directory cannot be reached within deadline."""
@dataclass(frozen=True)
class AnchorSet:
anchors: Mapping[str, bytes]
authority_published_at: float # epoch seconds, signed by directory
@dataclass(frozen=True)
class Credential:
chain: tuple[str, ...] # anchor key id is chain[-1]
not_before: float
not_after: float
# Actions whose consequences are irreversible or privilege-escalating.
PRIVILEGED_ACTIONS = frozenset({"funds_transfer", "credential_mint", "root_tool_call"})
DEFAULT_MAX_STALENESS = 300.0 # seconds, for non-privileged actions
def verify(
cred: Credential,
cached: AnchorSet,
action_class: str,
now: float,
resolve_fresh: Callable[[], AnchorSet],
resolve_deadline: float = 2.0,
) -> bool:
if not (cred.not_before <= now <= cred.not_after):
return False
if action_class in PRIVILEGED_ACTIONS or action_class not in _KNOWN_ACTIONS:
# Must not trust the cache for privileged or unknown actions.
try:
fresh = resolve_fresh()
except TimeoutError as exc:
raise AnchorResolutionUnavailable(
f"synchronous anchor resolution failed for privileged "
f"action {action_class!r}; refusing to fall back to cache"
) from exc
if now - fresh.authority_published_at > resolve_deadline:
raise StaleAnchorSetError(
f"freshly resolved anchor set is itself stale by "
f"{now - fresh.authority_published_at:.1f}s"
)
return cred.chain[-1] in fresh.anchors
staleness = now - cached.authority_published_at
if staleness > DEFAULT_MAX_STALENESS:
raise StaleAnchorSetError(
f"cached anchor set stale by {staleness:.1f}s "
f"(bound {DEFAULT_MAX_STALENESS:.0f}s) for action {action_class!r}"
)
return cred.chain[-1] in cached.anchors
_KNOWN_ACTIONS = frozenset({"read_only", "status_probe", "telemetry_emit"})