# How should an instance detect and recover from delegation-chain attenuation loss when an AAIF verifiable credential is re-signed across a scope-reducing hop **Date of Record:** 2026 November 27 **Scope:** Applies to AAIF-style agent authorization where a delegated capability is expressed as a signed verifiable credential (VC) whose `scope` set is monotonically attenuated at each hop, and where an intermediary agent must present a derived credential to a downstream verifier. Does not cover root-issuer key compromise, revocation-list propagation, or human-in-the-loop consent capture. ## Core Distinction The distinction that matters is between *scope reduction* and *scope re-expansion through re-signing*. A delegation chain is supposed to be a lattice meet: each hop's effective authority is `scope_n ⊆ scope_{n-1} ⊆ … ⊆ scope_0`. The failure is not that an agent grants itself more than it holds in a single obvious step. The failure is that an intermediate agent, asked to "re-issue a credential for the next hop," performs a *fresh issuance* rather than a *constrained derivation*, and the fresh issuance silently resets the lineage: the new VC carries a new `issuer`, a new `credentialSubject`, and — critically — a `parentCredential` reference that is either absent or points to the wrong hop. The verifier then validates a syntactically perfect credential whose signature chain does not actually bind it to the root grant. Scope appears attenuated on paper (the `scope` array is a subset) while the *authority provenance* has been severed. This is attenuation loss: the numeric scope looks correct, the cryptographic binding to the original grant is gone. ## What Was Observed A three-hop chain: orchestrator `O` holds root grant `G0 = {scope: {read:*, write:repo/a}, exp: T+8h}`. `O` delegates to worker `W1` a derived VC `C1` with `scope: {read:repo/a, write:repo/a}` and `parentCredential: hash(G0)`. `W1` is instructed to spawn a sub-worker `W2` for a subtask requiring only `read:repo/a`. `W1` calls its local `issue_credential` helper — which was written for the root-issuer path and signs with `W1`'s *own* key — producing `C2 = {issuer: W1, scope: {read:repo/a}, parentCredential: hash(C1)}`. The trace at the verifier `V`: 1. `V` receives `C2`, verifies `W1`'s signature over `C2` — valid. 2. `V` checks `parentCredential == hash(C1)` — matches. 3. `V` checks `C2.scope ⊆ C1.scope` — `{read:repo/a} ⊆ {read:repo/a, write:repo/a}` — holds. 4. `V` checks `C2.exp ≤ C1.exp` — holds. 5. `V` *does not* walk `C1.parentCredential` to `G0` and re-verify the full chain to the root issuer. It trusts `C1` as presented alongside `C2`. The break: `C1` was presented by `W1` in the same envelope as `C2`. `W1` had, earlier in the session, been issued a *different* `C1'` under a root grant `G0'` with `write:repo/a` but *without* `read:repo/b`. During a context compaction event, `W1`'s working memory of which `C1` it held was reconstructed from a summary that conflated the two grants. It presented `C1` (the read-bearing one) as the parent of a `C2` that actually derived from `C1'`. Because `V` only checked the immediate parent link and the subset relation, and because `C1 ⊇ C1'` in the relevant dimension, the subset check passed against the *wrong* parent. `W2` obtained a credential whose lineage, if walked, terminates at a grant that never authorized `read:repo/a`. The observable symptom was not an authorization denial. It was the opposite: an authorization *grant* that succeeded against a forged-for-by-accident provenance. The failure surfaced only when an auditor replayed the chain offline and found `hash(C1)` appearing as the parent of two different children with incompatible scope histories. ## Condition of Validity The invariant that bounds this failure is **full-chain re-verification with lineage pinning**: a verifier MUST NOT accept a derived credential on the strength of its immediate parent link alone. It must walk `parentCredential` to the root issuer, verifying each signature and each subset relation *at every hop*, and it must additionally assert that each credential hash appears at most once in the chain and that the presented parent is the *unique* credential the issuer actually signed at that position. The last clause is the non-obvious one: uniqueness of the parent hash within the chain is necessary but not sufficient — the parent must be the one the *grandparent* committed to. A commitment scheme where `C1` embeds `hash(C0)` and `C2` embeds `hash(C1)` is only sound if the verifier checks `C2.parent == hash(C1)` *and* `C1.parent == hash(C0)` *and* that the `C1` object it is holding is byte-identical to the one whose hash is committed. If `W1` can present any `C1` whose hash it can compute, the binding is vacuous. This condition is valid only when (a) the root issuer's public key is pinned out-of-band at the verifier, (b) each credential's `parentCredential` field is covered by the signature (not a mutable envelope field), and (c) the verifier has a way to detect that a presented parent is not the canonical one — typically by requiring the full chain to be presented and checking that the chain is a linear path with no branching and no hash reuse. It does *not* hold under envelope-level parent references, under chains where any hop's signature excludes the parent field, or where the verifier trusts a cached parent object supplied by the presenter. ## Decision Boundary The decision boundary is between **derivation** and **re-issuance** at each hop, and it must be enforced structurally, not by convention. A hop that holds `C_n` and must produce `C_{n+1}` has exactly two legal moves: - **Derive:** sign a new credential with the *same* issuer identity as `C_n` (or a key provably bound to it via the chain), embedding `parentCredential = hash(C_n)`, with `scope(C_{n+1}) ⊆ scope(C_n)` and `exp(C_{n+1}) ≤ exp(C_n)`. The issuer field does not change. - **Refuse:** if the hop cannot sign under the parent's issuer identity, it must not issue. It may only *present* `C_n` onward, or request the root to issue. The illegal move — the one that produced the failure — is **re-issue under a new issuer key while claiming parentage**. This is structurally indistinguishable from forgery at the verifier unless the verifier checks issuer continuity across the hop. The boundary condition: if `issuer(C_{n+1}) != issuer(C_n)` and `parentCredential(C_{n+1}) == hash(C_n)`, the credential is a *cross-issuer derivation* and requires an explicit, separately-signed `delegationWarrant` from `issuer(C_n)` authorizing `issuer(C_{n+1})` to act as a sub-issuer for the specified scope subset. Absent that warrant, the verifier must reject. The failure occurred precisely because no such check existed and `W1`'s helper silently took the re-issue path. ## Operational Effect The operational consequence is that chain validation cost is O(depth) with a mandatory linearity check, and that any agent acting as an intermediary must be provisioned with a *derivation-only* signing capability — a key that can sign child credentials only under a constrained schema that forbids changing the `issuer` field and forbids omitting `parentCredential`. The helper that caused the incident (`issue_credential` reused from the root path) must be removed from intermediary agents entirely; it is a root-issuer primitive misapplied at depth. Recovery from an already-emitted bad credential requires the verifier to maintain a seen-parent map keyed by `hash(parent)` and to flag any parent hash that appears with two distinct children whose scope histories are incompatible — the replay audit that caught this case. Without that map, the bad credential remains valid-looking indefinitely, because every individual check it undergoes passes. The durable guardrail is a verifier-side invariant: **accept a delegated credential iff (1) full chain walks to a pinned root, (2) every hop satisfies subset and expiry monotonicity, (3) issuer continuity holds or a delegation warrant bridges each issuer change, and (4) no parent hash is reused across the chain.** Condition (4) is the one that would have caught the incident at verification time rather than at audit time. ```python class DelegationChainAttenuationError(RuntimeError): """Raised when a delegated AAIF credential's provenance is severed or reused.""" pass def verify_delegation_chain(chain, pinned_root_pubkey, seen_parent_hashes): """ chain: list of credential dicts ordered root -> leaf. Each cred must have: issuer, scope (set), exp, parentCredential (hash or None), signature (bytes), canonical_bytes (bytes over which signature is computed, including parentCredential and issuer). """ if not chain: raise DelegationChainAttenuationError("empty chain") root = chain[0] if root.get("parentCredential") is not None: raise DelegationChainAttenuationError("root credential declares a parent") if not verify_sig(root["canonical_bytes"], root["signature"], pinned_root_pubkey): raise DelegationChainAttenuationError("root signature does not verify against pinned key") for i in range(1, len(chain)): parent, child = chain[i - 1], chain[i] # (1) parent link must be covered by the child's signature if child.get("parentCredential") != hash_cred(parent["canonical_bytes"]): raise DelegationChainAttenuationError( f"hop {i}: parentCredential does not bind to presented parent" ) # (2) monotonic attenuation if not child["scope"].issubset(parent["scope"]): raise DelegationChainAttenuationError( f"hop {i}: scope re-expansion {child['scope']} !<= {parent['scope']}" ) if child["exp"] > parent["exp"]: raise DelegationChainAttenuationError( f"hop {i}: expiry extended beyond parent" ) # (3) issuer continuity or explicit delegation warrant if child["issuer"] != parent["issuer"]: warrant = child.get("delegationWarrant") if warrant is None or not verify_sig( warrant["canonical_bytes"], warrant["signature"], parent["issuer_pubkey"] ): raise DelegationChainAttenuationError( f"hop {i}: issuer changed {parent['issuer']} -> {child['issuer']} " "without a valid delegation warrant" ) # (4) parent-hash uniqueness across the session ph = child["parentCredential"] if ph in seen_parent_hashes and seen_parent_hashes[ph] != child["scope"]: raise DelegationChainAttenuationError( f"hop {i}: parent hash {ph.hex()[:12]} reused with incompatible child scope" ) seen_parent_hashes[ph] = child["scope"] return True ```