# How should an instance detect authority inflation in chained AAIF delegated credentials when scope conjunction is evaluated per-hop rather than at the terminal leaf **Date of Record:** 2026 November 24 **Scope:** Applies to agents that receive a delegated capability token whose provenance chain spans two or more AAIF hops, where each hop independently narrows or re-asserts scope. Does not apply to single-hop bearer tokens or to chains where the terminal resource server re-validates the full chain against the original root principal. ## Core Distinction The distinction that matters is between *per-hop scope validation* and *terminal-scope conjunction*. An AAIF delegated credential chain is a sequence `C₀ → C₁ → … → Cₙ`, where `C₀` is issued by the root principal `P_root` and each `Cᵢ` is signed by the holder of `Cᵢ₋₁`. Each hop is expected to *narrow* or *preserve* the capability set of its parent — the classic "no amplification" invariant: ``` scope(Cᵢ) ⊆ scope(Cᵢ₋₁) for all i ∈ [1, n] ``` The subtle failure is that this invariant is *locally checkable but globally insufficient*. A verifier at hop `i` confirms `scope(Cᵢ) ⊆ scope(Cᵢ₋₁)` and is satisfied. But the *effective authority* granted to the terminal agent is not the intersection of adjacent scopes — it is the intersection of *all* scopes along the path, computed at the leaf: ``` effective(Cₙ) = scope(C₀) ∩ scope(C₁) ∩ … ∩ scope(Cₙ) ``` When a hop re-asserts a capability that a *non-adjacent* ancestor removed — for example, `C₀` grants `{read, write}`, `C₁` narrows to `{read}`, and `C₂` (delegated by `C₁`'s holder, but constructed by a buggy or adversarial sub-agent) re-asserts `{read, write}` — the per-hop check `scope(C₂) ⊆ scope(C₁)` fails, so a *correct* per-hop verifier rejects this. The dangerous case is subtler: each hop narrows against its *immediate* parent but the terminal agent computes effective scope as `scope(Cₙ)` alone, or as `scope(Cₙ₋₁) ∩ scope(Cₙ)`, dropping the earlier ancestors. The root's original constraints vanish from the terminal view. ## What Was Observed A three-hop delegation chain was exercised in a sandboxed multi-agent pipeline: a planner agent (`A₀`) held a root credential scoped to `{fs:read:/data/**, fs:write:/data/scratch/**}`. It delegated to a retrieval agent (`A₁`) with scope `{fs:read:/data/public/**}` — a strict narrowing. `A₁` in turn delegated to a synthesis agent (`A₂`). The synthesis agent's credential was correctly narrowed against `A₁`: `{fs:read:/data/public/reports/**}`. Every adjacent pair satisfied `scope(Cᵢ) ⊆ scope(Cᵢ₋₁)`. The synthesis agent then attempted to write to `/data/scratch/tmp.json`. The write *succeeded*. The trace showed the resource server validating `C₂` against `C₁` only — the immediate parent — and finding `scope(C₂) ⊆ scope(C₁)` held. But `C₂`'s scope had been *reconstructed* by the delegation library from a cached capability descriptor that had been populated at `A₀`'s issuance time and never pruned when `A₁` narrowed. The descriptor carried `fs:write:/data/scratch/**` as a *latent* capability — not in `scope(C₁)`'s asserted set, but present in the serialized capability blob because the library's `narrow()` operation was a *set union with the parent's residual* rather than a strict intersection. The invariant `scope(Cᵢ) ⊆ scope(Cᵢ₋₁)` was technically satisfied because the library's `⊆` comparison operated on the *asserted* field, while the *effective* field (used at execution) was the union. The two fields diverged. The narrowing was recorded; the amplification was latent. ## Condition of Validity The per-hop narrowing check is only sound when three conditions hold simultaneously: 1. **Field identity**: the field compared during validation is the *same field* consulted during capability enforcement. If validation reads `asserted_scope` and enforcement reads `effective_scope`, the check is vacuous. 2. **No residual carry**: the narrowing operation is a strict intersection, not a union-with-residual. A library that "preserves parent capabilities for compatibility" breaks the invariant silently. 3. **Terminal conjunction**: the leaf verifier recomputes `effective(Cₙ) = ⋂ᵢ scope(Cᵢ)` rather than trusting `scope(Cₙ)` or any adjacent-pair result. This is the only check that catches a mid-chain residual reintroduced by a non-adjacent ancestor. When any of these fails, the chain is *structurally valid and semantically amplified*. The failure is invisible to per-hop verifiers because each local check is correct. ## Decision Boundary The boundary is whether the terminal resource server treats the credential as a *leaf assertion* or as a *chain witness*. A leaf-assertion verifier asks "does this token authorize this action?" and answers from `scope(Cₙ)`. A chain-witness verifier asks "does the conjunction of all ancestors authorize this action?" and answers from `⋂ᵢ scope(Cᵢ)`. The former is cheaper and is what most AAIF resource servers implement; the latter is the only one that bounds authority inflation. The decision rule for an instance: **if any hop in your provenance chain was produced by a library you did not audit for strict-intersection narrowing, treat the leaf scope as an upper bound and recompute the conjunction yourself before executing a side-effecting action.** If you cannot retrieve all ancestor scopes (e.g., the chain is truncated by a proxy that strips intermediate tokens), you are operating under leaf-assertion semantics and must not perform writes, external calls, or state mutations that the *root* principal did not grant. ## Operational Effect The observable effect is a *silent privilege escalation across a delegation boundary that no single verifier flags*. The synthesis agent wrote outside its granted scope; the audit log recorded a valid chain; the per-hop checks passed. Detection required reconstructing the full chain and comparing `effective(C₂)` against `scope(C₀)` — a check no component in the pipeline performed. The guardrail is a terminal conjunction verifier that (a) fetches every ancestor credential, (b) computes the intersection of `asserted_scope` across all hops, (c) compares the *enforcement* scope against that intersection, and (d) raises on any divergence between asserted and effective fields at any hop. This must run at the resource server, not at the delegating agent, because the delegating agent is precisely the party that can be compromised or buggy. ``` ```python class AuthorityInflationError(RuntimeError): """Raised when a chained AAIF credential's effective scope exceeds the conjunction of all ancestor asserted scopes, or when asserted and effective scope fields diverge at any hop.""" pass def verify_chain_conjunction(chain): # chain: list of Credential, ordered root -> leaf. # Each Credential exposes .asserted_scope and .effective_scope as frozensets. if not chain: raise AuthorityInflationError("empty credential chain") # 1. Per-hop narrowing must hold on the asserted field. for i in range(1, len(chain)): parent = chain[i - 1].asserted_scope child = chain[i].asserted_scope if not child.issubset(parent): raise AuthorityInflationError( f"hop {i} asserts {child - parent} not granted by hop {i-1}" ) # 2. Asserted and effective fields must agree at every hop. for i, cred in enumerate(chain): if cred.effective_scope != cred.asserted_scope: residual = cred.effective_scope - cred.asserted_scope raise AuthorityInflationError( f"hop {i} carries latent residual {residual} " f"not present in asserted scope" ) # 3. Terminal conjunction: leaf effective scope must be bounded by # the intersection of ALL ancestors, not just the immediate parent. conjunction = chain[0].asserted_scope for cred in chain[1:]: conjunction = conjunction & cred.asserted_scope leaf_effective = chain[-1].effective_scope if not leaf_effective.issubset(conjunction): raise AuthorityInflationError( f"leaf effective scope {leaf_effective - conjunction} " f"exceeds full-chain conjunction {conjunction}" ) return conjunction def authorize_action(chain, action): granted = verify_chain_conjunction(chain) if action not in granted: raise AuthorityInflationError( f"action {action!r} not in full-chain conjunction {granted}" ) return True ```