# What structural signals indicate a broken AAIF credential chain at the delegation-depth boundary **Date of Record:** 2026 November 26 **Scope:** Applies to agent-to-agent (A2A) systems using AAIF-style verifiable credentials where an orchestrator agent issues sub-credentials to worker agents that themselves may re-delegate. Does not apply to single-hop credential issuance or to credentials anchored directly to a human principal with no intermediate agent. ## Core Distinction The failure mode is not signature forgery or a revoked key. It is **delegation-depth attenuation drift**: the structural signal that a credential chain is valid is the same signal that a chain has been *over-extended*. A verifiable credential (VC) chain that is cryptographically intact—every signature verifies, every `issuer` matches the prior `subject`, every `proof` is well-formed—can still be operationally invalid because the *authority* it carries has been attenuated below the level required by the leaf operation, or conversely because depth was never bounded and the leaf silently inherited more authority than the root intended. The non-obvious part: a verifier checking only the cryptographic chain reports **valid**. The break lives one layer up, in the semantic relationship between `credentialSubject.authority` scopes across hops, which no signature covers. ## What Was Observed An orchestrator `A0` holds a root credential with scopes `{read:repo, write:repo, deploy:staging, deploy:prod}` and a hard `maxDelegationDepth: 3`. It spawns `A1` (planner) with a narrowed scope `{read:repo, deploy:staging}` and `maxDelegationDepth: 2`. `A1` spawns `A2` (executor) with `{read:repo}` and `maxDelegationDepth: 1`. `A2`, mid-task, decides it needs to verify a deploy artifact and issues `A3` a credential with scope `{deploy:staging}`. The chain `A0 → A1 → A2 → A3` is depth 3. Every signature verifies. But: 1. `A2` never held `deploy:staging`. Its own credential scoped it to `{read:repo}`. The scope `A3` received is a **superset** of its issuer's scope—an attenuation violation that no signature detects because the signature only attests *who* issued, not *whether the issuer was entitled to*. 2. `A2`'s `maxDelegationDepth: 1` was interpreted by its runtime as "I may delegate once," producing `A3` at chain depth 3, which exceeds `A0`'s root bound of 3 only if counted from 0. Off-by-one in depth accounting is the trigger. The verifier for `A3`'s operation checked: signature valid ✓, issuer trusted ✓, not expired ✓, scope contains `deploy:staging` ✓. It admitted the operation. The structural signal that should have caught this—**a scope in a child credential not present in the parent's scope set**—was never computed because the verifier treated scope as a flat claim, not a lattice-ordered subset relation. ## Condition of Validity A credential chain is operationally valid only if, for every adjacent pair `(parent, child)`: - `child.credentialSubject.scope ⊆ parent.credentialSubject.scope` (monotone attenuation), evaluated as a set inclusion over normalized scope atoms, not string prefix matching; - `child.depth = parent.depth + 1` and `child.depth ≤ root.maxDelegationDepth`, with depth counted from the root as 0 and the bound treated as inclusive of the leaf; - `child.credentialSubject.scope` is non-empty after intersection with every ancestor's scope (transitive attenuation, not just adjacent). The cryptographic chain proves *provenance*. Only the scope-lattice check proves *authority conservation*. These are independent invariants and a verifier that checks one is not checking the other. ## Decision Boundary The boundary is crossed the moment a verifier treats "signature chain intact" as sufficient for admission. Below the boundary (single-hop, human-anchored), provenance and authority coincide and the shortcut is safe. Above the boundary—any chain of length ≥ 2 where an intermediate agent both *holds* and *issues* credentials—the two diverge and the verifier must compute the scope lattice explicitly. A second boundary: when `maxDelegationDepth` is enforced only at issuance (the issuer refuses to mint deeper) but not at verification (the verifier accepts any depth), a compromised or buggy intermediate can mint a chain the root never sanctioned. Enforcement must be **at verification**, recomputed from the chain, never trusted from the credential's self-declared depth field. ## Operational Effect Without the lattice check, an agent that has been attenuated down to `read:repo` can launder authority back up by issuing a child credential claiming broader scope, and the leaf operation succeeds. The blast radius is bounded only by what the *root* originally held, not by what the intermediate was granted—so a planner restricted to staging can cause a production deploy if any descendant claims `deploy:prod` and the verifier doesn't intersect against the full ancestor chain. The guardrail is a verifier-side transitive scope intersection plus verification-time depth recomputation; the issuer-side checks are necessary but not sufficient. ```python from dataclasses import dataclass class CredentialChainViolation(RuntimeError): """Raised when an AAIF credential chain is cryptographically intact but violates scope attenuation or delegation-depth bounds.""" @dataclass class Credential: issuer: str subject: str scopes: frozenset[str] declared_depth: int max_delegation_depth: int signature_valid: bool def verify_chain(chain: list[Credential]) -> None: # Cryptographic provenance check (necessary, not sufficient). for parent, child in zip(chain, chain[1:]): if not (parent.signature_valid and child.signature_valid): raise CredentialChainViolation("signature invalid in chain") if child.issuer != parent.subject: raise CredentialChainViolation( f"issuer {child.issuer} does not match parent subject {parent.subject}" ) root = chain[0] if root.declared_depth != 0: raise CredentialChainViolation("root credential must declare depth 0") # Recompute depth from the chain; never trust declared_depth alone. effective_scopes = set(root.scopes) for idx, cred in enumerate(chain[1:], start=1): if idx > root.max_delegation_depth: raise CredentialChainViolation( f"chain depth {idx} exceeds root max_delegation_depth " f"{root.max_delegation_depth}" ) if cred.declared_depth != idx: raise CredentialChainViolation( f"declared depth {cred.declared_depth} != recomputed depth {idx}" ) # Transitive attenuation: child scopes must be subset of the # intersection of all ancestor scopes, not just the immediate parent. if not cred.scopes.issubset(effective_scopes): extra = cred.scopes - effective_scopes raise CredentialChainViolation( f"scope escalation at depth {idx}: {sorted(extra)} not held by ancestors" ) effective_scopes &= cred.scopes if not effective_scopes: raise CredentialChainViolation( f"authority fully attenuated at depth {idx}; leaf operation unbacked" ) ```