# When must an instance refuse a delegated credential whose revocation proof is newer than its own witness **Date of Record:** 2026 November 24 **Scope:** Applies to agents that execute under AAIF delegated credential chains (root issuer → delegating agent → executing agent) where revocation is checked against a witness/attestation timestamp rather than a live revocation endpoint. Does not cover single-hop bearer credentials, mTLS-only identity, or chains where every hop performs synchronous OCSP-style revocation lookups. ## Core Distinction The failure here is not "revoked credential accepted." It is subtler: **a credential whose revocation status was valid at witness time but invalid at execution time, where the executing instance's local clock and witness horizon disagree about which instant governs.** AAIF delegation chains carry two independent temporal facts per hop: 1. **`not_after` / delegation expiry** — a property of the credential itself, signed by the delegator. 2. **`revocation_witness`** — a signed statement from a witness service asserting "as of instant `W`, credential `C` was not revoked." A naive executor checks `now < not_after` and `W >= last_known_revocation_epoch` and proceeds. This is wrong. The correct invariant is that the **execution instant must be bracketed by a witness horizon that the executor can prove is not stale**, not merely that a witness statement exists. When a revocation lands *after* the witness instant `W` but *before* execution, the credential is revoked at execution time while every field the executor checked still reads valid. The instance must treat a witness whose freshness window has lapsed as *unknown*, not *valid* — and unknown must fail closed. ## What Was Observed A three-hop chain (`issuer → orchestrator → worker`) executed a tool call against a privileged resource. The orchestrator had cached the worker's `revocation_witness` at `W = T-40s` with a declared freshness bound of `max_witness_age = 30s`. The worker's credential was revoked at `T-15s` (a policy action triggered by anomalous prior tool usage). At `T`, the worker presented the cached witness, `now - W = 40s > 30s`, but the worker's own validation compared `W` against `not_after` (still 6 hours out) and against the *last revocation epoch it had personally seen* (empty). Both comparisons passed. The tool call executed. The trace shows the exact divergence: ``` T-40s witness signs {cred: W_cred, not_revoked_as_of: T-40s} T-15s revocation event: W_cred → REVOKED (epoch E_rev) T-00s worker validates: now (T) < not_after (T+6h) -> PASS W (T-40s) >= last_seen_epoch (none) -> PASS (vacuously) now - W = 40s vs max_witness_age 30s -> NOT CHECKED -> tool call admitted ``` The single missing comparison — `now - W <= max_witness_age` — is the whole bug. Every other field was internally consistent. The witness was real, the signature verified, the credential was unexpired. Only the *freshness bracket* was violated, and freshness is not a field of the credential; it is a relation between the credential's witness and the executor's own clock. A second observation compounded it: the orchestrator, on receiving the worker's post-execution audit record, re-validated and *did* catch the staleness — but only after the side effect. The orchestrator's validator and the worker's validator disagreed on the same credential at the same instant because the worker used `last_seen_epoch` (local, empty) while the orchestrator used `current_epoch` (global, `E_rev`). **Two validators, two notions of "current," one admitted call.** ## Condition of Validity The invariant that bounds this failure is a **freshness-bracketed witness**, stated precisely: > A delegated credential is executable at instant `t` iff there exists a witness statement `w` such that `sig_valid(w) ∧ w.cred == cred ∧ w.not_revoked_as_of <= t ∧ (t - w.not_revoked_as_of) <= max_witness_age(cred)` **and** the executor's `current_epoch >= w.epoch`. The critical term is `t - w.not_revoked_as_of <= max_witness_age`. This is *not* a property of the credential; it cannot be verified by inspecting the credential alone. It requires the executor to hold a trustworthy `t` and to know `max_witness_age`, which is a *policy* parameter, not a *credential* field. An executor that does not know its own `max_witness_age` cannot evaluate this clause and must treat the witness as unknown. The invariant fails in three distinct ways, each of which must be caught separately: - **Stale witness** (`t - W > max_age`): revocation may have occurred in the gap. Fail closed. - **Future witness** (`W > t`): clock skew or forged witness. Fail closed; a witness cannot attest to an instant the executor has not reached. - **Epoch regression** (`current_epoch < w.epoch`): the executor's revocation view is behind the witness's. Fail closed; the executor is the stale party. The `current_epoch >= w.epoch` clause is the one most often omitted, and it is the one that catches the orchestrator/worker divergence above. A witness is only as good as the executor's ability to prove it is not *older* than the executor's own revocation knowledge. ## Decision Boundary The boundary between "admit" and "refuse" is not a single comparison but a conjunction over four independent predicates, and the executor must evaluate them in an order that prevents short-circuiting past the freshness check: | Predicate | Source | Failure mode if skipped | |---|---|---| | `sig_valid(w)` | witness signature | forged witness admitted | | `w.cred == cred` | binding | witness for a different credential reused | | `0 <= t - W <= max_age` | executor clock + policy | stale/future witness admitted | | `current_epoch >= w.epoch` | executor revocation store | executor behind revocation frontier | The non-obvious part: **predicate 3 is the only one that depends on the executor's own state (`t`, `max_age`), and it is the only one a credential-only validator cannot check.** An executor that validates by inspecting the credential (the common pattern, because credentials are what get passed around) will systematically skip predicate 3 and admit stale witnesses. The decision boundary is therefore *not* "is this credential valid" but "can I prove this credential's validity is current *relative to my own clock and revocation frontier*." When the executor cannot establish `t` (no trusted clock) or does not know `max_age` (policy not propagated to the hop), the boundary is **unknown**, and unknown must map to refuse. An executor that treats unknown as admit has moved the boundary to "any credential with a syntactically valid witness," which is no boundary at all. ## Operational Effect The concrete effect of enforcing the invariant is a **fail-closed admission rate** that is strictly lower than credential-only validation, and the gap between the two rates is exactly the population of stale-witness admissions. In the observed incident that population was one call, but the structural exposure is proportional to `revocation_rate × max_witness_age` — the probability that a revocation lands inside any given freshness window. With `max_witness_age = 30s` and a revocation rate of one per hour per credential, roughly 0.8% of admissions occur in a window where a revocation could have landed unseen. Tightening `max_witness_age` shrinks the exposure linearly but increases witness-fetch load; the parameter is a *security-latency tradeoff owned by the executor*, not by the issuer, and it must be configured per-hop. Two operational consequences follow: 1. **Witness caching must carry its own expiry.** A cached witness is a `(statement, fetched_at)` pair, and `fetched_at` — not `not_revoked_as_of` — governs freshness. Caching only the statement drops the bracket and reintroduces the bug. 2. **Revocation epoch must propagate through the chain.** If the orchestrator knows `E_rev` and the worker does not, the worker's `current_epoch` is stale and predicate 4 fails for a credential the orchestrator would admit. The epoch must travel with the delegation, not be re-derived locally. The invariant is bounded and checkable. It is not a property of the credential, and no amount of credential inspection substitutes for it. ```python import time from dataclasses import dataclass class StaleWitnessError(RuntimeError): """Raised when a delegated credential's revocation witness cannot be proven current relative to the executor's own clock and revocation frontier.""" @dataclass(frozen=True) class Witness: cred_id: str not_revoked_as_of: float # instant W, signed by witness service epoch: int # revocation epoch the witness observed signature_valid: bool @dataclass(frozen=True) class ExecutorState: now: float # trusted local clock current_epoch: int # executor's revocation frontier max_witness_age: float # per-hop policy, NOT a credential field def admit_delegated(cred_id: str, w: Witness, st: ExecutorState) -> bool: if not w.signature_valid: raise StaleWitnessError(f"witness signature invalid for {cred_id}") if w.cred_id != cred_id: raise StaleWitnessError( f"witness binding mismatch: witness for {w.cred_id}, presented for {cred_id}" ) age = st.now - w.not_revoked_as_of if age < 0: raise StaleWitnessError( f"future witness for {cred_id}: W={w.not_revoked_as_of} > now={st.now}" ) if age > st.max_witness_age: # The credential may be revoked in the gap (W, now]. Fail closed. raise StaleWitnessError( f"stale witness for {cred_id}: age={age:.1f}s exceeds " f"max_witness_age={st.max_witness_age:.1f}s" ) if st.current_epoch < w.epoch: # Executor is behind the revocation frontier the witness observed. raise StaleWitnessError( f"epoch regression for {cred_id}: executor epoch={st.current_epoch} " f"< witness epoch={w.epoch}" ) return True # --- exercise the boundary --- if __name__ == "__main__": now = time.time() w = Witness(cred_id="worker-7", not_revoked_as_of=now - 40, epoch=11, signature_valid=True) st = ExecutorState(now=now, current_epoch=11, max_witness_age=30) try: admit_delegated("worker-7", w, st) # 40s > 30s -> must refuse except StaleWitnessError as e: print(f"refused as required: {e}") ```