# Where must an instance halt when a federated AAIF attestation is valid at ingress but its revocation epoch has already advanced at the issuing org? **Date of Record:** 2026 December 2 **Scope:** Applies to cross-organization agent identity federation where a relying-party (RP) org accepts an Agent Attestation & Identity Federation (AAIF) attestation minted by a foreign issuer org, and where revocation is propagated asynchronously via epoch-stamped revocation lists. Does not apply to single-org deployments with synchronous revocation, nor to bearer-token schemes without epoch semantics. ## Core Distinction The failure is not "expired credential" and not "untrusted issuer." It is a **temporal skew between two independently monotonic clocks**: the attestation's `issued_at`/`valid_until` window (minted by the issuer) versus the issuer's `revocation_epoch` counter (also advanced by the issuer, but propagated through an out-of-band channel that lags). An attestation can be cryptographically perfect, unexpired, correctly signed by a trusted AAIF issuer, and *simultaneously* describe an agent whose authority the issuer has already withdrawn. The relying party has no way to distinguish "agent still in good standing" from "agent revoked 40 seconds ago, revocation list not yet delivered" using the attestation alone. The invariant that must hold is: **an RP must never treat an attestation as authoritative past the highest revocation epoch it has actually observed from that issuer for that subject class.** The non-obvious part is that "highest observed epoch" is per-issuer-per-subject-class, not global, and a single stale epoch watermark silently authorizes every subject under it. ## What Was Observed A three-org federation: `issuer-a` (mints agent attestations for its tenant agents), `rp-b` (consumes them to grant tool access), `rp-c` (consumes them for a different tool surface). Revocation is distributed as signed epoch lists: `issuer-a` publishes `revocation_epoch=N` with a set of revoked subject IDs, and RPs poll or receive push every ~30s. The list is signed and monotonic; RPs are supposed to reject any attestation whose `subject` appears in the list *at or below* the epoch they hold. Trace: 1. `t=0`: `issuer-a` mints attestation for agent `agent-x`, embedding `issuer_epoch=1041` (the epoch current at mint time) and `valid_until=t+3600`. 2. `t=5`: `agent-x` is compromised; operator revokes it. `issuer-a` advances to `revocation_epoch=1042` and includes `agent-x`. 3. `t=8`: `rp-b`'s poller is mid-backoff (last successful fetch `t=-22`, next scheduled `t=+10`). `rp-b` still holds epoch `1041`. 4. `t=9`: `agent-x` presents its attestation to `rp-b`. Signature valid, issuer trusted, `valid_until` in the future, `issuer_epoch=1041` ≤ `rp-b`'s held epoch `1041`. **`rp-b` admits the agent.** The check `attestation.issuer_epoch <= held_epoch` passes because the attestation was minted at the same epoch the RP holds — the attestation is "current" relative to a watermark that is itself stale. 5. `t=9.2`: `agent-x` uses the tool grant to exfiltrate. `rp-c`, which happened to poll at `t=6`, holds epoch `1042` and *would* have rejected it. 6. `t=40`: `rp-b` finally fetches epoch `1042`, but the grant is already exercised. The precise defect: the admission predicate `attestation.issuer_epoch <= held_epoch` is **necessary but not sufficient**. It proves the attestation isn't from the *future* of the RP's knowledge, but it does not prove the RP's knowledge is fresh. An attestation minted at exactly the held epoch is indistinguishable from one minted at an epoch the issuer has since superseded. Both `rp-b` and `rp-c` ran the same predicate; the divergence was purely in poll timing — a **propagation-lag race**, not a logic bug in either verifier. A second observation compounded it: `rp-b` cached the *decision* ("agent-x allowed for tool T") keyed by `subject` for 300s. After fetching epoch `1042`, the cached allow survived until TTL expiry, because the cache key did not include the epoch watermark. So even post-propagation, the stale decision persisted — a **decision-cache epoch-binding failure** distinct from the list-lag failure. ## Condition of Validity The admission predicate `attestation.issuer_epoch <= held_epoch` is sound **only if** `held_epoch` is known to be within the issuer's propagation SLA of the issuer's true current epoch. Concretely, an RP must be able to bound `now - held_epoch_fetch_time <= issuer.max_propagation_lag`, and must treat that bound as a hard precondition, not an assumption. Where the SLA is unknown or violated, the predicate degrades to "the attestation is not from the future," which is useless for revocation. The correct invariant is a **freshness-gated epoch check**: - Admission requires `attestation.issuer_epoch <= held_epoch` **AND** `now - held_epoch_fetch_time <= issuer.max_propagation_lag` **AND** `attestation.subject not in held_revocation_set`. - If the freshness bound is violated (poller lagging, network partition, issuer unreachable), the RP must **fail closed** for that issuer's subject class: refuse admission rather than admit against a stale watermark. - Any cached admission decision must be keyed by `(subject, held_epoch)` and invalidated when `held_epoch` advances. The subtlety is that "fail closed on stale epoch" is a *per-issuer* action. An RP federated with ten issuers must not let one lagging issuer's staleness block the other nine — the watermark and the freshness gate are scoped to `(issuer, subject_class)`. A global "am I stale?" flag produces cascading denial-of-service across unrelated federations, which is why operators under incident pressure are tempted to disable the gate entirely — the exact wrong move. ## Decision Boundary The boundary an instance must resolve is: **given an attestation whose `issuer_epoch` equals the RP's held epoch, is the held epoch fresh enough to be authoritative?** - If `now - fetch_time <= max_propagation_lag`: admit (subject to revocation-set membership). The held epoch is authoritative; equality means "minted at or before my knowledge horizon," which is safe. - If `now - fetch_time > max_propagation_lag`: **do not admit**. The equality is ambiguous — the attestation could be minted at the RP's stale epoch and revoked in the intervening gap. The instance must escalate: attempt a synchronous epoch fetch from the issuer; if that fails, fail closed for that issuer. - If the attestation's `issuer_epoch > held_epoch`: the attestation is from the future of the RP's knowledge — this is a protocol violation (issuer minted at an epoch the RP hasn't seen) and must be rejected, not "caught up to." Catching up by fetching is correct; admitting before fetching is not. The trap is that the middle case looks like success. The predicate passes, the signature verifies, the agent is admitted, and nothing logs an error. The instance must treat "predicate passed but freshness gate unverified" as a distinct state requiring an active fetch, not as an implicit allow. This is the boundary: **predicate satisfaction is not authorization; authorization requires predicate satisfaction plus a freshness proof.** ## Operational Effect Downstream, three concrete changes are mandatory: 1. **Epoch watermarks carry a fetch timestamp**, and admission checks the freshness bound as a first-class precondition. The revocation list object becomes `{epoch, revoked_set, fetched_at, issuer}` and the verifier refuses on `now - fetched_at > issuer.max_propagation_lag`. 2. **Decision caches are epoch-keyed.** A cached allow for `(subject, tool)` is valid only while `held_epoch` is unchanged; on epoch advance, all decisions for that issuer's subject class are invalidated. This closes the post-propagation stale-decision window observed at `rp-b`. 3. **Synchronous fetch-on-boundary is the recovery path.** When the freshness gate trips, the verifier issues a blocking epoch fetch to the issuer (with a short timeout); only if that returns a current epoch does admission proceed. This converts the 30s async lag into a bounded synchronous cost paid only at the boundary, not on every call. The residual risk is the synchronous fetch timeout itself: if the issuer is unreachable and the held epoch is stale, the RP must fail closed, accepting availability loss to preserve the revocation invariant. Federations that cannot tolerate this must negotiate a shorter `max_propagation_lag` (tighter poll cadence) rather than weaken the gate. ```python import time from dataclasses import dataclass class StaleEpochAdmissionError(RuntimeError): """Raised when an attestation's issuer_epoch cannot be trusted because the relying party's held revocation epoch is older than the issuer's declared propagation SLA.""" pass @dataclass(frozen=True) class RevocationList: issuer: str epoch: int revoked: frozenset fetched_at: float @dataclass(frozen=True) class Attestation: issuer: str subject: str issuer_epoch: int valid_until: float def admit( att: Attestation, held: RevocationList, max_propagation_lag: float, now: float | None = None, sync_fetch=None, ) -> bool: now = time.time() if now is None else now if att.issuer != held.issuer: raise StaleEpochAdmissionError( f"issuer mismatch: attestation={att.issuer} held={held.issuer}" ) if now >= att.valid_until: return False # Attestation minted in the future of our knowledge: protocol violation. if att.issuer_epoch > held.epoch: raise StaleEpochAdmissionError( f"attestation epoch {att.issuer_epoch} ahead of held {held.epoch}; " f"must fetch, not admit" ) stale = (now - held.fetched_at) > max_propagation_lag if stale: # Boundary case: predicate passes but watermark is untrustworthy. if sync_fetch is None: raise StaleEpochAdmissionError( f"held epoch {held.epoch} is {now - held.fetched_at:.1f}s old " f"(SLA {max_propagation_lag}s) and no sync fetch available; " f"failing closed for issuer {att.issuer}" ) fresh = sync_fetch(att.issuer) if fresh is None or fresh.epoch < held.epoch: raise StaleEpochAdmissionError( f"sync fetch failed or regressed for issuer {att.issuer}; " f"cannot authorize subject {att.subject}" ) held = fresh if att.subject in held.revoked: return False return True ```