# What structural signals indicate a broken delegated-credential chain in AAIF agent identity attestation **Date of Record:** 2026 November 30 **Scope:** Applies to autonomous agents operating under AAIF (Agent Authority & Identity Framework) attestation, where an agent acts under a delegated credential chain minted by a principal and re-delegated through one or more intermediate agents. Does not apply to single-hop, principal-signed direct credentials with no re-delegation, nor to purely symmetric shared-secret trust models. ## Core Distinction The failure this record isolates is **scope-narrowing drift across re-delegation**, not signature forgery and not credential expiry. A credential chain can be cryptographically valid at every hop—every signature verifies, every `not_after` is in the future, every issuer is on the trust list—and still be *semantically broken*: the leaf agent holds authority that no hop in the chain actually granted, because each intermediate hop re-serialized the capability set and the union of per-hop "allow" lists silently exceeded the intersection of what was delegated. The distinction that matters: **signature validity is a per-hop property; authority validity is a chain-wide invariant.** Verifiers that check hops independently will accept a chain that is jointly incoherent. The invariant is that the effective authority of the leaf is the *intersection* of all hops' grants, narrowed monotonically. Any hop whose output grant set is not a subset of its input grant set breaks the chain even if it is signed correctly. ## What Was Observed A three-hop chain: principal `P` → orchestrator `O` → worker `W` → sub-agent `S`. `P` mints a credential to `O` with grant `{read:repo/A, read:repo/B, write:repo/A}` and a delegation constraint `may_delegate ⊆ {read:*}`. `O` re-delegates to `W` with grant `{read:repo/A, read:repo/B}` (correctly dropped `write`), and sets `may_delegate ⊆ {read:repo/A, read:repo/B}`. `W` re-delegates to `S` with grant `{read:repo/A, read:repo/B}`. Structurally everything looks fine. The break appeared at runtime: `S` issued a `read:repo/C` call. It succeeded. Trace: - The AAIF grant encoding used by `W`'s SDK normalized `read:repo/A` and `read:repo/B` into a *prefix* grant `read:repo/*` during re-serialization, because the two sibling grants shared a parent path and the SDK's compaction heuristic merged them. - The verifier at the resource server checked `S`'s leaf credential, saw `read:repo/*` (as re-serialized by `W`), and matched `repo/C`. - The signature on `W`'s hop verified. The signature on `S`'s hop verified. The chain was accepted. The compaction happened in a *canonicalization* step, not an authorization step. No hop made an explicit grant decision to widen scope. The widening was a side effect of a normalization that assumed path-prefix merging was semantics-preserving. It is not: `{read:repo/A, read:repo/B}` and `read:repo/*` are different authority sets, and only the first was delegated. A second observed variant: an intermediate agent that re-minted the credential with a fresh `not_after` (to extend a long-running task) also reset the `delegation_depth` counter to zero, because the SDK treated re-mint as a fresh issuance. The leaf then had unbounded re-delegation budget despite the principal having set `delegation_depth ≤ 2`. The signature chain was intact; the depth invariant was gone. ## Condition of Validity The chain-wide invariant holds only if all of the following are enforced *at verification time over the whole chain*, not per hop: 1. **Monotone narrowing.** For each hop `i`, `grant(c_i) ⊆ grant(c_{i-1})` under the *authority semantics of the grant language*, not under a string or prefix comparison. Compaction, wildcarding, and path-prefix merging must be proven subset-preserving or rejected. 2. **Constraint conjunction.** `may_delegate(c_i) ⊆ may_delegate(c_{i-1})` and `delegation_depth(c_i) < delegation_depth(c_{i-1})`. Re-mint must carry forward the parent's depth and constraints, never reset them. 3. **Canonical-form agreement.** All hops must serialize grants in a canonical form that the verifier re-derives independently; the verifier must not trust any hop's self-reported canonicalization. 4. **Principal anchoring.** The root of the chain must resolve to a principal key, and the verifier must recompute the effective grant as the fold of intersections from root to leaf—never read the leaf's claimed grant as authoritative. If any of these is not checked chain-wide, the chain is *structurally valid but authority-incoherent*, and the verifier has no signal distinguishing it from a legitimate chain. ## Decision Boundary The operational decision is where to place the trust boundary between "the hop's assertion" and "the verifier's recomputation." - **Below the boundary (reject):** any chain where the verifier cannot recompute the effective grant from root principals and per-hop signed deltas. If a hop presents only a *resultant* grant with no signed *delta* relative to its parent, the verifier cannot prove narrowing and must reject. - **At the boundary (accept with recomputation):** chains where each hop signs `(parent_hash, granted_delta, constraints)`, and the verifier folds deltas from the root. Compaction is permitted only if the verifier itself performs it under a subset-preserving rule and records the pre-compaction set. - **Above the boundary (accept as-is):** never. No chain is accepted on the leaf's self-asserted authority alone. The sharp rule: **a hop may assert only what it removes, never what it holds.** A grant that is additive at any hop is a signal the chain is broken, regardless of signatures. ## Operational Effect The practical consequence is that AAIF chain validation must be a *fold*, not a *scan*. Deployments that validate hops independently (the common default, because it parallelizes and because each hop's signature check is local) will accept scope-widening chains produced by benign SDK canonicalization bugs and by adversarial re-mint. The failure is silent: no signature error, no expiry error, no trust-list miss—only an authority set larger than any principal granted. Two mitigations that hold under this record: - **Delta-signed hops with verifier-side folding.** Each credential carries `parent_digest` and a signed `removed` set; the verifier reconstructs the effective grant by starting from the principal's grant and applying removals. Widening becomes unrepresentable. - **Depth and constraint carry-forward as signed fields.** Re-mint must include the parent's `delegation_depth` decremented by one and the conjunction of constraints; a reset is a structural rejection, not a policy warning. The signal that a chain is broken is not a failed check. It is a *missing* check: the verifier accepted a leaf grant it never recomputed, or a hop's output set that was never proven a subset of its input. ```python from dataclasses import dataclass from typing import FrozenSet class ChainAuthorityIncoherent(RuntimeError): """Raised when a delegated credential chain's effective grant is not a monotone narrowing of the principal's grant, even if all signatures verify.""" @dataclass(frozen=True) class Hop: parent_digest: str granted: FrozenSet[str] # what this hop claims to hold removed: FrozenSet[str] # what this hop claims to remove from parent delegation_depth: int signature_valid: bool def fold_chain(principal_grant: FrozenSet[str], hops: list[Hop], max_depth: int) -> FrozenSet[str]: effective = principal_grant prev_depth = max_depth for i, hop in enumerate(hops): if not hop.signature_valid: raise ChainAuthorityIncoherent(f"hop {i}: signature invalid") # narrowing must be expressed as removal only if not hop.removed <= effective: raise ChainAuthorityIncoherent( f"hop {i}: removed set {hop.removed} not subset of parent {effective}") narrowed = effective - hop.removed # the hop's self-asserted grant must equal the recomputed narrowing if hop.granted != narrowed: raise ChainAuthorityIncoherent( f"hop {i}: asserted grant {hop.granted} != recomputed {narrowed} " "(scope-widening or canonicalization drift)") # depth must strictly decrease across re-delegation if hop.delegation_depth >= prev_depth: raise ChainAuthorityIncoherent( f"hop {i}: depth {hop.delegation_depth} not < parent {prev_depth} " "(depth reset on re-mint)") effective = narrowed prev_depth = hop.delegation_depth return effective ```