In what scenarios must an instance fence a revoked peer credential across a trust-domain boundary before accepting a delegated warrant

**Date of Record:** 2026 December 2 **Scope:** Applies to multi-agent systems where agent instances hold signed warrants/credentials from a home trust domain and delegate authority to peers in foreign trust domains. Does not apply to single-domain deployments with a shared revocation authority, nor to stateless request/response agents that never persist peer credentials across turns.

Core Distinction

There is a difference between *revocation propagation* (the fact that a credential is revoked gets published) and *revocation enforcement* (a foreign-domain verifier actually refuses the credential). The failure mode here is not that revocation messages are lost in transit—it is that a verifier holds a *cached, cryptographically valid* credential whose revocation event has not yet crossed the trust-domain boundary, and the verifier's local clock, CRL freshness window, and the issuer's revocation epoch disagree about whether the credential is still live. The dangerous case is a credential that is *still signature-valid* and *still inside its stated TTL* but *already revoked at the issuer*.

What Was Observed

An orchestrator agent in domain A delegated a subtask to a worker agent in domain B. The worker presented a warrant issued by A's authority, signed with A's key, with a 15-minute `nbf`/`exp` window. Domain B caches foreign warrants for 10 minutes to avoid re-verifying on every tool call, keyed by `(issuer_domain, subject_id, warrant_id)`. At t=0 the worker obtained the warrant and B cached it. At t=3min, A's authority revoked the worker's key after a prompt-injection incident poisoned the worker's episodic memory and caused it to attempt an out-of-scope tool call. A published the revocation to its own CRL endpoint and to a gossip channel. B's cache, however, is only invalidated on TTL expiry (t=10min) or on an explicit push over the A→B federation link—and the push channel was configured with a 30-second backoff retry that silently dropped after 3 failures because B's listener returned 503 during a rolling restart. Between t=3min and t=10min, B continued to accept the revoked warrant on every tool call: 47 accepted invocations, including 9 privileged ones. The worker's signature verified cleanly the entire time; the only signal that anything was wrong was a revocation event that never arrived.

The second-order effect was worse. At t=10min the cache expired, B re-fetched the CRL, saw the revocation, and *rejected* the warrant. But the worker had already persisted a mid-task checkpoint under the assumption its authority was valid, and on resume it presented the same warrant_id to a *sibling* verifier in domain C that had never seen the revocation at all. C accepted it. The revocation had propagated to B but not to C, and the worker's checkpoint carried no revocation epoch, so C could not tell the warrant was stale.

Condition of Validity

A verifier may accept a foreign warrant only if it can bind the warrant to a revocation epoch it has actually observed, not merely to a signature and a wall-clock TTL. Concretely, acceptance requires all of:

  1. The warrant carries an `issuer_epoch` (monotonic counter or epoch timestamp) from the issuing authority.
  2. The verifier has a *freshness proof* for the issuer's CRL at an epoch `>= issuer_epoch`—either a signed CRL whose `thisUpdate` is within the verifier's `max_staleness`, or a signed "still valid" heartbeat.
  3. The verifier's cache entry is keyed by `(issuer_domain, subject_id, warrant_id, issuer_epoch)` so that a revocation bumping the epoch invalidates the entry even if the TTL has not expired.
  4. On any failure to obtain a freshness proof within `max_staleness`, the verifier fails *closed* for privileged operations and fails *open* only for read-only operations explicitly marked `revocation_optional`.

The invariant: **a signature-valid warrant is not an authorization; it is a candidate authorization whose validity is conditional on a freshness proof the verifier must independently obtain.** TTL is a performance bound, not a security bound.

Decision Boundary

The boundary between "accept" and "fence" is not the TTL clock. It is the comparison of the warrant's `issuer_epoch` against the verifier's highest observed `issuer_epoch` for that issuer, combined with the age of the freshness proof:

The subtle case is a *rollback attack*: a malicious peer presents an old but valid CRL with a lower `thisUpdate` to convince the verifier that a revoked warrant is still live. The verifier must persist the highest observed `issuer_epoch` durably and refuse any CRL whose epoch is lower than the persisted high-water mark—otherwise a restart or a cache eviction resets the floor and reopens the window.

Operational Effect

Enforcing the freshness invariant turns revocation from a best-effort push into a verifier-side obligation. The cost is that every privileged tool call must be gated on a freshness proof, which means either (a) a short-TTL signed heartbeat from the issuer that the verifier can check cheaply, or (b) a synchronous CRL fetch that adds latency to the critical path. In practice the heartbeat model wins: the issuer publishes a signed `epoch` heartbeat every few seconds; verifiers cache it for `max_staleness` and fence when it goes stale. The 47-invocation window observed above collapses to at most `max_staleness` worth of invocations, and crucially the sibling-domain replay at C is blocked because the warrant's `issuer_epoch` is older than C's observed high-water mark once C has ever synced. The residual risk is a verifier that has *never* synced (cold start with no high-water mark); that verifier must treat `observed_epoch = -1` as "unknown" and fence privileged operations until first sync, not assume liveness.

from dataclasses import dataclass
from typing import Optional


class StaleCredentialFenced(RuntimeError):
    """Raised when a signature-valid warrant cannot be bound to a fresh revocation epoch."""
    pass


@dataclass
class Warrant:
    issuer_domain: str
    subject_id: str
    warrant_id: str
    issuer_epoch: int
    expires_at: float


@dataclass
class FreshnessProof:
    issuer_domain: str
    issuer_epoch: int
    this_update: float


class RevocationFencer:
    def __init__(self, max_staleness: float):
        self.max_staleness = max_staleness
        # Durable high-water mark per issuer; must survive restarts.
        self._epoch_floor: dict[str, int] = {}
        self._last_proof: dict[str, FreshnessProof] = {}

    def observe_proof(self, proof: FreshnessProof) -> None:
        floor = self._epoch_floor.get(proof.issuer_domain, -1)
        if proof.issuer_epoch < floor:
            # Rollback attempt: refuse to lower the floor.
            raise StaleCredentialFenced(
                f"rollback proof for {proof.issuer_domain}: "
                f"epoch {proof.issuer_epoch} < floor {floor}"
            )
        self._epoch_floor[proof.issuer_domain] = proof.issuer_epoch
        self._last_proof[proof.issuer_domain] = proof

    def authorize(self, warrant: Warrant, now: float, privileged: bool) -> bool:
        floor = self._epoch_floor.get(warrant.issuer_domain, -1)
        if floor < 0:
            if privileged:
                raise StaleCredentialFenced(
                    f"no observed epoch for {warrant.issuer_domain}; "
                    f"cannot authorize privileged warrant {warrant.warrant_id}"
                )
            return True  # read-only fail-open is permitted
        if floor < warrant.issuer_epoch:
            if privileged:
                raise StaleCredentialFenced(
                    f"verifier epoch {floor} behind warrant epoch "
                    f"{warrant.issuer_epoch} for {warrant.warrant_id}"
                )
            return True
        proof = self._last_proof.get(warrant.issuer_domain)
        if proof is None or (now - proof.this_update) > self.max_staleness:
            if privileged:
                raise StaleCredentialFenced(
                    f"freshness proof stale for {warrant.issuer_domain}; "
                    f"warrant {warrant.warrant_id} fenced"
                )
            return True
        if now > warrant.expires_at:
            return False
        return True