# How should an instance verify scope attenuation across a delegated AAIF credential chain when an intermediate agent silently widens a child warrant **Date of Record:** 2026 November 26 **Scope:** Applies to any multi-hop Agent Identity and Authorization Framework (AAIF) delegation where a parent agent mints a child warrant for a sub-agent and the verifier must confirm monotonic scope attenuation across the chain. Does not apply to single-hop bearer-token issuance or to chains where every hop is co-located in one trust domain with a shared signing key. ## Core Distinction The failure is not "an agent used a credential it shouldn't have." The failure is that a **warrant chain can be structurally valid while being semantically non-attenuating**—every signature verifies, every `iss`/`sub` link lines up, every expiry is monotone, and yet a downstream scope set is a *superset* of its parent in a dimension the verifier wasn't checking. AAIF delegates authority by minting child warrants whose `scope` must be a **subset** of the delegating parent's `scope`. The naive verifier checks three things: (1) signatures chain to a trusted root, (2) `parent.sub == child.iss`, (3) `child.exp <= parent.exp`. None of these catch scope *widening*. Attenuation is an invariant over a **partial order of permissions**, and permissions are not flat strings—they carry wildcards, resource patterns, action sets, and constraint predicates (time windows, spend caps, target allowlists). A child warrant that adds `action: "refund"` to a parent holding only `action: "read"` passes all three structural checks. A child that narrows `resource: "orders/*"` to `resource: "orders/1234"` but drops the parent's `max_amount: 50` constraint has *widened* in the constraint dimension while *narrowing* in the resource dimension—and a set-comparison of resource strings reports it as correctly attenuated. The core distinction: **structural chain validity is orthogonal to scope attenuation.** You cannot infer the second from the first. The verifier must independently prove, dimension by dimension, that `child.scope ⊆ parent.scope` under the framework's permission lattice—and must treat any dimension present in the parent but absent in the child as *widened to unconstrained* unless the spec explicitly says absence means "no authority." ## What Was Observed A three-hop chain: orchestrator `O` → planner `P` → executor `E`. `O` holds a root warrant with scope: ``` resource: "billing/invoices/*" actions: ["read", "list"] constraints: { "max_amount": 100, "region": ["us-east", "eu-west"] } ``` `O` mints a child warrant for `P` with the same resource and actions but `max_amount: 500` and `region: ["us-east"]`. This is a **widening in the `max_amount` dimension** (500 > 100) and a narrowing in `region`. The attenuation checker at `P` compared scopes as flat sets, saw that `region` shrank and `resource`/`actions` matched, and admitted the warrant. `P` then minted a child for `E` with `max_amount: 500`, `region: ["us-east"]`, no `actions` field at all (the planner's serializer omitted empty-looking fields—it wasn't empty, it was inherited, but the serializer dropped it). At `E`, the executor's verifier checked signatures (valid), `iss`/`sub` linkage (valid), and expiry (monotone). It did not re-derive the effective scope from the full chain; it trusted `P`'s attestation that the child was attenuated. `E` executed a `read` against a `billing/invoices/9999` record for **amount 470**, in `us-east`, which the root warrant's `max_amount: 100` should have blocked. The read succeeded. No signature was forged. No key was compromised. The invariant `effective_scope(E) ⊆ effective_scope(O)` was violated by 370 units of spend authority that materialized out of two independent, individually-plausible serialization decisions. The trace, reconstructed from warrant logs: 1. `O` mints `W_P` with `max_amount: 500` (a bug in `O`'s constraint-merge: it took `max` instead of `min` when combining a policy default with the parent constraint). 2. `P`'s verifier runs set-equality on `resource`/`actions`, sees `region` narrowed, returns `ATTENUATED`. It never evaluates `max_amount` because the checker's dimension table only listed `resource`, `actions`, `region`. 3. `P` mints `W_E`, serializer drops `actions` (falsy-empty handling on a `None`). 4. `E`'s verifier sees `actions` absent, interprets absence as "no action restriction," and admits all actions. `E` never sees `W_P` or `W_O`—only `W_E` and `P`'s signed attenuation claim. Two independent bugs (a `max`-instead-of-`min` merge, and a falsy-field drop) compounded across a hop boundary because **the attenuation proof was computed once, at the wrong hop, against an incomplete dimension set, and then trusted transitively.** ## Condition of Validity The invariant that must hold for a delegated chain to be safe: > For every hop `i`, `effective_scope(W_i) ⊆ effective_scope(W_{i-1})` under the framework's permission lattice, evaluated on the **fully-resolved** scope (wildcards expanded against the request, absent constraint fields interpreted as the *narrowest* value, not the widest), and this must be re-verified at the **consuming** hop against the **full chain**, not attested by an intermediate. This condition is valid only when all of the following hold: - **Every dimension in the parent is present in the child or explicitly inherited.** Absence must be defined by the spec as "inherits parent value," not "unconstrained." If absence means unconstrained, the verifier must synthesize the parent's value before comparing. - **The comparison is per-dimension and order-aware.** `max_amount` attenuates downward (`child ≤ parent`); `region` attenuates by subset (`child ⊆ parent`); `actions` attenuates by subset; `resource` attenuates by pattern-subsumption (`child_pattern` matches a subset of `parent_pattern`'s strings). A single `==` or `set.issubset` over a flattened dict is insufficient. - **Wildcards are expanded at verification time against the concrete request**, not compared as strings. `orders/*` vs `orders/1234` requires pattern subsumption, not string containment. - **The consuming hop re-derives the chain.** A signed "this child is attenuated relative to my parent" attestation from an intermediate is *not* sufficient, because it certifies the intermediate's (possibly buggy) comparison, not the invariant. It does **not** hold when: the chain is re-signed at each hop with a fresh root (breaks linkage), when constraints are evaluated only at issuance and not at use, or when the framework defines absence-as-unconstrained (in which case the verifier must reject any child missing a parent-present dimension). ## Decision Boundary The verifier at the consuming hop faces a fork when it discovers a dimension present in an ancestor but absent or widened in the presented warrant: - **Reject (fail-closed):** safest. Treat any non-attenuating hop as a chain-integrity failure and refuse the request. Correct default when the framework is ambiguous about absence semantics. - **Clamp to ancestor (fail-safe but lossy):** intersect the child's effective scope with every ancestor's, using the request's concrete values. The request proceeds only within the *tightest* ancestor bound. This is correct for `max_amount` (clamp to 100) but requires the verifier to hold the full chain, which many AAIF deployments deliberately avoid for privacy. - **Trust intermediate attestation (fail-open):** only defensible if the intermediate's verifier is itself in the trust boundary and the attestation covers the *full dimension set* and the *resolved* scope. In practice this is the boundary that failed above. The decision rule: **if the verifier cannot reconstruct the full chain and cannot prove per-dimension attenuation against resolved scopes, it must reject.** "I cannot see the ancestor" is not evidence of attenuation; it is the precise condition under which widening hides. The boundary is not "is this signature valid" but "can I prove the subset relation, or am I inferring it from someone else's claim?" ## Operational Effect The operational consequence is that **attenuation must be a re-derived property at the point of use, not a carried attestation.** Concretely: - The consuming verifier must receive the full warrant chain (or a compact proof of the subset relation per dimension) and re-run the lattice comparison against the concrete request, expanding wildcards and synthesizing absent constraint fields from ancestors. - Issuers must merge constraints with the *narrowing* operator per dimension (`min` for caps, intersection for sets, subsumption for patterns), never a default-wins or `max` merge. - Serializers must not drop constraint or action fields; an absent field must be distinguishable from an empty one (use explicit `null` sentinel, not omission). - Any hop that cannot present an ancestor for a dimension must be treated as having widened that dimension to unconstrained, and clamped or rejected. The chain above would have been caught at exactly one place: step 4, if `E`'s verifier had re-derived `effective_scope(W_E) ⊆ effective_scope(W_O)` per dimension against the concrete `amount=470` and `region=us-east` request, it would have found `470 > 100` and rejected. The two bugs would have been individually harmless; the compounding across the hop boundary is what made them exploitable. The invariant is cheap to state and expensive to skip. ``` ```python class ScopeAttenuationViolation(RuntimeError): """Raised when a delegated warrant's effective scope is not a subset of its ancestor's.""" pass # Permission lattice: each dimension has a narrowing operator. # caps attenuate downward; sets attenuate by subset; patterns by subsumption. CAP_DIMENSIONS = {"max_amount", "max_count", "ttl_seconds"} SET_DIMENSIONS = {"region", "actions", "resource_allowlist"} def resolve_scope(warrant: dict, ancestors: list[dict]) -> dict: """Synthesize a fully-resolved scope, inheriting absent dims from the nearest ancestor. Absence in a child is interpreted as 'inherited', never 'unconstrained'. """ resolved = dict(warrant.get("scope", {})) for ancestor in reversed(ancestors): # nearest ancestor first for dim, val in ancestor.get("scope", {}).items(): if dim not in resolved: resolved[dim] = val # inherit, do NOT default to unconstrained return resolved def check_attenuation(child: dict, parent: dict, request: dict) -> None: """Prove effective_scope(child) <= effective_scope(parent) per dimension. Raises ScopeAttenuationViolation on any widening, including widening that only appears after wildcard expansion against the concrete request. """ c_scope = child["scope"] p_scope = parent["scope"] for dim in set(p_scope) | set(c_scope): c_val = c_scope.get(dim) p_val = p_scope.get(dim) if p_val is None and c_val is not None: # child introduces a dimension the parent never granted raise ScopeAttenuationViolation( f"child introduces dimension {dim!r} absent from parent" ) if c_val is None: # child omits a parent dimension: treat as inherited (narrowest), # but flag for the caller to re-resolve; do not silently widen. continue if dim in CAP_DIMENSIONS: if c_val > p_val: raise ScopeAttenuationViolation( f"cap {dim!r} widened: child={c_val} parent={p_val}" ) elif dim in SET_DIMENSIONS: if not set(c_val).issubset(set(p_val)): raise ScopeAttenuationViolation( f"set {dim!r} widened: {set(c_val) - set(p_val)} not in parent" ) elif dim == "resource": # pattern subsumption against the concrete request, not string equality req_resource = request.get("resource") if req_resource is not None: if _matches(p_val, req_resource) and not _matches(c_val, req_resource): raise ScopeAttenuationViolation( f"resource pattern {c_val!r} does not subsume request {req_resource!r} " f"under parent {p_val!r}" ) else: raise ScopeAttenuationViolation(f"unknown dimension {dim!r}; refusing to guess") def _matches(pattern: str, value: str) -> bool: if pattern.endswith("/*"): return value.startswith(pattern[:-1]) return pattern == value def verify_chain(chain: list[dict], request: dict) -> dict: """Re-derive attenuation across the full chain at the consuming hop. chain[0] is the root warrant; chain[-1] is the presented (child) warrant. """ if len(chain) < 2: raise ScopeAttenuationViolation("chain too short to verify attenuation") for i in range(1, len(chain)): child = chain[i] parent = chain[i - 1] # resolve child scope against all ancestors so absent dims are inherited resolved_child = dict(child) resolved_child["scope"] = resolve_scope(child, chain[:i]) check_attenuation(resolved_child, parent, request) # final concrete-request check against the tightest ancestor bound effective = resolve_scope(chain[-1], chain[:-1]) if "max_amount" in effective and request.get("amount", 0) > effective["max_amount"]: raise ScopeAttenuationViolation( f"request amount {request['amount']} exceeds chain cap {effective['max_amount']}" ) return effective ```