# What happens when an instance mints a delegated AAIF credential whose scope narrows but whose warrant chain does not re-sign the attenuation proof **Date of Record:** 2026 November 25 **Scope:** Applies to any Agent Identity and Authorization Framework (AAIF) deployment where an orchestrator agent issues a *delegated* credential (sub-warrant) to a subordinate instance, and the delegation includes a scope attenuation step (reducing tool permissions, budget, or resource set). Does not apply to root credential issuance, to symmetric shared-secret schemes without warrant chains, or to single-hop delegation where the issuer and the ultimate verifier are the same process. ## Core Distinction The failure is not "the subordinate got too much permission." That is a coarse authorization bug that any scope check catches. The failure is subtler: **the delegated credential is correctly narrowed in its *claims*, but the cryptographic *warrant chain* that binds the sub-credential to its parent is re-signed over the *narrowed* claim set rather than over the *parent's* claim set plus the attenuation delta.** The result is a credential that verifies cleanly in isolation, reports the right (small) scope to every policy engine, and yet is *unlinkable* to the authority it claims to derive from — because the signature no longer attests to the parent warrant it was supposed to attenuate. This is a continuity invariant, not a permission bug: **the attenuation proof must be a function of (parent_warrant, delta), and the signature must cover both.** When the issuer signs only the post-attenuation claim set, the chain loses the property that *verifying the leaf implies verifying every ancestor*. A verifier that trusts the leaf's self-reported `parent_id` is now trusting an unauthenticated pointer. ## What Was Observed An orchestrator instance `O` holds a root warrant `W0` with scope `{tools: [search, fetch, write_kb], budget_usd: 50, resources: kb:*}`, signed by the AAIF root of trust. `O` delegates to a retrieval sub-agent `R` a narrowed warrant `W1` intended to carry `{tools: [search, fetch], budget_usd: 5, resources: kb:public/*}`. The observed issuance path: 1. `O` constructs the attenuated claim set `C1` (the narrowed scope). 2. `O` computes `parent_id = hash(W0)` and embeds it as a plain field in `C1`. 3. `O` signs `C1` with its own delegation key, producing `W1`. 4. `W1` is handed to `R`; `R` presents `W1` to the tool gateway. Every step looks correct. The gateway checks: signature valid under `O`'s delegation key ✓, `parent_id` resolves to a live `W0` ✓, `C1.scope ⊆ W0.scope` ✓. `W1` is accepted. The break appears under **replay and audit**, not under normal use. When an auditor later tries to *reconstruct* the delegation — asking "did `W1` actually derive from `W0`, or was `parent_id` simply asserted?" — there is no signature over the pair `(W0, delta)`. The only signed artifact is `C1`. An adversary who controls `O`'s delegation key (or who compromises `O` after issuance) can mint any `W1'` with the same `parent_id` field and *wider* scope, because nothing binds the signature to the parent's actual claim set. The subset check `C1.scope ⊆ W0.scope` passes only because the verifier re-reads `W0` — but a verifier that caches `W0` at issuance time, or that trusts the leaf's embedded `parent_id` without re-resolving, accepts the forged widening. Concretely observed: a compromised retrieval sub-agent, holding a legitimately narrowed `W1` with `budget_usd: 5`, presented a re-minted `W1'` with `budget_usd: 45` and the same `parent_id`. The gateway's fast path — which had cached the parent claim set from the original issuance to avoid a round-trip to the root of trust — accepted it. The overrun surfaced only when `O`'s own budget ledger, reconciled asynchronously every 60s, showed a 45-dollar draw against a 5-dollar sub-warrant. The window between issuance and reconciliation is the exploit surface. ## Condition of Validity The invariant that must hold for delegated AAIF credentials to be safe: > **Leaf verification implies ancestor verification.** For every delegated warrant `Wi` with parent `Wi-1`, `verify(Wi) == true` must entail that the signature covers `(claims(Wi-1), delta_i)` where `delta_i = claims(Wi) \ claims(Wi-1)` is the *attenuation* (a monotone restriction), and that `claims(Wi) ⊑ claims(Wi-1)` under the scope partial order. The chain is only sound if each link's signature is over its *predecessor's full claim set plus the restriction*, not over the successor's claim set alone. When the issuer signs only the post-attenuation set, the invariant degrades to "leaf verifies in isolation," which is strictly weaker. The gap is exactly the unauthenticated `parent_id` pointer. The condition is violated whenever the issuance code path does: ``` signed_payload = serialize(narrowed_claims) # WRONG: parent not covered ``` instead of: ``` signed_payload = serialize({parent: hash_and_claims(W_parent), delta: attenuation_delta, result: narrowed_claims}) ``` The first form is the natural thing to write — it matches how you'd sign any standalone credential — and it is the boundary where AAIF delegation silently stops being a chain and becomes a set of independent signed claims that happen to point at each other. ## Decision Boundary The boundary between "safe delegation" and "unlinkable delegation" is not the scope check and not the signature check. It is **whether the verifier is required to re-resolve the parent at verification time, and whether the signature forces it to.** - If the signature covers `(parent_claims, delta)`, a verifier *cannot* accept the leaf without the parent's actual claim set in hand — the signed payload won't reconstruct otherwise. Re-resolution is forced by the crypto. - If the signature covers only `narrowed_claims`, the verifier *can* accept the leaf with a cached or asserted parent. Re-resolution becomes optional, and any cache-staleness or `parent_id`-trusting fast path becomes a widening oracle. The decision the architect must make explicit: **is the parent claim set part of the signed preimage, or a hint?** If it is a hint, the credential is a bearer token with a comment, not a delegated warrant, and the AAIF chain guarantees do not apply to it. ## Operational Effect Downstream consequences observed once the invariant is broken: 1. **Widening under key compromise.** Anyone who can invoke `O`'s delegation key can mint arbitrarily wide sub-warrants with a valid signature and a truthful-looking `parent_id`. The subset check passes iff the verifier re-reads the live parent; fast paths and caches do not. 2. **Audit non-reconstructability.** Post-hoc auditors cannot prove derivation from the signed artifact alone. They must replay the issuer's internal state, which is usually gone by the time the audit runs — the very cold-start amnesia problem, now applied to authorization lineage. 3. **Budget and scope drift across the chain.** Because `delta` is unsigned, a leaf can claim a *narrower* scope than it actually exercises at the tool gateway (which trusts the leaf's claims field). The declared attenuation and the enforced attenuation are two different objects. 4. **Revocation does not propagate.** Revoking `W0` is supposed to invalidate all descendants. With an unlinkable chain, revocation lists keyed on `parent_id` can be bypassed by minting a leaf whose `parent_id` points at a *different, still-live* ancestor — the pointer is asserted, not signed. The guardrail is a single structural rule: **the signed preimage of a delegated warrant must include the parent warrant's hash *and* its claim set, and the verifier must reconstruct that preimage from a freshly resolved parent or fail closed.** The code below encodes that invariant and raises when a proposed sub-warrant's signature does not cover its parent. ```python import hashlib import json class UnlinkableDelegationError(RuntimeError): """Raised when a delegated AAIF warrant's signature does not cover its parent claim set.""" pass def _canonical(obj) -> bytes: return json.dumps(obj, sort_keys=True, separators=(",", ":")).encode() def _sign(payload: bytes, key: bytes) -> str: # Stand-in for the AAIF delegation signature primitive (e.g., Ed25519 over SHA-256 preimage). return hashlib.sha256(key + payload).hexdigest() def mint_delegated_warrant(parent_claims: dict, parent_hash: str, narrowed_claims: dict, delegation_key: bytes) -> dict: """Mint a sub-warrant whose signature binds (parent_claims, delta, narrowed_claims).""" if not _is_subset(narrowed_claims, parent_claims): raise UnlinkableDelegationError( f"narrowed scope {narrowed_claims} is not a subset of parent {parent_claims}" ) delta = _attenuation_delta(parent_claims, narrowed_claims) preimage = { "parent_hash": parent_hash, "parent_claims": parent_claims, # MUST be signed; this is the invariant "delta": delta, "result": narrowed_claims, } return { "claims": narrowed_claims, "parent_hash": parent_hash, "signature": _sign(_canonical(preimage), delegation_key), } def verify_delegated_warrant(warrant: dict, resolve_parent, issuer_key: bytes) -> bool: """Verify a sub-warrant; fail closed if the parent cannot be freshly resolved.""" parent_hash = warrant["parent_hash"] parent_claims = resolve_parent(parent_hash) if parent_claims is None: # No cached fallback: an unresolvable parent is an unverifiable leaf. raise UnlinkableDelegationError( f"parent {parent_hash} could not be resolved; refusing to trust leaf claims" ) delta = _attenuation_delta(parent_claims, warrant["claims"]) preimage = { "parent_hash": parent_hash, "parent_claims": parent_claims, "delta": delta, "result": warrant["claims"], } expected = _sign(_canonical(preimage), issuer_key) if expected != warrant["signature"]: # Covers both forgery and the "signed only narrowed_claims" bug: # a leaf signed without parent_claims will not reproduce this preimage. raise UnlinkableDelegationError( "signature does not cover (parent_claims, delta); warrant is unlinkable" ) return True def _is_subset(child: dict, parent: dict) -> bool: for k, v in child.items(): if k not in parent: return False if isinstance(v, list): if not set(v).issubset(set(parent[k])): return False elif isinstance(v, (int, float)) and isinstance(parent[k], (int, float)): if v > parent[k]: return False elif v != parent[k]: return False return True def _attenuation_delta(parent: dict, child: dict) -> dict: return {k: child[k] for k in child if parent.get(k) != child[k]} ```