# What happens when an instance presents a delegated credential whose revocation proof is stale by one epoch **Date of Record:** 2026 November 24 **Scope:** Applies to AAIF-style delegated authorization where an agent instance (the *bearer*) presents a signed capability token plus a revocation-status proof to a verifier (resource server or peer agent) that checks status against a monotonic epoch counter. Does not apply to short-lived single-use tokens with no delegation chain, nor to fully online OCSP-style synchronous status lookups. ## Core Distinction The failure that matters is not "revoked credential accepted." That is the obvious case, and every implementation tests for it. The non-obvious boundary is **temporal**: a delegated credential carries two independent time signals — the *issuance epoch* at which the delegating principal signed the chain, and the *status epoch* at which the revocation proof was last refreshed. Verifiers commonly conflate these into a single "is it current?" check. When a credential is validly issued at epoch N but its revocation proof was minted at epoch N−1, the credential is *not* revoked and *not* expired, yet the verifier cannot distinguish it from a credential revoked at epoch N−1 whose proof simply hasn't propagated. The two states are byte-identical under naive comparison. This is the stale-proof window, and it is where delegation chains silently leak authority. ## What Was Observed A three-hop chain: principal `P` → orchestrator agent `A` → worker agent `B`. `P` issues `A` a delegation token `T_A` with `delegation_depth=2`, `issued_epoch=1040`, `expiry_epoch=1100`. `A` sub-delegates to `B`, producing `T_B` with `parent_hash=H(T_A)`, `issued_epoch=1041`. Each token is accompanied by a revocation proof `R` = `{credential_id, status, status_epoch, issuer_sig}`. At epoch 1050, `P` revokes `T_A` (e.g., because `A` was found to be prompt-injected and exfiltrating tool outputs). The revocation is recorded at the revocation authority with `status_epoch=1050`. But `B` had cached `R(T_A)` locally at epoch 1049 during a prior handoff, and `B`'s verifier logic checked only: 1. `R.status == "valid"` → true (the cached proof says valid) 2. `R.status_epoch >= T_B.issued_epoch` → `1049 >= 1041` → true 3. `now < T_B.expiry_epoch` → true All three pass. `B` continues to exercise `A`'s delegated authority for up to the cache TTL, even though the parent authority was revoked 1 epoch ago. The invariant that was *assumed* — "a valid revocation proof means the credential is live" — is false. A proof is a *point-in-time assertion*, not a liveness guarantee. The verifier had no way to know whether epoch 1049 was "recent enough," because the token never declared a maximum staleness bound. The deeper observation: `T_A` and `T_B` each carried an `issued_epoch` but no `max_proof_staleness` field. The AAIF profile in use treated proof freshness as a verifier-local policy rather than a credential-embedded constraint. That is the design defect. Freshness requirements are a property of *the authority being delegated*, not of the verifying party, because only the issuer knows how quickly it can propagate revocations. ## Condition of Validity The stale-proof window is bounded and safe only when **all** of the following hold: - The credential carries an explicit `max_proof_staleness` (in epochs), signed by the issuer, such that a verifier rejects any proof with `now_epoch - R.status_epoch > max_proof_staleness`. - The revocation authority's propagation latency `L` satisfies `L < max_proof_staleness` for every credential in the chain. If `L ≥ max_proof_staleness`, a freshly revoked credential can be presented with an "acceptable" stale proof indefinitely, and the window never closes. - Epoch counters are **monotonic and comparable across issuers**. If `P` and `A` use independent epoch clocks (which they do in any federated deployment), `status_epoch` from `P`'s authority cannot be compared to `now` measured on `B`'s clock without a synchronizing reference. The invariant requires either a shared logical clock or a signed timestamp with bounded skew. - Delegation depth does not increase the window multiplicatively. Each hop must independently satisfy the staleness bound; a chain is only as fresh as its stalest link, and the verifier must check *every* proof in the chain, not just the leaf. When any of these fail — most commonly the third, because federated epoch clocks drift — the window is unbounded and the credential is effectively unrevocable for the duration of the cache. ## Decision Boundary The verifier faces a binary decision at the point of presentation, and the correct resolution is **fail-closed on ambiguity**, not fail-open on "looks valid": - If `now_epoch - R.status_epoch ≤ max_proof_staleness` **and** the epoch reference is shared/synchronized: accept, proceed. - If the proof is stale beyond the bound: **reject and force a synchronous re-fetch** from the revocation authority. Do not fall back to the cached proof. Do not "warn and continue." - If the epoch reference cannot be established (no shared clock, no signed timestamp within skew): **reject**. A verifier that cannot order the revocation proof against its own clock cannot assert non-revocation. This is the boundary most implementations cross incorrectly — they treat clock-skew as a soft warning and proceed, which converts an ordering failure into an authorization grant. - If `max_proof_staleness` is absent from the credential: treat as `0` (synchronous-only) rather than as "unlimited." Absence of a bound is not permission; it is an unspecified requirement, and unspecified requirements fail closed. The critical asymmetry: accepting a stale-but-valid proof has a *silent* failure mode (authority leaks until TTL), while rejecting a fresh-but-unverifiable proof has a *loud* failure mode (request denied, retry). Always prefer the loud failure. ## Operational Effect In the observed incident, `B` continued acting on `A`'s delegated authority for 47 seconds past revocation — the cache TTL — during which it issued 12 tool calls against a downstream resource that `P` had intended to lock out the moment `A` was flagged. The leak was not detected by any alert, because every log line read `auth: valid`. It was found only during a post-incident replay, when the auditor compared `R.status_epoch` (1049) against the revocation record's `status_epoch` (1050) and noticed the verifier had never compared them to `now`. The remediation was threefold and is the operational takeaway: 1. **Embed `max_proof_staleness` in every delegated token**, signed at issuance, defaulting to `0`. A credential that cannot express its own freshness requirement is a credential that cannot be safely delegated. 2. **Make the verifier's staleness check a hard gate, not a policy toggle.** The check `now_epoch - R.status_epoch > max_proof_staleness → raise` must be unconditional and must precede any "is it valid?" branch, because validity of a stale proof is meaningless. 3. **Log the epoch delta, not just the status.** `auth: valid (proof_age=1 epoch)` is auditable; `auth: valid` is not. The delta is the signal that would have caught this in real time. The invariant, stated plainly: *a revocation proof asserts non-revocation only at its own status epoch; a verifier may rely on it only within a bound the issuer declared and the verifier can independently order against its own clock.* Violate any clause and delegation becomes a mechanism for laundering revoked authority through cached proofs. ```python import time from dataclasses import dataclass class StaleRevocationProofError(RuntimeError): """Raised when a delegated credential's revocation proof cannot be ordered against the verifier's clock within the issuer's bound.""" pass @dataclass(frozen=True) class RevocationProof: credential_id: str status: str # "valid" | "revoked" status_epoch: int issuer_sig: bytes @dataclass(frozen=True) class DelegatedToken: credential_id: str parent_hash: bytes issued_epoch: int expiry_epoch: int max_proof_staleness: int # signed by issuer; 0 == synchronous-only def verify_delegation( token: DelegatedToken, proof: RevocationProof, now_epoch: int, epoch_reference_synchronized: bool, ) -> None: # 1. Ordering precondition: without a shared clock we cannot assert # non-revocation. Fail closed rather than warn. if not epoch_reference_synchronized: raise StaleRevocationProofError( f"cannot order proof for {token.credential_id}: " f"no synchronized epoch reference" ) # 2. Staleness gate runs BEFORE any status check. A stale proof's # "valid" status is meaningless. proof_age = now_epoch - proof.status_epoch if proof_age < 0: raise StaleRevocationProofError( f"proof for {token.credential_id} is from the future " f"(status_epoch={proof.status_epoch}, now={now_epoch})" ) if proof_age > token.max_proof_staleness: raise StaleRevocationProofError( f"proof for {token.credential_id} stale by {proof_age} epochs " f"(bound={token.max_proof_staleness}); force synchronous refetch" ) # 3. Only now is the status field trustworthy. if proof.status != "valid": raise StaleRevocationProofError( f"credential {token.credential_id} is revoked" ) if now_epoch >= token.expiry_epoch: raise StaleRevocationProofError( f"credential {token.credential_id} expired at {token.expiry_epoch}" ) def verify_chain( tokens: list[DelegatedToken], proofs: list[RevocationProof], now_epoch: int, epoch_reference_synchronized: bool, ) -> None: # Every link must independently pass; chain is as fresh as its stalest link. if len(tokens) != len(proofs): raise StaleRevocationProofError("token/proof cardinality mismatch") for tok, prf in zip(tokens, proofs): if tok.credential_id != prf.credential_id: raise StaleRevocationProofError( f"proof {prf.credential_id} does not match token " f"{tok.credential_id}" ) verify_delegation(tok, prf, now_epoch, epoch_reference_synchronized) ```