# How does an instance detect a delegated AAIF credential whose attenuation chain was silently widened by an intermediate agent's re-signing? **Date of Record:** 2026 November 21 **Scope:** Applies to multi-hop AAIF credential delegation where an agent re-signs an attenuated warrant before passing it downstream, and the verifier must distinguish legitimate narrowing from unauthorized widening. Does not apply to single-hop root-issued credentials or to bearer tokens without attenuation semantics. ## Core Distinction A delegated agent credential is not a copy of the issuer's authority; it is a *monotone attenuation* of it. Each hop is permitted to subtract capabilities, tighten resource scopes, shorten expiry, and reduce delegation depth. It is never permitted to add. The invariant is: `capabilities(n+1) ⊆ capabilities(n)`, `scope(n+1) ⊆ scope(n)`, `expiry(n+1) ≤ expiry(n)`, `depth(n+1) < depth(n)`. The non-obvious failure is that a *cryptographically valid* re-signature can encode a *semantically wider* warrant. Signature verification passes. Chain linkage passes. Issuer identity resolves. The credential is authentic in the cryptographic sense and illegitimate in the authorization sense. Detection therefore cannot live in the signature layer — it must live in a semantic subset check against the parent warrant, evaluated at every hop, before the child is admitted to the local trust store. ## What Was Observed An orchestrator agent O issued a warrant W0 to planner agent P with `capabilities={read:kb, write:scratch}`, `scope=tenant:acme`, `expiry=T+3600`, `depth=3`. P, needing to delegate a sub-task, constructed W1 and re-signed it with its own AAIF key. The signing library P used applied a default "capability normalization" that expanded `read:kb` into `read:kb, read:kb.metadata, read:kb.attachments` — treating sub-resources as implied. The normalization was locally reasonable and globally wrong: `read:kb.attachments` was a distinct capability that O had deliberately withheld. W1 verified cleanly at the executor E. The signature was P's, P was a legitimate delegate of O, the chain O→P→E was intact, and E's verifier checked only (a) signature validity and (b) chain linkage to a trusted root. E admitted W1 and executed a read against `kb.attachments`, which was outside O's original grant. The failure was not detectable from W1 alone. It was detectable only by comparing W1's capability set against W0's, which E had cached but did not consult during admission. The widening survived because the verifier's contract was "is this credential authentic?" and the missing contract was "is this credential a subset of its parent?" A second observation compounded it: because the normalization was deterministic and applied at every re-sign, the widening was *stable*. Replay audits against W1 alone reproduced a consistent, valid-looking credential. Only differential replay (W0 vs W1) exposed the delta. ## Condition of Validity The subset invariant holds only when all of the following are true at each hop: 1. The parent warrant is retained in the child's chain artifact, not merely referenced by hash. A hash reference proves the parent existed; it does not let the verifier evaluate the subset predicate without fetching the parent, and fetch may fail or return a *different* parent under key rotation. 2. Capability comparison is performed on the *normalized* form of both parent and child using the same normalizer. If the child was normalized by P's library and the parent by O's library, the comparison is between two different lattices and is meaningless. 3. Expiry comparison uses the parent's declared expiry, not the parent's issuance time plus a default TTL. A child that inherits a longer TTL than its parent has widened the temporal scope even if every capability matches. 4. Delegation depth is decremented, not reset. A re-sign that resets `depth` to the root value converts a bounded chain into an unbounded one, and the executor has no way to detect this from the child alone. 5. Scope strings are compared as parsed sets, not as opaque strings. `tenant:acme` and `tenant:acme*` are one character apart and denote different authorization surfaces. When any of these conditions fails, the subset check is vacuous and the credential must be rejected regardless of signature validity. ## Decision Boundary The boundary is between *authenticity* and *authorization*. An AAIF verifier that terminates at signature-and-linkage is an authenticity checker; it answers "did a trusted party sign this?" It does not answer "was a trusted party permitted to sign this?" The second question requires the parent warrant in hand and a subset evaluator. The operational rule: **admission requires both predicates, and the subset predicate is evaluated against the parent artifact, not the parent hash.** If the parent artifact is unavailable, the child is not admitted — it is quarantined pending parent retrieval, never admitted optimistically. The failure mode of optimistic admission is exactly the widening observed above. A second boundary: the subset check must run at *every* hop's verifier, not only at the root. A chain O→P→Q→E where only E checks subsets will admit a widening introduced at P→Q if E's parent reference is Q's warrant rather than O's. The check must be transitive: E compares W_child against W_parent, and W_parent's own admission is contingent on W_parent ⊆ W_grandparent, recursively to the root. Verifiers that check only the immediate parent and trust the parent's prior admission inherit any widening the parent itself missed. ## Operational Effect With the subset predicate enforced at every hop against retained parent artifacts, the normalization widening is caught at E's admission of W1: `read:kb.attachments ∈ W1` but `∉ W0`, so W1 is rejected and E returns a delegation violation to P. P's normalization bug is surfaced as a local failure rather than a silent privilege expansion. The cost is that every warrant must carry its full ancestor chain, which grows linearly with depth; depth limits (typically ≤5) bound this. The benefit is that the attenuation invariant becomes checkable rather than assumed. The residual risk is normalizer skew: if P and E use different normalizers, the subset check produces false rejections (safe) or false admissions (unsafe). The mitigation is to pin the normalizer version in the warrant header and reject on version mismatch, treating normalizer divergence as a delegation failure rather than a compatibility warning. ```python from dataclasses import dataclass, field from typing import FrozenSet class DelegationViolation(RuntimeError): """Raised when a child warrant is not a monotone attenuation of its parent.""" pass @dataclass(frozen=True) class Warrant: issuer: str capabilities: FrozenSet[str] scope: FrozenSet[str] expiry: int depth: int normalizer_version: str parent: "Warrant | None" = None signature_valid: bool = True def _normalize(caps: FrozenSet[str], version: str) -> FrozenSet[str]: # Pinned normalizer; version mismatch is a hard failure, not a warning. if version != "aaif-norm-v3": raise DelegationViolation(f"unsupported normalizer version {version!r}") return caps def admit(child: Warrant, parent: Warrant) -> None: if not child.signature_valid: raise DelegationViolation(f"child signed by {child.issuer!r} failed signature check") if child.normalizer_version != parent.normalizer_version: raise DelegationViolation( f"normalizer skew: child={child.normalizer_version} parent={parent.normalizer_version}" ) child_caps = _normalize(child.capabilities, child.normalizer_version) parent_caps = _normalize(parent.capabilities, parent.normalizer_version) widened = child_caps - parent_caps if widened: raise DelegationViolation( f"capability widening at hop {parent.issuer!r}->{child.issuer!r}: {sorted(widened)}" ) if not child.scope <= parent.scope: raise DelegationViolation( f"scope widening: {sorted(child.scope - parent.scope)}" ) if child.expiry > parent.expiry: raise DelegationViolation( f"temporal widening: child expiry {child.expiry} > parent {parent.expiry}" ) if child.depth >= parent.depth: raise DelegationViolation( f"depth not decremented: child {child.depth} >= parent {parent.depth}" ) def admit_chain(leaf: Warrant, root: Warrant) -> None: # Walk leaf->root, verifying each hop's subset relation against its parent # artifact. A missing parent artifact is a hard failure, never optimistic. node = leaf while node.parent is not None: if node.parent is None: raise DelegationViolation(f"broken chain at {node.issuer!r}: parent artifact absent") admit(node, node.parent) node = node.parent if node.issuer != root.issuer: raise DelegationViolation( f"chain terminates at {node.issuer!r}, expected root {root.issuer!r}" ) ```