Which invariants prevent a delegated AAIF credential chain from silently widening scope when an intermediate agent re-signs a sub-warrant
**Date of Record:** 2026 December 1 **Scope:** Applies to multi-hop AAIF (Agent Identity and Authorization Framework) credential chains where an agent holding a delegated warrant mints a narrower sub-warrant for a downstream agent. Does not apply to single-hop bearer tokens or to chains where every hop is re-validated against the root issuer at execution time.
Core Distinction
There are two ways a delegated warrant can propagate authority: **attenuation** (each hop may only narrow the capability set, resource set, and expiry of its parent) and **transcription** (each hop copies the parent's claims into a new signed object). AAIF mandates attenuation. The failure mode is that a transcription implementation *looks* correct because the leaf warrant's signature verifies against the intermediate agent's key, and the intermediate's key verifies against the root — yet the leaf's effective authority is the union of all ancestors' scopes rather than the intersection. The distinguishing question is not "does the chain verify?" but "is the effective capability set computed as a monotone-decreasing fold over the chain, or as a per-hop claim that each signer asserts independently?" Only the fold is safe. A chain can be cryptographically perfect and authorization-theoretically unsound at the same time.
What Was Observed
An orchestrator agent `A` held a root warrant `W0` scoped to `{tool: filesystem.read, path: /data/tenant-42/*, expiry: T+3600}`. `A` spawned a retrieval sub-agent `B` and minted `W1` intended to be `{tool: filesystem.read, path: /data/tenant-42/reports/*, expiry: T+1800}`. `B`, in turn, delegated to a summarizer `C` by constructing `W2`. The `W2` builder serialized its own desired scope — `{tool: filesystem.read, path: /data/tenant-42/reports/q3/*}` — plus a `parent_hash` pointer to `W1`, and signed it. The verifier at the tool gateway did three things: checked `W2`'s signature against `B`'s public key, checked `W1`'s signature against `A`'s key, checked `W0`'s signature against the root issuer, and confirmed the `parent_hash` links formed an unbroken chain. All checks passed.
The failure: `W1` had been minted with a *default* scope because `A`'s delegation call omitted the `path` narrowing parameter (a schema-optional field). The AAIF reference serializer for `W1` emitted `path: /data/tenant-42/*` — inheriting the parent's full path glob rather than narrowing it. The verifier never compared `W1.path ⊆ W0.path` nor `W2.path ⊆ W1.path`; it treated each warrant's claims as independently asserted facts whose only obligation was to be signed. The result: `C` read `/data/tenant-42/finance/ledger.csv`, which was inside `W0`'s scope but outside what `A` *intended* to grant `B`. The chain was valid; the delegation was not attenuated. The widening was invisible because every signature was correct and every hash link intact.
The trigger condition is precise: **an optional narrowing field that defaults to "inherit parent" rather than "inherit nothing."** When the field is absent, the serializer copies the parent's value, and the verifier — which only checks signature validity and link integrity — has no reason to reject. Attenuation is silently converted to transcription for exactly the fields the delegating agent forgot to specify.
Condition of Validity
The invariant that must hold is a **monotone-decreasing capability fold**: for every hop `i`, `effective_scope(W_i) = effective_scope(W_{i-1}) ∩ declared_scope(W_i)`, and the verifier must compute `effective_scope` by folding from the root, never by trusting `W_i`'s self-asserted scope. This is valid only under three conditions:
- **Closed-world defaults.** Any omitted narrowing field defaults to the empty set (or to the parent's value *only if* the parent's value is itself the result of a prior fold and the field is explicitly marked inheritable). A default of "copy parent" is only safe when the parent's scope is already the folded effective scope, not the parent's declared scope.
- **Verifier-side fold, not signer-side assertion.** The gateway must reconstruct the effective scope from the chain. A warrant that merely *claims* `path: /data/tenant-42/reports/q3/*` is a request; the grant is the fold.
- **Scope comparability.** The fold requires a lattice over scope elements — subset ordering for paths and resource sets, interval containment for expiry, subset ordering for tool sets. If scopes are expressed as opaque strings or regexes without a decidable subset relation, the fold cannot be computed and the invariant is unenforceable; the system must then reject delegation entirely rather than fall back to transcription.
The invariant fails to be valid the moment any of these is violated — most commonly condition 1, because schema designers mark narrowing fields optional to reduce friction for the delegating agent.
Decision Boundary
The operational decision is what the verifier does when it cannot prove `declared_scope(W_i) ⊆ effective_scope(W_{i-1})`. There are three responses and only one is correct:
- **Accept on signature validity** — the observed failure. Correct signatures are treated as sufficient. This is wrong because a signature attests to *who* asserted a scope, not to whether the assertion is within the delegator's authority to make.
- **Reject on unprovable containment** — correct, but only if the scope lattice is total enough to decide containment. If a scope element is incomparable (e.g., a regex against a glob), "unprovable" must mean "reject," not "assume contained."
- **Clamp to the fold** — compute `effective_scope(W_i) = declared ∩ parent_effective` and proceed with the intersection. This is the preferred response when the lattice is decidable, because it preserves liveness while bounding authority.
The boundary is crossed the instant a verifier treats a *failed containment proof* as equivalent to a *passed signature check*. These are orthogonal predicates. The guardrail is that containment must be a hard precondition, evaluated before the signature is even consulted, and a scope element with no decidable subset relation must fail closed.
Operational Effect
With the fold enforced, the `W1` default-inherit bug becomes a *narrowing* bug rather than a *widening* bug: `B` receives the intersection of `W0` and its (empty) declared narrowing, i.e., nothing beyond what `A` explicitly passed, and the omission surfaces as a delegation failure at mint time rather than a silent privilege escalation at execution time. The blast radius of a forgotten field shrinks from "downstream agent reads the whole tenant" to "downstream agent's call is denied and the orchestrator retries with an explicit scope." The cost is that delegating agents must specify narrowing explicitly or accept the empty default; the benefit is that the chain's authority is a computable function of the chain, not of each signer's good intentions. Every AAIF deployment that has had a cross-tenant read traced to a delegated sub-warrant has, on inspection, been running transcription where it believed it was running attenuation.
class ScopeWideningError(RuntimeError):
"""Raised when a delegated warrant's declared scope is not provably a subset
of its parent's effective (folded) scope, or when containment is undecidable."""
pass
def fold_effective_scope(chain):
# chain: list of warrants root-first; each has .declared_scope (dict) and .signature_valid
if not chain:
raise ScopeWideningError("empty credential chain")
effective = dict(chain[0].declared_scope)
if not chain[0].signature_valid:
raise ScopeWideningError("root warrant signature invalid")
for hop in chain[1:]:
if not hop.signature_valid:
raise ScopeWideningError(f"hop {hop.id} signature invalid")
declared = hop.declared_scope
for key, val in declared.items():
if key not in effective:
# a field the parent never granted cannot be introduced downstream
raise ScopeWideningError(
f"hop {hop.id} introduces ungranted field {key!r}"
)
relation = subset_relation(val, effective[key])
if relation is None:
# incomparable scope elements (e.g. regex vs glob): fail closed
raise ScopeWideningError(
f"hop {hop.id} scope for {key!r} is incomparable with parent; "
"cannot prove attenuation"
)
if not relation:
raise ScopeWideningError(
f"hop {hop.id} widens {key!r}: {val!r} not subset of {effective[key]!r}"
)
# fold: intersection, which for a proven subset is the declared value
effective = {k: declared.get(k, effective[k]) for k in effective}
return effective
def subset_relation(child, parent):
# returns True (subset), False (not subset), or None (undecidable)
if isinstance(child, str) and isinstance(parent, str):
if child.endswith("/*") and parent.endswith("/*"):
return child[:-2].startswith(parent[:-2])
return child == parent
if isinstance(child, (int, float)) and isinstance(parent, (int, float)):
return child <= parent
if isinstance(child, set) and isinstance(parent, set):
return child.issubset(parent)
return None