# Where must an instance re-verify a federated credential when the issuer's revocation epoch has advanced past the agent's cached attestation window? **Date of Record:** 2026 December 1 **Scope:** Applies to multi-agent systems where agent instances present cross-issuer credentials (JWTs, capability tokens, signed warrants) to peer/auditor instances, and where each issuer maintains a monotonic revocation epoch. Does not apply to single-issuer, single-tenant deployments where issuance and verification share one trust root and one clock. ## Core Distinction The distinction that matters is between **credential validity** and **credential liveness**. Validity is a static predicate: the signature verifies, the claims match the requested capability, the `nbf`/`exp` window contains the current time. Liveness is a temporal predicate: the issuer has not, since the credential was minted, advanced its revocation epoch past the epoch the credential was issued under. Most federated identity code paths conflate these. They verify the signature, check expiry, cache the result keyed on the credential hash, and treat the cached "valid" verdict as durable for the duration of the `exp` window. This is correct for a single issuer that never revokes. It is wrong the moment a second issuer exists, because the *peer* agent's verifier has no channel to observe the remote issuer's epoch counter except through whatever fresh artifact it fetches — and it usually fetches nothing after the first successful verification. The non-obvious boundary: an agent can hold a credential that is **cryptographically valid, unexpired, and claim-correct, yet semantically revoked** because the issuing authority advanced its epoch between issuance and presentation. The verifier's cache cannot see that advancement. The credential does not self-invalidate; only the issuer's epoch log knows it is dead. ## What Was Observed A three-tier swarm: an orchestrator instance `O`, a worker `W`, and an independent auditor `A`. `W` obtains a capability warrant from issuer `I₁` (the orchestrator's authority) granting `tool:db.write` scoped to tenant `t-42`. `W` presents this warrant to `A` for a pre-execution audit gate. `A` verifies against `I₁`'s published JWKS, checks `exp`, confirms the scope claim, and caches `(warrant_jti → valid)` for 300 seconds. At `t+40s`, `O` detects that `W`'s prior task diverged (a reasoning-loop failure that caused an out-of-scope write attempt) and instructs `I₁` to revoke the warrant. `I₁` increments its revocation epoch from `E=1187` to `E=1188` and appends the `jti` to the epoch `E=1188` revocation set. The warrant's signature is untouched; its `exp` is still 5 minutes out. At `t+95s`, `W` retries the audit gate with the same warrant. `A` hits its cache, returns `valid`, and admits the write. The audit trail records `decision=allow, credential=warrant_0x9f, verified_at=t+12s, cache_hit=true`. The revocation at `E=1188` is invisible in the audit record because the verifier never consulted the epoch log — it consulted its own memory of a past consultation. The failure was not a signature forgery, a clock skew, or a claim mismatch. It was a **stale positive**: a cached affirmative verdict surviving a state transition (epoch advance) that the cache had no subscription to. The audit trail is the tell — it records *when the credential was verified*, not *what epoch the verification was valid against*. ## Condition of Validity The invariant that was violated: > A cached credential verdict is valid only for the issuer epoch `E_observed` at the moment of verification. If the verifier cannot prove `E_current ≤ E_observed` at decision time, the verdict must be discarded and re-derived. This is a **bounded-staleness invariant on the epoch, not on the credential**. The credential's `exp` bounds how long the issuer promises not to change its mind *without* revocation; it says nothing about how long the verifier may trust its own memory. Those are different clocks and the system conflated them. The condition under which the invariant holds in practice requires one of three mechanisms, and the choice is architectural, not incidental: 1. **Epoch push.** The issuer broadcasts epoch advances to subscribed verifiers (webhook, gossip, or a shared monotonic counter in a strongly-consistent store). The verifier's cache is invalidated on receipt. Requires the verifier to be reachable and the channel to be ordered; a missed push silently reintroduces the stale positive. 2. **Epoch pull with bound.** The verifier re-fetches the issuer's current epoch counter before every decision, and the cache TTL is set to `min(exp, epoch_poll_interval)`. Requires the epoch endpoint to be cheap and the poll interval to be shorter than the shortest revocation-to-exploit window the threat model admits. 3. **Short-lived credentials with epoch binding.** The credential itself carries the epoch it was issued under (`epoch: 1187`), and the verifier rejects any credential whose embedded epoch is older than the issuer's current epoch by more than one. This trades revocation latency for issuance churn: every epoch advance forces re-issuance, which is expensive but eliminates the cache-staleness surface entirely. The observed system used none of these. It used a fixed 300-second TTL keyed on the credential hash, which is mechanism (2) *without the epoch fetch* — a pull with nothing to pull. ## Decision Boundary The decision boundary is where the verifier must choose between honoring its cache and re-consulting the issuer. The rule: - If the credential's issuer is in the **same trust domain** as the verifier (shared root, shared clock, shared revocation store), the cache is sound up to `exp` and no epoch check is needed. - If the issuer is in a **foreign trust domain** (cross-issuer federation), the cache is sound only up to `min(exp, last_epoch_observation + max_staleness)`, where `max_staleness` is a declared, audited parameter — not a default. - If the verifier **cannot observe the issuer's epoch** (network partition, issuer down), it must fail closed on any decision that requires liveness, or degrade to a read-only capability set that does not depend on the revoked scope. The subtle boundary: `max_staleness` must be smaller than the **revocation-to-harm latency** of the most dangerous capability the credential grants. A warrant for `tool:db.read` may tolerate 300 seconds of staleness; a warrant for `tool:db.write` or `tool:funds.transfer` may tolerate zero. The observed system applied one TTL to all scopes, which is the same error as applying one timeout to all tool calls — it optimizes for the median case and fails the tail. ## Operational Effect The audit trail became non-reconstructive. Because the verifier logged `verified_at` but not `epoch_at_verification`, a post-incident replay could not distinguish "the credential was live when checked" from "the credential was dead but the cache was warm." The auditor `A`, which was supposed to be the independent check, was in fact the *most* stale node in the system — it had the longest cache TTL because it was assumed to be read-mostly. The downstream effect compounded: `W`'s out-of-scope write succeeded, `A`'s audit record attested to a valid authorization, and the revocation event at `E=1188` existed only in `I₁`'s log — a log nobody queried after the fact because the audit trail *looked* complete. The failure was not detected by the verification layer; it was detected hours later by a data-integrity check on tenant `t-42` that noticed writes from a task `W` had been told to abandon. The guardrail that bounds this: every cross-issuer verification decision must emit a tuple `(credential_jti, issuer_id, epoch_observed, decision, decision_time)` into the audit log, and the verifier must refuse to serve a cached verdict whose `epoch_observed` is older than the issuer's last-known epoch by more than `max_staleness`. The audit record is only reconstructible if it names the epoch it was valid against — otherwise it is a timestamped assertion with no referent. The code below enforces the invariant at the verification boundary and raises when a cached verdict is presented against an advanced epoch. ```python from dataclasses import dataclass from typing import Optional class StaleEpochVerdict(RuntimeError): """Raised when a cached credential verdict is honored against an issuer epoch that has advanced past the verifier's observation window.""" pass @dataclass(frozen=True) class Verdict: jti: str issuer_id: str epoch_observed: int decision: str # "allow" | "deny" decided_at: float # monotonic seconds @dataclass(frozen=True) class IssuerState: issuer_id: str current_epoch: int revoked_jtis: frozenset class FederatedVerifier: def __init__(self, max_staleness: float, scope_sensitive: frozenset): self.max_staleness = max_staleness self.scope_sensitive = scope_sensitive # scopes that tolerate zero staleness self._cache: dict[str, Verdict] = {} def verify(self, jti: str, issuer: IssuerState, scope: str, now: float) -> Verdict: cached: Optional[Verdict] = self._cache.get(jti) if cached is not None: epoch_advanced = issuer.current_epoch > cached.epoch_observed staleness = now - cached.decided_at # Zero-tolerance scopes: any epoch advance invalidates the cache. if scope in self.scope_sensitive and epoch_advanced: raise StaleEpochVerdict( f"cached verdict for {jti} observed epoch {cached.epoch_observed}, " f"issuer now at {issuer.current_epoch}; scope {scope} tolerates zero staleness" ) # General scopes: bounded staleness on the epoch, not on exp. if epoch_advanced and staleness > self.max_staleness: raise StaleEpochVerdict( f"cached verdict for {jti} is {staleness:.1f}s stale against " f"epoch advance {cached.epoch_observed}->{issuer.current_epoch}" ) if jti in issuer.revoked_jtis: raise StaleEpochVerdict( f"cached verdict for {jti} is positive but jti appears in " f"revocation set at epoch {issuer.current_epoch}" ) return cached decision = "deny" if jti in issuer.revoked_jtis else "allow" verdict = Verdict( jti=jti, issuer_id=issuer.issuer_id, epoch_observed=issuer.current_epoch, decision=decision, decided_at=now, ) self._cache[jti] = verdict return verdict ```