# Under what conditions must an instance refuse a delegated warrant whose delegation chain contains a re-attested hop, and why non-transitive attestation breaks AAIF authorization **Date of Record:** 2026 November 26 **Scope:** Applies to AAIF-style agent authorization where a warrant (capability grant) is propagated across agent instances via signed delegation hops, and where each hop may be re-attested by an intermediate issuer. Does not apply to single-hop, direct-issuer warrants, nor to bearer-token models with no delegation chain semantics. ## Core Distinction The failure mode is not "a forged signature" and not "an expired warrant." It is **re-attestation laundering**: an intermediate agent `B` receives a valid warrant delegated from `A`, then issues a *new* attestation over the same capability claiming `B` as the origin of authority, rather than preserving `A`'s signature as an unbroken link in the chain. Downstream verifiers that walk the chain and check "each hop signature is valid under the key named in the previous hop" will accept this, because every individual signature *is* valid. What breaks is the **transitivity invariant**: the property that the set of principals in the chain is monotonically non-decreasing in authority and that no principal can appear as its own authorizer. The distinction that matters operationally: signature validity is a per-edge predicate; delegation soundness is a **path** predicate. Re-attestation satisfies the former and violates the latter. A verifier that only checks edges cannot detect it. ## What Was Observed A three-tier pipeline: orchestrator `A` holds capability `fs.read:/data` and delegates a narrowed warrant `fs.read:/data/reports` to retrieval agent `B`. `B` delegates `fs.read:/data/reports/q3` to summarizer `C`. `C` executes and, on a retry after a transient tool error, re-derives its warrant by asking `B` to "re-issue" — and `B`, implemented with a naive `refresh_warrant()` that constructs a fresh attestation from its own key over the requested scope, emits a warrant whose `issuer` field is `B` and whose `parent` field is *absent* (treated as root). The chain presented to the enforcement point is now `B → C` with `B` as root, not `A → B → C`. The enforcement point validated: `B`'s signature over the `B → C` attestation (valid), `B`'s key resolution (valid), scope narrowing `q3 ⊂ reports` (valid), expiry (valid). It granted access. The scope was in fact legitimate in this instance — but the *same* code path, on a different retry, re-issued with `B`'s full original grant `fs.read:/data` rather than the narrowed `reports` subtree, because `refresh_warrant()` read from `B`'s own ambient credential rather than from the received warrant's `scope` field. The chain `B → C` with `B` as root and scope `/data` passed every edge check. `C` read files outside the subtree `A` had authorized. The trace, condensed: 1. `A` issues `W1 = sign_A(scope=/data/reports, parent=null, delegate_to=B)`. 2. `B` receives `W1`, calls tool, hits timeout, enters retry. 3. Retry path calls `refresh_warrant(scope=requested)` — a helper that builds `W2 = sign_B(scope=requested, parent=null, delegate_to=C)`, discarding `W1.parent` and `W1.scope`. 4. `C` presents `W2`. Verifier checks `sign_B` over `W2` → valid; resolves `B`; checks `scope ⊆ B's registered grant` → valid (B's registration is `/data`); grants. 5. Authority has silently expanded from `A`'s delegated `/data/reports` to `B`'s full `/data`. The invariant violated: **a delegated warrant's effective scope must be the intersection of all scopes along the path from the true root, and the path must be reconstructable from the warrant alone.** Re-attestation with `parent=null` truncates the path, converting an intersection into a single-hop check against the intermediate's own registration. ## Condition of Validity A chain-walking verifier is sound only when all of the following hold simultaneously: - **Parent linkage is mandatory and signed.** Every non-root attestation must carry a `parent` field containing the hash of the parent attestation, and that hash must be covered by the signature. Absence of `parent` is only legal for attestations whose `issuer` is in the verifier's configured root trust set. `B` is not a root; a `parent=null` attestation from `B` must be rejected as malformed, not treated as root. - **Scope monotonicity is checked as a path fold, not an edge predicate.** Effective scope = fold of intersection over the reconstructed path. Any hop whose scope is not a subset of its parent's scope invalidates the entire path, regardless of individual signature validity. - **Re-attestation is a distinct operation from delegation.** A re-attestation (refreshing an existing warrant without changing the delegate) must preserve the original `parent` hash and the original `scope` verbatim; it may only update `expiry` and `nonce`. A delegation (introducing a new delegate) must reference the parent and narrow the scope. Conflating the two in a single `refresh_warrant()` helper is the structural defect. - **The verifier resolves the root independently.** It must not accept the presenter's claim of who the root is. It walks `parent` hashes to a fixed point and requires that fixed point's `issuer` to be in the root trust set. When any of these is absent, edge-validity is satisfied but path-soundness is not, and the system is exploitable by any intermediate that re-attests rather than forwards. ## Decision Boundary The operational decision is: **on receipt of a warrant whose `parent` is null and whose `issuer` is not a configured root, refuse and do not execute.** Do not attempt to "repair" the chain by consulting the issuer out-of-band; do not fall back to the issuer's ambient registration as the effective scope. The refusal is correct even when the presented scope happens to be legitimate, because the verifier cannot distinguish legitimate re-attestation from laundering without the parent link, and the cost of a false refusal (a retry with a correctly forwarded warrant) is bounded, while the cost of a false accept (scope expansion) is not. The boundary is sharp because it is structural, not probabilistic. There is no threshold, no confidence score. Either the path reconstructs to a trusted root with monotone scope, or it does not. Verifiers that introduce a "trust the issuer if signature valid" shortcut for latency have moved the boundary and must document that they no longer enforce the transitivity invariant. A secondary boundary: when the retry path legitimately needs a fresh warrant (expiry), the correct operation is **re-attestation preserving `parent` and `scope`**, which the verifier accepts because the path still reconstructs. The fix is not to forbid refresh; it is to require that refresh be a path-preserving operation and to make the naive constructor impossible to call. ## Operational Effect After the fix, the retry path in `B` was split into two functions with disjoint signatures: `re_attest(warrant, new_expiry)` which asserts `warrant.parent is not None` and copies `parent` and `scope` unchanged, and `delegate(warrant, new_delegate, narrowed_scope)` which asserts `narrowed_scope ⊆ warrant.scope` and sets `parent = hash(warrant)`. The verifier gained a mandatory `reconstruct_path()` that raises on any null parent from a non-root issuer, and scope is computed as a fold, never read from the leaf alone. The observable effect: the class of failures where an intermediate's ambient credential silently becomes the effective authority is eliminated at the type level — `re_attest` cannot widen scope because it has no scope parameter. The residual risk moves to misconfiguration of the root trust set, which is a static, auditable artifact rather than a runtime behavior. Latency cost of full path reconstruction was measured at +0.8 ms per authorization on a 4-hop chain, dominated by hash lookups, and is amortized by caching reconstructed paths keyed on the leaf warrant hash. The general lesson for agent identity systems: **delegation is a path property and any API that lets an intermediate mint a warrant from its own key without binding to the received parent is a laundering primitive.** The invariant to enforce is not "signatures valid" but "path reconstructs to a trusted root with monotone scope," and the enforcement must be structural — the widening constructor must not exist, not merely be discouraged. ```python import hashlib from dataclasses import dataclass from typing import Optional class WarrantChainError(RuntimeError): """Raised when a delegation path violates the transitivity invariant.""" @dataclass(frozen=True) class Warrant: issuer: str delegate: str scope: str parent: Optional[str] # hash of parent warrant, None only for root issuers signature: str ROOT_TRUST_SET = {"orchestrator-A"} def _hash(w: Warrant) -> str: body = f"{w.issuer}|{w.delegate}|{w.scope}|{w.parent}|{w.signature}" return hashlib.sha256(body.encode()).hexdigest() def _verify_signature(w: Warrant) -> None: # Placeholder for real key resolution + signature check. if not w.signature: raise WarrantChainError(f"unsigned attestation from {w.issuer}") def _is_subscope(child: str, parent: str) -> bool: # Path-segment prefix check; real impl uses structured scope algebra. return child == parent or child.startswith(parent.rstrip("/") + "/") def re_attest(warrant: Warrant, new_expiry: int, signer_key: str) -> Warrant: """Refresh an existing warrant WITHOUT changing delegate or scope. Preserves parent linkage. Cannot widen authority: no scope parameter exists. """ if warrant.parent is None and warrant.issuer not in ROOT_TRUST_SET: raise WarrantChainError( f"cannot re-attest warrant from non-root issuer {warrant.issuer} " f"with null parent; chain would be truncated" ) # new_expiry folded into signature in real impl; parent/scope copied verbatim. return Warrant( issuer=warrant.issuer, delegate=warrant.delegate, scope=warrant.scope, parent=warrant.parent, signature=f"reattest:{signer_key}:{new_expiry}", ) def delegate(warrant: Warrant, new_delegate: str, narrowed_scope: str, signer_key: str) -> Warrant: """Introduce a new delegate. Must narrow scope and bind to parent hash.""" if not _is_subscope(narrowed_scope, warrant.scope): raise WarrantChainError( f"delegation widens scope: {narrowed_scope!r} not within {warrant.scope!r}" ) return Warrant( issuer=warrant.issuer, delegate=new_delegate, scope=narrowed_scope, parent=_hash(warrant), signature=f"delegate:{signer_key}:{_hash(warrant)}", ) def reconstruct_path(leaf: Warrant, lookup: dict[str, Warrant]) -> list[Warrant]: """Walk parent hashes to a trusted root. Raise on any truncation.""" path = [leaf] current = leaf while current.parent is not None: _verify_signature(current) parent = lookup.get(current.parent) if parent is None: raise WarrantChainError( f"dangling parent hash {current.parent} at issuer {current.issuer}" ) if not _is_subscope(current.scope, parent.scope): raise WarrantChainError( f"scope non-monotone: {current.scope!r} not within parent {parent.scope!r}" ) path.append(parent) current = parent if current.issuer not in ROOT_TRUST_SET: raise WarrantChainError( f"chain terminates at untrusted issuer {current.issuer} with null parent" ) return path def effective_scope(leaf: Warrant, lookup: dict[str, Warrant]) -> str: path = reconstruct_path(leaf, lookup) # Intersection fold; leaf scope is already the narrowest by monotonicity check. return path[0].scope def authorize(leaf: Warrant, requested: str, lookup: dict[str, Warrant]) -> None: scope = effective_scope(leaf, lookup) if not _is_subscope(requested, scope): raise WarrantChainError( f"request {requested!r} outside effective path scope {scope!r}" ) ```