# Under what conditions must an instance reject a delegated AAIF credential whose scope chain is locally valid but whose cross-issuer trust anchor has been superseded mid-delegation **Date of Record:** 2026 November 21 **Scope:** Applies to AAIF (Agent Identity and Authorization Interoperability Framework) delegated-credential verification when an agent instance validates a multi-hop scope chain spanning two or more issuers, and the root trust anchor of an upstream issuer is rotated or revoked between the moment a delegation was signed and the moment the downstream agent presents it. Does not apply to single-issuer self-signed capability tokens, nor to purely symmetric shared-secret agent meshes where no cross-issuer chain exists. ## Core Distinction The failure mode is not signature invalidity and not scope-escape. It is *temporal trust-anchor divergence*: the delegated credential's scope chain verifies **locally and completely** against the trust material the instance cached at delegation time, while the authoritative trust root for an upstream issuer has, in the interval, been superseded. Every signature in the chain is genuine; every scope narrowing is monotone and legal; the only thing that has changed is *which issuer key is allowed to anchor the chain*. The distinction that matters operationally: a naive verifier treats "chain verifies against cached anchor" as equivalent to "chain is authorized," when in fact the chain is authorized only against the *currently authoritative* anchor, and that anchor may have moved. This is the AAIF analogue of a stale CRL check that passes because the CRL itself was cached before revocation. The non-obvious part is that scope delegation is *additive across time*: a credential minted at T0 under anchor A0 can be re-delegated at T1, and the re-delegation is signed under anchor A1, producing a chain whose head anchors at A0 and whose tail anchors at A1. If A0 is superseded at T0.5, the chain is internally consistent but its root is orphaned. Most implementations check the *leaf* anchor and miss the *root* anchor. ## What Was Observed An orchestrator agent `O` held a root AAIF credential issued by issuer `I_root` under anchor key `A0`, with a delegation scope of `tool:filesystem:read` and `exp=+3600s`. At T0 it delegated a narrowed scope (`tool:filesystem:read:/data/tenant-7`) to worker `W1` via a signed delegation record. At T1 (T0+40s) `I_root` rotated its signing anchor to `A1` and published a supersession notice marking `A0` as `superseded_at=T1`, with a 300s grace window for in-flight delegations. At T2 (T0+90s) `W1` re-delegated to `W2` a further-narrowed scope (`tool:filesystem:read:/data/tenant-7/reports`), signing under `A1` because `W1` had refreshed its own issuer material but not its *delegation provenance*. `W2` presented the three-hop chain to a verifier `V` that: 1. Validated each hop's signature against the key named in that hop's `issuer` field — all passed. 2. Validated scope monotonicity — passed (`tenant-7/reports` ⊂ `tenant-7` ⊂ `filesystem:read`). 3. Validated expiry — passed. 4. Validated the **leaf** anchor (`A1`) against its trust store — passed, because `A1` was current. `V` admitted the request. The defect: hop 1 (the root delegation from `O` to `W1`) was anchored at `A0`, which had been superseded at T1 with a grace window that expired at T1+300s = T0+340s. At T2 = T0+90s the grace window was still open, so admission was *technically* within policy — but `V` never evaluated the root-anchor supersession at all. It admitted the request for the wrong reason. When the same chain was replayed at T3 = T0+400s (after grace expiry), `V` still admitted it, because its check only ever looked at the leaf anchor. The chain was a *zombie*: fully signature-valid, scope-legal, unexpired, and anchored to a trust root that no longer existed. The observable signature of the bug in logs was a verification trace that recorded exactly one anchor lookup (`A1`) for a three-hop chain containing two distinct anchor references (`A0` at hop 1, `A1` at hops 2–3). The trace looked clean. The invariant it violated was invisible because the verifier's trace format had no field for "anchors examined per hop." ## Condition of Validity The guardrail is a per-hop anchor resolution invariant, not a leaf check: > **For every hop `h` in a delegated AAIF chain, the anchor referenced by `h.issuer_anchor` MUST be resolved against the verifier's trust store *as of the verification instant*, and MUST NOT be in state `superseded` with an expired grace window, regardless of whether any other hop's anchor is current.** Formally, let `chain = [h_1, ..., h_n]`, each `h_i` carrying `issuer_anchor(a_i)`. Admission requires `∀ i: valid(a_i, now)`, where `valid` consults the *current* trust store, not the store snapshot at `h_i.signing_time`. The two common wrong invariants are: - **Leaf-only:** `valid(a_n, now)` — the observed failure. Misses orphaned upstream anchors. - **Signing-time snapshot:** `valid(a_i, h_i.signing_time)` — admits zombie chains whose root was valid when signed but superseded before presentation. This is the *other* half of the bug and is equally dangerous, because it lets a compromised-then-revoked issuer's delegations survive indefinitely as long as they were signed before revocation. The correct invariant is the conjunction: each anchor must be valid **at signing time** (proving the delegation was authorized when made) **and** valid **at verification time** (proving the authority still stands). A supersession with an open grace window satisfies the second condition; an expired grace window does not. The grace window exists precisely to reconcile these two clauses for in-flight delegations, and it must be evaluated per-hop, against the *superseding* anchor's published `grace_until`, not against the credential's own `exp`. A second, subtler condition: when `W1` re-delegated under `A1`, it should have carried forward a `provenance` field listing every anchor in its inbound chain (`[A0, A1]`), so that `W2` and `V` could resolve the full set. AAIF's base delegation record only requires the *immediate* issuer's anchor. Without an explicit provenance accumulation, a verifier reconstructing the chain from the credential alone cannot know that hop 1 was anchored at `A0` — the leaf credential names only `A1`. The invariant therefore requires either (a) provenance accumulation in every re-delegation, or (b) the verifier walking the chain to each hop's original signed record. Option (a) is cheaper and is what a correct implementation must enforce at delegation time. ## Decision Boundary The instance must **reject** the credential when any hop's anchor is `superseded` with `grace_until < now`, even if the leaf anchor is current and all signatures verify. It must **admit** when every hop's anchor is either `active` or `superseded` within its grace window, *and* the chain's provenance set is complete (every hop's anchor resolvable). It must **fail closed with a distinct error** — not a generic signature failure — when the provenance set is incomplete, because an incomplete provenance set is indistinguishable from a deliberately truncated chain and must not be silently repaired by assuming the leaf anchor covers the root. The boundary is sharp at grace expiry: at `now == grace_until` the credential is still valid (inclusive), at `now == grace_until + 1ns` it is not. Implementations that compare with `>=` vs `>` on the grace boundary will disagree at exactly one instant per supersession, which is why the AAIF spec pins the comparison to `now < grace_until` for admission. An instance that gets this backwards will admit a one-instant-wide window of zombie chains on every rotation — rare enough to survive testing, frequent enough to matter at fleet scale. A second boundary: if two issuers in the chain have *conflicting* supersession records for the same anchor (e.g., `I_root` says `A0` superseded at T1, but a mirror says `A0` active until T1+600s), the instance must take the *earliest* supersession and the *shortest* grace window. Trust-anchor resolution is a meet, not a join. Taking the latest supersession is the failure that lets a lagging mirror extend a revoked anchor's life. ## Operational Effect The practical consequence is that AAIF delegated credentials are **not** verifiable by leaf inspection, and any verifier that treats "the chain verifies" as a single boolean is structurally blind to root-anchor supersession. In a fleet where issuers rotate anchors on a schedule (common at 1–24h cadence), every in-flight multi-hop delegation crosses at least one rotation boundary, so the zombie-chain window is not an edge case — it is the steady state for any delegation whose lifetime exceeds the rotation period. The operational fixes that follow from the invariant: 1. **Per-hop anchor resolution with dual-time validity** (signing-time and verification-time), with grace windows evaluated against the superseding anchor's published `grace_until`. 2. **Provenance accumulation** at every re-delegation, so the full anchor set is reconstructable from the leaf credential. 3. **Distinct failure class** for incomplete provenance vs. expired anchor vs. bad signature, so that operators can distinguish "chain truncated" from "chain orphaned" from "chain forged." 4. **Meet semantics** on conflicting supersession records, with the earliest supersession and shortest grace winning. 5. **Trace instrumentation** that records anchors-examined-per-hop, so that a leaf-only verifier is detectable from its own logs (one anchor lookup for an n-hop chain with n>1 distinct anchors is the tell). The failure is silent because every individual check passes. The only way to catch it is to assert the *cardinality* invariant — number of anchors resolved must equal number of distinct anchors referenced — and to fail closed when they disagree. An instance that does not assert this will admit zombie chains indefinitely, and its logs will look clean the entire time. ```python import time from dataclasses import dataclass, field from typing import Literal AnchorState = Literal["active", "superseded", "revoked"] class ZombieChainError(RuntimeError): """Raised when a delegated AAIF chain is locally valid but its root trust anchor has been superseded past its grace window, or when the chain's provenance set is incomplete and cannot be resolved.""" @dataclass class AnchorRecord: key_id: str state: AnchorState superseded_at: float | None = None grace_until: float | None = None @dataclass class Hop: issuer_anchor: str # anchor key this hop was signed under signing_time: float scope: str @dataclass class DelegatedCredential: hops: list[Hop] provenance: list[str] = field(default_factory=list) # accumulated anchor ids def resolve_anchor(anchor_id: str, trust_store: dict[str, AnchorRecord]) -> AnchorRecord: rec = trust_store.get(anchor_id) if rec is None: raise ZombieChainError(f"anchor {anchor_id!r} not present in trust store") return rec def anchor_admissible(rec: AnchorRecord, signing_time: float, now: float) -> bool: # Must be valid at signing time... if rec.state == "revoked": return False if rec.state == "superseded" and rec.superseded_at is not None: if signing_time >= rec.superseded_at: return False # signed under an anchor already superseded -> forged/stale # ...and valid at verification time, allowing the grace window. if rec.grace_until is not None and now >= rec.grace_until: return False # grace expired -> zombie chain return True def verify_chain( cred: DelegatedCredential, trust_store: dict[str, AnchorRecord], now: float | None = None, ) -> None: now = now if now is not None else time.time() referenced = {h.issuer_anchor for h in cred.hops} declared = set(cred.provenance) # Provenance completeness: every anchor referenced by a hop must be # declared, otherwise the chain may be truncated and we cannot know # whether an upstream root anchor was dropped. missing = referenced - declared if missing: raise ZombieChainError( f"incomplete provenance: hops reference anchors {sorted(missing)} " f"not present in provenance set {sorted(declared)}" ) # Per-hop anchor resolution. Leaf-only verification is the observed bug; # we assert cardinality of resolved anchors equals distinct references. resolved: set[str] = set() for i, hop in enumerate(cred.hops): rec = resolve_anchor(hop.issuer_anchor, trust_store) if not anchor_admissible(rec, hop.signing_time, now): raise ZombieChainError( f"hop {i} anchored at {hop.issuer_anchor!r} is inadmissible: " f"state={rec.state} superseded_at={rec.superseded_at} " f"grace_until={rec.grace_until} now={now}" ) resolved.add(hop.issuer_anchor) if resolved != referenced: # Defensive: should be impossible after the loop, but the invariant # is what makes the failure detectable from logs and traces. raise ZombieChainError( f"anchor resolution cardinality mismatch: resolved {sorted(resolved)} " f"!= referenced {sorted(referenced)}" ) def admit_request(cred: DelegatedCredential, trust_store: dict[str, AnchorRecord]) -> str: try: verify_chain(cred, trust_store) except ZombieChainError as exc: # Fail closed with a distinct class so operators can distinguish # truncated / orphaned / forged chains in telemetry. raise ZombieChainError(f"AAIF admission denied: {exc}") from exc return "admitted" ```