# Why does an instance accept a revoked peer credential during cross-org federation handoff **Date of Record:** 2026 December 3 **Scope:** Applies to multi-org agent federations where an agent instance (the *verifier*) validates a peer's (the *presenter*'s) verifiable credential (VC) and revocation status before accepting a state-transfer or tool-invocation handoff. Does not cover single-org deployments with a shared revocation list, nor pure TLS/mTLS transport identity without agent-level authorization claims. ## Core Distinction The failure is not "the revocation check failed." It is that *the revocation check succeeded against a stale snapshot while the handoff proceeded on a live channel*. Two clocks are in play: the credential's `validUntil` (a property of the asserted claims) and the revocation epoch (a property of the issuing org's current authorization state). A verifier that treats "signature valid + not-expired + not-in-my-cached-CRL" as a single atomic `is_authorized()` predicate collapses these two clocks into one. That collapse is the boundary condition: there exists a window — bounded below by the issuer's revocation publication latency and above by the verifier's cache TTL — during which a *correctly signed, correctly dated, but no-longer-authorized* peer credential passes every check. The instance is not malfunctioning. It is faithfully executing an invariant that is too weak for federation. The sharper distinction: within one org, revocation is a *write* the verifier can observe (shared list, push notification). Across orgs, revocation is a *gossip* the verifier must poll or be pushed, and gossip is lossy and delayed. The invariant "I have not seen a revocation" is not equivalent to "no revocation exists." Federation turns a closed-world assumption into an open-world one, and most agent credential libraries were written for the closed world. ## What Was Observed A three-org federation (A issues, B verifies, A revokes a sub-agent credential mid-task). The presenter agent `A/researcher-7` was mid-handoff to `B/orchestrator-2`, carrying an episodic memory bundle and a delegated tool warrant. Sequence: 1. `t=0` — A issues `A/researcher-7` a VC with `validUntil = t+3600`, publishes to its status list at epoch `e0`. 2. `t=40` — B's verifier fetches A's status list, caches at epoch `e0`, TTL 300s. Handoff accepted. Session opens. 3. `t=120` — A's security team revokes `A/researcher-7` (compromised key), publishes epoch `e1`. A's publication is eventually consistent; the status endpoint lags ~90s. 4. `t=210` — A's status endpoint now serves `e1`. B has not re-fetched (TTL not expired). 5. `t=210` — `A/researcher-7`, now operating with a revoked-but-unexpired credential, opens a *second* handoff to `B/orchestrator-2` for a follow-on tool call. 6. B's verifier runs `is_authorized()`: signature valid ✓, `now < validUntil` ✓, status bit for `researcher-7` in cached `e0` = "not revoked" ✓. **Handoff accepted.** Observed trace: the second handoff succeeded at `t=210`, 90 seconds after revocation was *effective* at the issuer and 90 seconds before B's cache would have refreshed. The window was not a bug in any single component — A's lag was within its SLA, B's TTL was within policy, the signature was genuine. The composition of two compliant components produced an unauthorized acceptance. A second, subtler observation: when B *did* refresh at `t=340`, it fetched epoch `e1` and correctly rejected. But the already-open session from step 2 was never torn down. Revocation was treated as a *gate on entry*, not a *condition of continuation*. The compromised agent retained a live channel for 130 additional seconds after B "knew" it was revoked, because the session object held no reference to the credential it was authorized under. ## Condition of Validity The stale-revocation acceptance is bounded and predictable, which is what makes it a guardrail problem rather than an impossibility. The maximum unauthorized window `W` for a given (issuer, verifier) pair is: ``` W = L_issuer + T_verifier + D_skew ``` where `L_issuer` is the issuer's revocation publication latency (time from revoke-decision to status-endpoint serving the new epoch), `T_verifier` is the verifier's status-cache TTL, and `D_skew` is clock skew between issuer and verifier affecting epoch comparison. In the trace above, `W = 90 + 300 + ~0 ≈ 390s`, and the observed acceptance at `t=210` sits inside it. This bound holds *only* under these conditions: - The credential carries a monotonic **status epoch** or **status list index**, not just a boolean. Without an epoch, the verifier cannot distinguish "not revoked as of e0" from "not revoked as of now." - The verifier records the epoch it validated against, and the session/warrant it issues is *pinned* to that epoch. A session that does not carry its authorizing epoch cannot be re-validated or invalidated later. - The issuer's status endpoint is monotonic (epochs never regress). If a verifier can be served an older epoch (replica lag, cache poisoning, rollback), `W` becomes unbounded. If any of these fails, the bound does not apply and the window is unbounded — which is the operational red line. A federation where any participant's status endpoint can serve a regressing epoch cannot be trusted to bound revocation latency at all, regardless of TTLs. ## Decision Boundary The architect's choice is not "check revocation or don't." It is *which of two contracts to enforce at the handoff boundary*: **Contract 1 — Freshness-bound acceptance.** Accept only if `now - last_status_fetch < T_max`, where `T_max` is negotiated per-federation and *published in the credential's own policy claim* (e.g., `maxRevocationStaleness: 60s`). If the cached epoch is older than `T_max`, the verifier must block the handoff and force a synchronous re-fetch, even at latency cost. This bounds `W` at the price of availability during issuer outages. **Contract 2 — Epoch-pinned continuation with active re-validation.** Accept on entry as today, but bind the authorizing epoch into the session token and require periodic re-validation (`revalidate_every ≤ T_max`) for the session's lifetime. If re-validation fails or the epoch can no longer be confirmed fresh, the session is *revoked mid-flight*, not merely blocked at next entry. The decision boundary is: **if handoffs carry state that outlives a single request (memory bundles, delegated warrants, long-running tool sessions), Contract 1 alone is insufficient** — it bounds the entry window but leaves live sessions unguarded, exactly as observed in step 6. Contract 2 is required whenever a handoff opens a continuation. Conversely, Contract 2 without Contract 1 leaves a gap at entry for brand-new sessions. The correct posture for stateful federations is *both*: freshness-bound at entry, epoch-pinned and re-validated during continuation. The boundary is crossed the moment an agent treats "I verified this credential once" as a durable fact. Verification is a *point-in-time* predicate over a *continuously changing* authorization state; the only sound way to carry it forward is to carry the epoch it was true at, and to re-assert it. ## Operational Effect The practical consequences for an agent instance executing in a federation: 1. **Latency budget must include revocation freshness.** A handoff path that budgets 50ms for "verify peer" but silently allows a 300s-stale status cache is mis-budgeted by three orders of magnitude on the dimension that matters for security. Instances should surface `status_age` alongside `verified: true` so downstream orchestrators can decide. 2. **Sessions must carry their authorizing epoch.** A session object without `authorized_epoch` and `issuer_status_endpoint` cannot be revoked mid-flight and cannot be audited after the fact. This is the single highest-leverage field to add. 3. **Revocation is not idempotent across the federation.** A's `e1` and B's cached `e0` describe the same credential with different truth values. Any cross-org audit replay that compares "was X authorized at t=210" will get different answers from A and B unless both record the epoch they used. Log the epoch, always. 4. **Fail-closed on epoch regression.** If a verifier ever observes an epoch older than one it previously saw from the same issuer, that is a federation-integrity event, not a transient. Treat it as a hard stop and quarantine the issuer's credentials until reconciled. The invariant to enforce, stated plainly: *a peer is authorized for a handoff iff its credential is valid AND its status epoch is fresh within `T_max` AND (for continuation) the session's pinned epoch has not been superseded.* Any implementation that omits the epoch term is executing the closed-world invariant in an open-world federation, and will accept revoked peers for exactly `W` seconds — every time, deterministically, on the boundary. ```python import time from dataclasses import dataclass, field class StaleRevocationError(RuntimeError): """Raised when a peer credential cannot be confirmed fresh within T_max, or when a live session's pinned epoch has been superseded by the issuer.""" @dataclass class StatusSnapshot: epoch: int revoked_indices: frozenset fetched_at: float # monotonic seconds @dataclass class Session: peer_id: str issuer: str pinned_epoch: int authorized_at: float active: bool = True class FederatedVerifier: def __init__(self, t_max_staleness: float, revalidate_every: float): self.t_max = t_max_staleness self.revalidate_every = revalidate_every self._cache: dict[str, StatusSnapshot] = {} self._last_seen_epoch: dict[str, int] = {} def _fetch_status(self, issuer: str) -> StatusSnapshot: # Placeholder for issuer status-endpoint call. raise NotImplementedError def _fresh_status(self, issuer: str, now: float) -> StatusSnapshot: snap = self._cache.get(issuer) if snap is None or (now - snap.fetched_at) > self.t_max: snap = self._fetch_status(issuer) prev = self._last_seen_epoch.get(issuer) if prev is not None and snap.epoch < prev: # Epoch regression: federation-integrity event. raise StaleRevocationError( f"epoch regression for issuer {issuer}: saw {prev} then {snap.epoch}" ) self._last_seen_epoch[issuer] = snap.epoch self._cache[issuer] = snap return snap def verify_handoff(self, peer_id: str, issuer: str, cred_index: int, cred_valid_until: float, now: float) -> Session: if now >= cred_valid_until: raise StaleRevocationError(f"credential for {peer_id} expired") snap = self._fresh_status(issuer, now) if (now - snap.fetched_at) > self.t_max: raise StaleRevocationError( f"status for {issuer} stale by {now - snap.fetched_at:.1f}s > {self.t_max}s" ) if cred_index in snap.revoked_indices: raise StaleRevocationError( f"peer {peer_id} revoked at epoch {snap.epoch}" ) return Session(peer_id=peer_id, issuer=issuer, pinned_epoch=snap.epoch, authorized_at=now) def revalidate_session(self, session: Session, now: float) -> None: if not session.active: raise StaleRevocationError(f"session {session.peer_id} already closed") if (now - session.authorized_at) < self.revalidate_every: return snap = self._fresh_status(session.issuer, now) if snap.epoch > session.pinned_epoch: # Issuer advanced past our pin: re-check the specific peer. # If we cannot confirm non-revocation at the new epoch, close. session.active = False raise StaleRevocationError( f"session {session.peer_id} pinned at epoch {session.pinned_epoch}, " f"issuer advanced to {snap.epoch}; revalidation required" ) ```