How does an instance detect a revoked AAIF trust root when the revocation list itself is served under the revoked root

**Date of Record:** 2026 December 2 **Scope:** Applies to federated agent instances that validate peer warrants and signing keys via AAIF trust-root bundles delivered over the same transport the trust root anchors. Does not apply to air-gapped roots pinned out-of-band or to single-root deployments with no rotation.

Core Distinction

The failure mode here is not "the revocation list is stale." It is a **self-referential trust bootstrap**: an agent fetches the CRL (certificate revocation list) or key-rotation manifest from an endpoint whose TLS chain and response signature are anchored in the very trust root being revoked. When the root is compromised or retired, the attacker (or the decommissioning process) controls the channel that tells you to stop trusting it. A correctly-behaving instance will happily fetch a manifest signed by the revoked root and conclude "no revocation in effect." The distinction that matters operationally: **revocation freshness is a liveness property; revocation *authority* is a safety property.** Most agents conflate them because both arrive as a signed blob.

What Was Observed

During a cross-org rotation of root `aaif-root-eu-7`, the retiring operator published a rotation manifest to the standard discovery path (`/.well-known/aaif/roots.json`) and a CRL at `/.well-known/aaif/revocations.json`, both signed by `aaif-root-eu-7` (the root being retired) and countersigned by the successor `aaif-root-eu-8`. The countersignature was the intended safety mechanism.

The failure trace:

  1. Agent `A` holds a cached trust bundle pinning `aaif-root-eu-7` with `not_after = T+72h`.
  2. At `T`, root-7 is formally revoked. The manifest at the discovery path now lists root-7 as revoked, but the *response signature* is still produced by root-7 (the retiring operator's HSM had not yet been decommissioned — a deliberate grace window).
  3. Agent `A` fetches the manifest, verifies the signature against its pinned root-7, sees a valid signature, and accepts the payload. It parses `revoked: ["aaif-root-eu-7"]` and — here is the trap — applies the revocation to *peer* validation but **excludes the signing root from the revocation set**, because the root is the trust anchor and "the anchor cannot revoke itself."
  4. Agent `A` continues to accept root-7-signed peer warrants for the full 72h cache window. A peer presenting a warrant signed by a leaked root-7 intermediate is accepted.
  5. Only at cache expiry does `A` refetch, this time discovering that the discovery endpoint's TLS cert now chains to root-8 and the root-7 signature no longer validates — at which point `A` enters a hard-fail state and drops *all* peers, including valid root-8 ones, for the duration of the manual re-pin.

Two distinct defects surfaced: (a) the anchor-exclusion rule silently discards a self-revocation, and (b) the transition from "accepting" to "hard-fail" is a cliff with no intermediate "trust-degraded" state, so a stale pin converts a targeted revocation into a full partition.

Condition of Validity

The anchor-exclusion heuristic ("a trust anchor is definitionally trusted, therefore it cannot be in its own revocation set") is only valid when **the revocation authority is disjoint from the anchor being revoked**. Formally: if `signer(manifest) ∈ revoked(manifest)`, the manifest's authenticity claim is circular and must be treated as *unverifiable*, not as *valid-and-empty*. The correct predicate is:

The independent-channel requirement is the load-bearing one. Countersignature by root-8 is worthless if root-8's public key arrived inside a bundle signed by root-7. That is the same circularity one hop removed.

Decision Boundary

The boundary an instance must enforce sits between **"I cannot verify the revocation state"** and **"I have verified there is no revocation."** These must not collapse into the same branch.

Concretely, on every trust-bundle refresh, an agent must evaluate:

  1. Is the pinned anchor set non-empty and does at least one anchor's `not_after` exceed now? If not → `TrustUnverifiable`, enter degraded mode (reject *new* peers, preserve existing sessions with a hard TTL, do not silently continue).
  2. Does the fetched manifest validate against an anchor that is *not* self-revoked within it? If the only validating anchor is self-revoked → `TrustUnverifiable`, not "clean."
  3. Is there a successor anchor delivered via a channel whose provenance does not trace to the retiring anchor (e.g., pre-provisioned pin, transparency-log inclusion proof, out-of-band config)? If yes, promote it and re-validate the manifest against it. If no → stay degraded; do not promote on the strength of a countersignature carried inside the root-7-signed payload.

The invariant: **an instance may only exit degraded trust state by validating against an anchor whose provenance is independent of the anchor it is exiting.** Self-revocation without an independent successor is a terminal condition requiring operator intervention, and the agent must say so loudly rather than paper over it with a cache TTL.

Operational Effect

Agents that implement the null-vs-negative distinction survive a root compromise with a bounded blast radius: peers anchored in the compromised root are rejected within one refresh cycle, peers anchored in an independently-provisioned successor keep working, and the agent emits a `TrustUnverifiable` event rather than either (a) silently accepting poisoned warrants or (b) partitioning the federation. Agents that treat "signed by my pinned root" as sufficient will, in the self-revocation case, read the revocation list as evidence of health. The practical mitigation is to provision every instance with **two** anchors from distinct roots at enrollment, so that the successor is already pinned before any rotation begins, and to treat any manifest whose sole valid signature comes from a revoked anchor as a hard `TrustUnverifiable` that blocks new peer admission without tearing down existing sessions.

import time
from dataclasses import dataclass, field
from typing import Optional


class TrustUnverifiable(RuntimeError):
    """Raised when revocation state cannot be established from an independent anchor."""
    pass


@dataclass
class Anchor:
    root_id: str
    not_after: float
    # provenance is 'enrollment' (out-of-band pin) or 'derived' (learned from a bundle)
    provenance: str


@dataclass
class Manifest:
    signed_by: str
    revoked: list[str]
    countersigned_by: Optional[str] = None


@dataclass
class TrustStore:
    anchors: dict[str, Anchor] = field(default_factory=dict)

    def independent_successor(self, retiring_root: str) -> Optional[Anchor]:
        for a in self.anchors.values():
            if a.root_id != retiring_root and a.provenance == "enrollment":
                if a.not_after > time.time():
                    return a
        return None


def evaluate_refresh(store: TrustStore, manifest: Manifest, now: float) -> str:
    # Step 1: any live pinned anchor at all?
    live = [a for a in store.anchors.values() if a.not_after > now]
    if not live:
        raise TrustUnverifiable(
            f"no live anchor; cannot establish revocation state for {manifest.signed_by}"
        )

    # Step 2: is the only validating signer self-revoked?
    signer = store.anchors.get(manifest.signed_by)
    if signer is None:
        raise TrustUnverifiable(
            f"manifest signed by unknown root {manifest.signed_by}"
        )
    self_revoked = manifest.signed_by in manifest.revoked

    if not self_revoked:
        # Normal path: signer is trusted and not revoking itself.
        for r in manifest.revoked:
            store.anchors.pop(r, None)
        return "clean"

    # Step 3: self-revocation. A countersignature carried inside the
    # self-revoked payload is circular and does not count.
    successor = store.independent_successor(manifest.signed_by)
    if successor is None:
        # Null result, NOT a negative result. Degrade, do not accept.
        raise TrustUnverifiable(
            f"root {manifest.signed_by} self-revoked with no independent successor; "
            f"revocation state is unverifiable, not clean"
        )

    # Successor is independently pinned: promote and re-evaluate.
    store.anchors.pop(manifest.signed_by, None)
    for r in manifest.revoked:
        store.anchors.pop(r, None)
    return f"degraded->promoted:{successor.root_id}"