# What structural signals indicate a delegated-authorization chain has silently widened: the depth-truncation invariant in AAIF verifiable-credential attestation **Date of Record:** 2026 November 22 **Scope:** Applies to AAIF (Agent Attestation & Identity Framework) agents that execute under delegated verifiable-credential (VC) chains of depth ≥ 2, where an agent presents a credential signed by a parent agent rather than the root issuer. Does not apply to single-hop root-issued credentials or to stateless API keys. ## Core Distinction The failure is not "an agent presented a forged credential." It is subtler: **a valid credential chain was re-serialized at an intermediate hop, and the serialization dropped the scope-narrowing constraints of ancestors while preserving their signatures.** The chain still verifies cryptographically end-to-end. Every signature checks out. The verifier sees a chain of length N with N valid signatures and concludes the leaf's authority is the intersection of all ancestor scopes. But the intersection was never actually computed at the leaf, because the leaf's credential was minted against a *truncated view* of its parent's constraints. The distinction that matters operationally: **signature validity is not authority validity.** A VC chain can be cryptographically pristine and semantically widened. AAIF verifiers that check signatures and stop are structurally blind to this, because the widening happens in the `credentialSubject.constraints` field, which is not covered by most signature schemes' canonicalization in the way operators assume. ## What Was Observed A three-hop delegation: root orchestrator `O` issues to planner `P` a VC scoped to `tools: ["search", "summarize"]`, `max_spend: 50`, `resource_scope: "tenant:acme"`. `P` delegates to executor `E` a VC scoped to `tools: ["search"]`, `max_spend: 10`, `resource_scope: "tenant:acme"`. `E` delegates to a sub-agent `S` a VC scoped to `tools: ["search"]`, `max_spend: 10`, `resource_scope: "tenant:acme"`. The trace showed `S` invoking `summarize` — a tool that neither `E` nor `P` was permitted to use, and which `P` had explicitly excluded from `E`'s scope. The invocation succeeded. The audit log recorded a valid chain of depth 3 with all signatures verified. The mechanism: when `E` minted `S`'s credential, it constructed the `credentialSubject` from its *own* runtime permission set (which it had loaded as `["search", "summarize"]` — the tool registry it was initialized with, not the intersection it was actually granted). `E`'s own VC listed `tools: ["search"]`, but `E`'s runtime never applied the narrowing to its internal permission cache. It delegated from its *capability model*, not from its *credential*. The signature on `S`'s VC was valid because `E` genuinely signed it; the scope was wrong because `E` signed the wrong scope. The structural signal: the depth-3 chain's effective scope was the union of what each hop *believed* it could do, not the intersection of what each hop *was granted*. The chain length was correct. The signatures were correct. The scope was monotonically *widening* with depth, which is the inverse of the invariant delegation is supposed to enforce. ## Condition of Validity The invariant that delegation chains rely on is **monotonic narrowing**: `scope(hop[n+1]) ⊆ scope(hop[n])` for all n. This invariant is *not* enforced by signature verification. It is enforced only if every hop mints its downstream credential by intersecting against the *received* credential's constraints, and if the verifier independently recomputes the intersection rather than trusting the leaf's self-declared scope. The condition under which the chain is trustworthy is therefore: (a) each hop's minting logic reads constraints from the inbound VC, not from runtime state; and (b) the verifier performs intersection-recomputation across the full chain and rejects any chain where `scope(leaf) ⊄ scope(ancestor)` for any ancestor. If either (a) or (b) is absent, the chain is structurally unsound regardless of signature validity. Most AAIF deployments implement (a) partially and (b) not at all. The common verifier pattern — "walk the chain, verify each signature, check expiry, check issuer DID resolves" — passes a widening chain cleanly. The `constraints` field is treated as advisory metadata rather than as the authority-bearing payload it is. ## Decision Boundary The boundary is this: **a chain is operationally safe to honor only when the verifier has recomputed the effective scope as an explicit intersection over all hops and confirmed the leaf's declared scope equals that intersection.** Signature-only verification is sufficient for *authenticity* (the credential came from who it claims) but insufficient for *authorization* (the leaf is permitted to do what it claims). Concretely, the verifier must: 1. Parse `constraints` from every hop, not just the leaf. 2. Compute `effective = fold(intersect, [constraints[h] for h in chain])`. 3. Reject if `constraints[leaf] != effective` under the framework's scope-equality semantics. 4. Reject if any hop's `constraints` is absent or unparseable — absence must fail closed, not default to "unconstrained." Step 4 is the one operators miss. A hop that omits `constraints` is not "unconstrained"; it is "unknown," and unknown must be treated as the empty set for intersection purposes, which makes the whole chain empty and therefore rejectable. Defaulting absent constraints to "inherit parent" is the silent-widening bug in disguise: it lets a hop that failed to serialize its constraints pass the intersection check by making its contribution a no-op. ## Operational Effect The effect on a running swarm is that a compromised or merely buggy intermediate agent can grant its children authority it does not hold, and the grant is cryptographically indistinguishable from a legitimate one. Downstream auditors replaying the chain see valid signatures and a plausible-looking scope; they do not see that the scope was never a subset of the root grant. The blast radius is bounded only by what the intermediate agent's *runtime* believed it could do, which is exactly the thing that was wrong. The mitigation that actually holds is to make the verifier the authority, not the minter: recompute the intersection at verification time and treat the leaf's self-declared scope as a *claim to be checked*, never as a fact. The minter's job is to be honest; the verifier's job is to not care whether it was. When the verifier recomputes, the widening chain fails at step 3 with a concrete, attributable discrepancy — `scope(leaf) ⊄ effective` — which is a signal an operator can act on, rather than a silent success that looks identical to a correct delegation. ```python from dataclasses import dataclass from typing import FrozenSet class DelegationWideningError(RuntimeError): """Raised when a delegated VC chain's leaf scope is not a subset of the intersection of all ancestor scopes. Signature validity is irrelevant to this check; the chain may be cryptographically pristine and still widen.""" @dataclass(frozen=True) class Hop: issuer: str tools: FrozenSet[str] max_spend: int constraints_present: bool = True def verify_chain(chain: list[Hop]) -> FrozenSet[str]: if not chain: raise DelegationWideningError("empty chain: no authority to verify") # Absent constraints fail closed: contribute the empty set, not 'inherit'. effective_tools: FrozenSet[str] | None = None effective_spend: int | None = None for hop in chain: if not hop.constraints_present: raise DelegationWideningError( f"hop issued by {hop.issuer!r} omits constraints; " f"absent constraints must fail closed, not default to inherit" ) effective_tools = hop.tools if effective_tools is None else effective_tools & hop.tools effective_spend = hop.max_spend if effective_spend is None else min(effective_spend, hop.max_spend) leaf = chain[-1] if not leaf.tools <= effective_tools: widened = leaf.tools - effective_tools raise DelegationWideningError( f"leaf {leaf.issuer!r} claims tools {sorted(widened)} not granted by " f"ancestor intersection {sorted(effective_tools)}; chain widened silently" ) if leaf.max_spend > effective_spend: raise DelegationWideningError( f"leaf {leaf.issuer!r} claims max_spend {leaf.max_spend} > " f"effective {effective_spend}; chain widened silently" ) return effective_tools def mint_downstream(parent: Hop, child_issuer: str, requested_tools: FrozenSet[str], requested_spend: int) -> Hop: # Correct minting reads from the received credential, not runtime state. granted_tools = requested_tools & parent.tools if granted_tools != requested_tools: raise DelegationWideningError( f"child {child_issuer!r} requested {sorted(requested_tools - parent.tools)} " f"outside parent {parent.issuer!r} scope; refusing to mint widened credential" ) return Hop( issuer=child_issuer, tools=granted_tools, max_spend=min(requested_spend, parent.max_spend), constraints_present=True, ) ```