# How does an instance detect scope-attenuation forgery in a delegated AAIF credential chain when the parent warrant is re-issued mid-handoff **Date of Record:** 2026 November 25 **Scope:** Applies to AAIF-based delegated authorization where an agent receives a signed capability warrant from a parent and re-delegates an attenuated sub-warrant to a downstream agent (A2A handoff). Does not apply to single-hop, root-issued credentials or to bearer-token schemes without attenuation semantics. ## Core Distinction The distinction that matters here is between *structural* attenuation (the child warrant's scope is a strict subset of the parent's, verifiable by set containment over the scope lattice) and *provenance* attenuation (the child warrant was actually signed by a principal whose authority at issuance time descended from a still-valid parent). Most AAIF verifiers check the first and assume the second. The failure mode is a **re-issuance race**: the parent re-issues its warrant (rotating the `warrant_id`, bumping `epoch`, and possibly narrowing scope) *while* a downstream agent is mid-handoff holding the old parent. The child warrant that the downstream agent forges—or that a compromised intermediary forges—still passes structural containment against the *old* parent it was minted under, but its provenance chain no longer terminates at the current live root. The verifier sees a well-formed chain and admits it. This is not a signature failure; every signature is valid. It is a **chain-continuity** failure across a re-issuance boundary. ## What Was Observed A three-tier delegation: orchestrator `O` issues warrant `W_O` (scope `{read:repo, write:branch/*}`, epoch 7) to worker `A`. `A` attenuates to `W_A` (scope `{read:repo}`, epoch 7, parent=`W_O`) and begins an A2A handoff to agent `B`. During the handoff, `O` re-issues: `W_O'` (scope `{read:repo}`, epoch 8) because `write:branch/*` was revoked after a policy change. The re-issuance event propagates to `A`'s revocation feed, but `A`'s in-flight handoff message to `B` was already serialized with `W_A` referencing `parent=W_O@epoch7`. `B` receives `W_A`, fetches the parent chain, and validates: - `W_A.scope ⊆ W_O.scope` → true (`{read:repo} ⊆ {read:repo, write:branch/*}`) - `W_A.parent_id == W_O.warrant_id` → true (the *old* id is still resolvable in the warrant store, retained for replay) - signatures over `W_A` and `W_O` → both valid - `W_A.epoch == W_O.epoch` → true (both 7) Every check passes. `B` admits `W_A` and proceeds. But `W_O@epoch7` is **superseded**: the live authority is `W_O'@epoch8`, which no longer contains `write:branch/*` and, critically, does not list `W_A` as a legitimate descendant. `B` is now operating under authority that was valid at mint time and dead at use time. In the observed run, `B` continued to read from a repo path that `O` had intended to restrict by narrowing `W_O'` to a sub-path; the narrowing was silently bypassed because `B`'s chain anchored on the pre-narrowing parent. The non-obvious part: the revocation feed *did* fire for `W_O`, and `A` *did* receive it. The failure is that `A`'s handoff had already committed the serialized `W_A` to the transport, and `B` had no way to distinguish "parent still live" from "parent resolvable in the replay store." **Resolvability was conflated with liveness.** ## Condition of Validity The invariant that must hold for a delegated chain to be safe is: > A child warrant is admissible at time `t` only if its entire parent chain is *live* at `t`, where liveness means: for every ancestor `W_i`, the current head of `W_i`'s issuance lineage (highest `epoch` for that `warrant_id`'s issuer+subject+resource tuple) equals the `epoch` recorded in the child's chain, OR the current head is a descendant of that epoch with no scope narrowing that would invalidate the child's scope. This requires the verifier to resolve **lineage heads**, not just parent IDs. The AAIF `warrant_id` is stable across re-issuance by design (so that descendants remain resolvable), and `epoch` is the monotonic counter that distinguishes generations. A verifier that checks `W_A.parent_id == W_O.warrant_id` without comparing `W_A.epoch` against the *current lineage head epoch* is checking identity, not continuity. The condition under which the failure is *impossible*: if the issuer guarantees that re-issuance never narrows scope (only widens or leaves unchanged), then a child minted under an old epoch remains scope-valid under the new head, and the race is benign. This is the "monotone widening" assumption. It is almost never stated explicitly, and it is violated precisely when a policy change revokes authority—which is the case you care about. ## Decision Boundary The verifier `B` must make a binary decision at admission: **admit** or **reject-and-renegotiate**. The boundary is not "is the chain structurally valid" but "is the chain's terminal epoch equal to the live head epoch for every ancestor, or is the divergence provably benign (widening-only)." Concretely, at handoff admission: 1. Resolve each ancestor's lineage head: `head = warrant_store.current_head(issuer, subject, resource)`. 2. If `child.chain[i].epoch == head.epoch` for all `i` → admit. 3. If `child.chain[i].epoch < head.epoch` → the chain is stale. Compute `scope_delta = head.scope - child.chain[i].scope`. If `child.scope ⊆ head.scope` for the *narrowed* head (i.e., the child's scope survives the narrowing), admit with a staleness annotation; otherwise **reject**. 4. If `child.chain[i].epoch > head.epoch` → impossible unless the store is partitioned; treat as a consistency fault and reject. The boundary case that bites is step 3 when `child.scope` intersects but is not contained in `head.scope`. Partial containment is the dangerous regime: the child retains some authority the head has revoked. A verifier that checks `child.scope ⊆ parent.scope` (against the *recorded* parent) instead of `child.scope ⊆ head.scope` (against the *live* head) admits exactly the revoked subset. ## Operational Effect When the boundary is crossed, the downstream agent `B` operates with a credential that is cryptographically impeccable and operationally dead. The consequences are asymmetric and delayed: - **Silent authority retention.** `B` continues to exercise the revoked scope until its local TTL expires or the next handoff re-validates. Because `B`'s chain *looks* valid, no alarm fires at `B`; the alarm fires (if at all) at the resource, as an out-of-policy access attributed to `B` rather than to the stale warrant. - **Attestation laundering.** If `B` re-delegates to `C`, the staleness propagates: `C`'s chain now contains an epoch-7 ancestor that is two generations behind the live head. Each hop makes the divergence harder to detect because the immediate parent (`W_A`) is *locally* consistent—`W_A.epoch == W_A.parent.epoch`—so a per-hop verifier that only checks adjacent-epoch equality sees a clean chain. - **Replay-store poisoning.** If the warrant store retains superseded epochs for audit replay (as it should), the stale chain remains *resolvable* indefinitely. The replay store is the very mechanism that makes the forgery detectable-by-audit and undetectable-by-admission. Liveness must be checked against the head index, not the replay index. The guardrail is a **lineage-head check at every admission**, with explicit handling of the partial-containment case, and a **handoff abort protocol**: if `A` receives a revocation for a warrant whose descendant is currently in-flight in a serialized handoff message, `A` must emit a `supersede` control frame on the same transport channel so `B` can invalidate the in-flight child before it admits. Without the control frame, `B` cannot know the parent moved; the serialized message is a snapshot and the revocation feed is a separate channel that `B` does not subscribe to (it has no reason to—it is not the warrant's subject). ```python from dataclasses import dataclass from typing import Optional class StaleWarrantChainError(RuntimeError): """Raised when a delegated warrant's ancestor lineage head has moved past the epoch recorded in the child chain, and the child's scope is not contained in the live head's scope (partial-containment regime).""" @dataclass(frozen=True) class Warrant: warrant_id: str epoch: int scope: frozenset parent_id: Optional[str] issuer: str subject: str resource: str @dataclass(frozen=True) class LineageHead: epoch: int scope: frozenset class WarrantStore: """Replay index resolves any epoch; head index resolves only the live head.""" def __init__(self): self._replay: dict[str, dict[int, Warrant]] = {} self._head: dict[tuple, LineageHead] = {} def record(self, w: Warrant, live: bool = True): self._replay.setdefault(w.warrant_id, {})[w.epoch] = w if live: key = (w.issuer, w.subject, w.resource) cur = self._head.get(key) if cur is None or w.epoch > cur.epoch: self._head[key] = LineageHead(w.epoch, w.scope) def resolve_epoch(self, warrant_id: str, epoch: int) -> Warrant: return self._replay[warrant_id][epoch] def current_head(self, w: Warrant) -> LineageHead: return self._head[(w.issuer, w.subject, w.resource)] def admit_delegated(child: Warrant, store: WarrantStore) -> None: """Admission gate for a downstream agent receiving a delegated warrant. Structural containment is necessary but NOT sufficient; we must also verify chain continuity against live lineage heads. """ # Walk the recorded ancestor chain (child -> ... -> root). chain = [child] cursor = child while cursor.parent_id is not None: parent = store.resolve_epoch(cursor.parent_id, cursor.epoch) chain.append(parent) cursor = parent for ancestor in chain: head = store.current_head(ancestor) if ancestor.epoch == head.epoch: continue # live, exact if ancestor.epoch > head.epoch: raise StaleWarrantChainError( f"epoch inversion: ancestor {ancestor.warrant_id}@{ancestor.epoch} " f"ahead of live head @{head.epoch}; store partition suspected" ) # ancestor.epoch < head.epoch: stale. Check if child scope survives narrowing. if not child.scope.issubset(head.scope): revoked = child.scope - head.scope raise StaleWarrantChainError( f"stale chain: ancestor {ancestor.warrant_id}@{ancestor.epoch} " f"superseded by head @{head.epoch}; child retains revoked scope {sorted(revoked)}" ) # else: benign staleness (widening-only or child scope fully survives); admit. # Trigger trace: store = WarrantStore() w_o_old = Warrant("W_O", 7, frozenset({"read:repo", "write:branch/*"}), None, "O", "A", "repo") store.record(w_o_old, live=True) # epoch 7 is head w_a = Warrant("W_A", 7, frozenset({"read:repo"}), "W_O", "A", "B", "repo") store.record(w_a, live=True) # Mid-handoff: O re-issues, narrowing scope. epoch 8 becomes head. w_o_new = Warrant("W_O", 8, frozenset({"read:repo/sub"}), None, "O", "A", "repo") store.record(w_o_new, live=True) # B admits the in-flight W_A. Structural check passes; continuity check must fire. admit_delegated(w_a, store) # raises StaleWarrantChainError: read:repo not ⊆ read:repo/sub ```