# What structural signals indicate a verifiable-credential federation is replaying a stale trust anchor during cross-org agent handoff **Date of Record:** 2026 November 27 **Scope:** Applies to federated agent systems where an agent in org A (the *presenter*) hands a task to an agent in org B (the *verifier*) and presents a Verifiable Credential (VC) chain rooted in a trust anchor (issuer DID document, JWKS, or trust registry entry) that is cached locally rather than resolved live. Does *not* apply to single-org deployments, to systems that resolve anchors on every handoff, or to pure capability-token (non-VC) transports. ## Core Distinction The failure is not "the credential is forged." It is "the credential was valid when the presenter's trust anchor was last refreshed, and the verifier is still treating that anchor as authoritative after the issuer has rotated keys, revoked the anchor, or been removed from the federation." The boundary that matters is between **anchor freshness** (is the root of trust still current?) and **credential validity** (does the signature verify against *some* root?). A verifier that only checks the latter will accept a credential whose chain terminates in a key the issuer retired three rotations ago. The non-obvious part: this is invisible to signature verification. The signature is mathematically valid. The VC's `expirationDate` may not have passed. The verifier's logs say "signature valid, issuer trusted." The system is *correct* against its stale view of the world and *wrong* against the world. Structural signals — not cryptographic errors — are the only early warning. ## What Was Observed In a two-org federation (A issues credentials to its worker agents; B accepts them to grant tool access), the following trace recurred after A rotated its issuer signing key: 1. A's issuer DID document was updated at `t0`; the old verification method `#key-2024-11` was deactivated and `#key-2025-05` added. A's revocation list was re-signed under the new key. 2. B's verifier had cached A's DID document at `t0 - 72h` with a TTL of 7 days. No refresh triggered. 3. At `t0 + 2h`, A's agent presented a credential signed by `#key-2024-11`. B verified the signature against the *cached* document, found `#key-2024-11` present and not marked deactivated (because the cached copy predates deactivation), and granted access. 4. The credential was in fact revoked at `t0 + 1h`. B's cached revocation list was also stale, so revocation check passed. 5. Access was granted for 6 hours until B's cache TTL expired and the next handoff failed — producing a *silent window* of unauthorized access bracketed by two correct-looking successes. The structural signals present throughout the window, none of which raised a hard error: - **Anchor `updated` timestamp older than the credential's `issuanceDate`.** The cached DID document's `updated` field was `t0 - 72h`; the presented credential was issued at `t0 + 1h`. A credential cannot legitimately be issued against an anchor state that predates it. This is the single highest-signal invariant and it requires no network call. - **Revocation-list version regression.** The cached revocation list carried `version: 41`; the credential's embedded `credentialStatus` referenced `version: 44`. A verifier holding a revocation list older than the one the credential points at is structurally stale by definition. - **Issuer key ID absent from the live anchor but present in cache** — detectable only on the next refresh, which is why the window is silent. - **Asymmetric success/failure across verifier replicas.** Replicas with different cache ages produced different verdicts for the same credential within minutes. Divergent verdicts on identical input are a structural signal of cache skew, not of a bad credential. ## Condition of Validity The invariant that bounds this failure is: **a verifier may accept a credential only if the trust anchor and revocation state it used are at least as new as the credential's own issuance and status references.** Formally, for credential `c` verified against anchor snapshot `s`: ``` s.updated >= c.issuanceDate s.revocationVer >= c.credentialStatus.version ``` This is checkable *offline* — it compares two timestamps and two integers already present in the payloads. It does not require live resolution; it only requires that the verifier refuse to verify when its snapshot is provably older than the artifact it is judging. The condition fails (and the guardrail must fire) exactly when a credential is newer than the anchor state used to validate it. Live resolution is one way to satisfy the invariant; refusing stale-snapshot verification is another and is strictly cheaper. The invariant does *not* hold when the issuer's clock is unsynchronized with the verifier's, so a bounded clock-skew allowance (typically ≤ 300s) must be subtracted from the `updated >= issuanceDate` comparison, or the guardrail will fire on legitimate fresh credentials. ## Decision Boundary The boundary is between **treating a stale anchor as a soft degradation** (verify anyway, log a warning, refresh in background) and **treating it as a hard precondition failure** (refuse the handoff, force synchronous refresh, or fail closed). Systems that choose "soft" produce exactly the silent window above, because the background refresh races the handoff and the handoff wins. The correct boundary: staleness relative to the *presented credential* is a hard failure; staleness relative to wall-clock TTL is a soft, background-refreshable condition. These are different predicates and must not share a code path. A 7-day TTL is fine for cache eviction; it is not fine as the gate on whether a given credential may be verified. The gate must be the per-credential comparison. A second boundary: **when the refresh itself fails** (issuer unreachable, registry timeout), the verifier must not fall back to the stale snapshot silently. Fail-closed is correct here; the presenting agent must surface a retryable handoff error to its orchestrator rather than receive a degraded grant. ## Operational Effect Enforcing the per-credential freshness invariant converts a silent 6-hour unauthorized-access window into an immediate, attributable handoff failure at `t0 + 2h`, with a structured error the presenter can act on (re-fetch anchor, re-sign credential under current key). The cost is a small increase in synchronous anchor fetches — bounded by the fact that fetches only trigger when a credential postdates the cache, which is rare in steady state and concentrated exactly at rotation events, where you *want* the fetch. The secondary effect is diagnostic: divergent verdicts across replicas disappear once every replica gates on the same per-credential predicate, because the predicate is a function of the credential and the local snapshot, not of cache age. Skew becomes visible as a uniform, explainable refusal rather than an intermittent, unexplainable grant. ``` ```python import time from dataclasses import dataclass class StaleTrustAnchorError(RuntimeError): """Raised when a credential is verified against an anchor/revocation snapshot that predates the credential's own issuance or status reference.""" pass @dataclass(frozen=True) class AnchorSnapshot: updated: float # epoch seconds, from DID doc / registry 'updated' revocation_version: int # from the cached revocation list @dataclass(frozen=True) class Credential: issuance_date: float # epoch seconds status_version: int # from credentialStatus issuer_key_id: str CLOCK_SKEW_ALLOWANCE = 300.0 # seconds; subtract before comparing def assert_anchor_fresh_enough(snapshot: AnchorSnapshot, cred: Credential) -> None: """Hard precondition: refuse to verify if the snapshot is provably older than the artifact it is judging. This is checkable offline.""" if snapshot.updated + CLOCK_SKEW_ALLOWANCE < cred.issuance_date: raise StaleTrustAnchorError( f"anchor updated at {snapshot.updated} precedes credential " f"issuance {cred.issuance_date} beyond skew allowance " f"({CLOCK_SKEW_ALLOWANCE}s); refusing verification of " f"credential signed by {cred.issuer_key_id}" ) if snapshot.revocation_version < cred.status_version: raise StaleTrustAnchorError( f"cached revocation version {snapshot.revocation_version} is older " f"than credential status reference {cred.status_version}; " f"revocation state is structurally stale" ) def verify_handoff(snapshot: AnchorSnapshot, cred: Credential, signature_valid: bool) -> bool: # Freshness gate runs BEFORE signature acceptance, so a mathematically # valid signature against a stale anchor cannot short-circuit the check. assert_anchor_fresh_enough(snapshot, cred) if not signature_valid: raise StaleTrustAnchorError( f"signature invalid for key {cred.issuer_key_id} under fresh anchor" ) return True ```