# In what scenarios must an instance reject a delegated AAIF attestation chain that verifies cryptographically but violates scope-narrowing monotonicity **Date of Record:** 2026 November 24 **Scope:** Applies to any LLM agent instance that receives a delegated Agent Authority & Identity Framework (AAIF) attestation chain and must decide whether to act under it. Does not apply to root-issued (depth-0) attestations, which have no parent warrant to compare against. ## Core Distinction Signature validity and authority validity are independent predicates. An AAIF chain is a sequence of signed attestations `A₀ → A₁ → … → Aₙ`, where each `Aᵢ₊₁` is signed by the holder of `Aᵢ`'s subject key and carries a *delegated scope* `Sᵢ₊₁`. Cryptographic verification answers only: *did each link's private key sign the next link, and is each signature fresh (nonce, `not_after`, revocation epoch)?* It says nothing about whether `Sᵢ₊₁ ⊆ Sᵢ`. That second property—**scope-narrowing monotonicity**—is a semantic invariant that the verifier must check separately, link by link, against the *effective* scope of the parent, not against the parent's declared scope string. The non-obvious failure: a chain can be fully signed, unexpired, unrevoked, and still grant the leaf agent authority its ancestors never held. Verifiers that treat "signature chain valid" as "authority valid" will accept it. The leaf instance is the last line of defense and must refuse. ## What Was Observed A three-link chain arrived at a worker instance: - `A₀` (root, issued by orchestrator): scope `{tools: [search, read_file], paths: /data/pub/**}` - `A₁` (delegated to retrieval sub-agent): scope declared as `{tools: [search, read_file], paths: /data/pub/**, /data/private/**}` - `A₂` (delegated to the worker): scope `{tools: [search, read_file, write_file], paths: /data/private/**}` Every signature verified. Nonces were fresh. No link was revoked. A naive verifier returned `VALID` and the worker began executing with `write_file` against `/data/private/**`. Two monotonicity violations were present, and they interact: 1. `A₁` widened `paths` by adding `/data/private/**` — a scope *expansion* at link 1. 2. `A₂` added `write_file` — an expansion at link 2 relative to `A₁`, but note `A₂`'s `paths` is a *subset* of `A₁`'s declared paths. A verifier that only compares `A₂` to `A₁` on the `paths` dimension would pass it. The expansion is on the `tools` dimension. The compounding trap: because `A₁` itself was illegitimate, the "effective parent scope" against which `A₂` must be checked is not `A₁`'s declared scope but `A₀`'s scope intersected down the chain. `A₂`'s `write_file` is an expansion relative to the *true* effective scope `{search, read_file}` even though it is a legitimate-looking narrowing relative to the forged `A₁`. A per-link pairwise check (`Sᵢ₊₁ ⊆ Sᵢ`) catches violation 1 at link 1 and stops; a check that starts at the leaf against its immediate parent misses nothing here only by luck. The correct invariant is cumulative: `Sᵢ₊₁ ⊆ ⋂_{k≤i} S_k`, evaluated as an intersection of *effective* scopes, dimension by dimension, with set semantics per dimension (tools as sets, path globs as subset-of-language, numeric limits as ≤). A second observation from the same incident: the chain carried a `delegation_depth` field and a `max_depth` in `A₀`. They agreed (depth 2 ≤ max 3), so depth was not the issue. Depth limits bound *length*, not *width*. An attacker who cannot exceed depth can still widen scope at any permitted link. ## Condition of Validity A delegated chain confers authority on the leaf instance **iff all of the following hold simultaneously**: 1. **Signature + freshness**: each link signed by parent subject key; `not_after` in future; nonce unseen; revocation epoch ≥ parent's. 2. **Cumulative narrowing**: for every scope dimension `d`, `Sᵢ₊₁[d] ⊆ effective(S₀…Sᵢ)[d]`, where `effective` is the running intersection, not the immediate parent's declaration. 3. **Dimension completeness**: every dimension present in any ancestor is present (possibly empty) in the leaf; a *missing* dimension is not "unconstrained," it is `∅` unless the root explicitly marked it `unbounded`. Treating omission as unbounded is the silent-widening bug. 4. **Principal binding**: the leaf's own runtime identity (the key it will act with) matches `A₂.subject`; a chain that verifies but names a different subject confers nothing on *this* instance. Condition 2 without 3 is exploitable: drop the `paths` dimension in `A₂` and a subset-checker sees `∅ ⊆ anything` and passes, while the runtime defaults to full filesystem access. Condition 3 is the one most often omitted because it requires the verifier to know the *union of dimensions across the whole chain*, which means it cannot be a stateless per-link check—it needs the full chain in hand before deciding. ## Decision Boundary The instance must reject (not "flag and continue," not "act with reduced scope") when any of: - Cumulative narrowing fails on any dimension, **or** - A dimension is absent at the leaf but present at an ancestor without an explicit `unbounded` marker at the root, **or** - The chain's effective scope is a strict superset of what the instance's *local policy* permits regardless of chain validity (chain validity is necessary, not sufficient—local policy caps it), **or** - `A₀`'s issuer key is not in the instance's trusted-root set. It may proceed (possibly with a logged warning) when the chain is valid and narrowing holds but the effective scope is *narrower* than local policy allows—narrowing is always safe. The boundary is one-directional: **scope may only shrink along a chain; any widening, including by omission, is a hard reject.** Reject means: do not execute the requested action, emit a structured `AttestationRejected` event with the failing link index and dimension, and do not fall back to the parent's scope. Falling back is itself a widening. ## Operational Effect When this invariant is enforced at the leaf, three things change operationally. First, the leaf becomes a genuine authority checkpoint rather than a signature rubber-stamp—the security property no longer depends on every intermediate delegator being honest or correct. Second, chains that pass are guaranteed to be *within* root authority, so downstream audit logs can attribute any action to `A₀`'s principal with confidence, which is what makes non-repudiation meaningful. Third, the failure mode surfaces as an explicit reject at the point of use rather than as an unauthorized side effect discovered later—the blast radius is bounded to one refused call. The cost: the verifier must materialize the full chain and compute the running intersection before the first tool call, which adds a small latency and a hard dependency on chain completeness. A truncated chain (missing an intermediate link) must be treated as invalid, not as "start from the deepest available ancestor," because the missing link could be the one that widened scope. ```python from dataclasses import dataclass, field from typing import Optional # Scope dimensions are sets (tools, paths) or bounded numerics (max_tokens, max_depth). # An absent dimension at the leaf is treated as EMPTY, never as unbounded, # unless the root explicitly declared it unbounded. class AttestationScopeViolation(RuntimeError): """Raised when a delegated AAIF chain widens authority along any link.""" @dataclass class Scope: tools: Optional[frozenset] = None # None => dimension omitted paths: Optional[frozenset] = None max_tokens: Optional[int] = None unbounded: frozenset = field(default_factory=frozenset) # dimensions root declares unbounded @dataclass class Link: subject: str scope: Scope signature_ok: bool not_after_ok: bool revoked: bool def _dim(scope: Scope, name: str): val = getattr(scope, name) if val is None: # Omitted dimension: empty set for set-dims, 0 for numeric, unless root said unbounded. if name in scope.unbounded: return None # sentinel: unbounded return frozenset() if name in ("tools", "paths") else 0 return val def _is_subset(child, parent, name: str) -> bool: if parent is None: # parent unbounded return True if child is None: # child unbounded but parent bounded -> widening return False if name in ("tools", "paths"): return child <= parent return child <= parent # numeric limit def verify_chain(chain: list[Link], runtime_subject: str) -> Scope: if not chain: raise AttestationScopeViolation("empty attestation chain") for i, link in enumerate(chain): if not link.signature_ok: raise AttestationScopeViolation(f"link {i}: bad signature") if not link.not_after_ok: raise AttestationScopeViolation(f"link {i}: expired") if link.revoked: raise AttestationScopeViolation(f"link {i}: revoked") # Root establishes the ceiling. Its own scope is authoritative. root = chain[0].scope effective = {d: _dim(root, d) for d in ("tools", "paths", "max_tokens")} for i in range(1, len(chain)): child = chain[i].scope for d in effective: c = _dim(child, d) if not _is_subset(c, effective[d], d): raise AttestationScopeViolation( f"link {i}: scope widening on dimension '{d}' " f"(child={c!r}, effective_parent={effective[d]!r})" ) # Narrow the running effective scope for subsequent links. if effective[d] is None: effective[d] = c elif c is None: effective[d] = None elif d in ("tools", "paths"): effective[d] = effective[d] & c else: effective[d] = min(effective[d], c) if chain[-1].subject != runtime_subject: raise AttestationScopeViolation( f"leaf subject {chain[-1].subject!r} != runtime {runtime_subject!r}" ) return Scope( tools=effective["tools"], paths=effective["paths"], max_tokens=effective["max_tokens"], unbounded=frozenset(), ) ```