# Why does an instance accept a delegated AAIF credential whose delegation chain verifies cryptographically but whose attenuation scope silently widens across a re-issued DID document **Date of Record:** 2026 December 3 **Scope:** Applies to agent-to-agent authorization flows where a verifier validates a delegation chain of AAIF/DID-anchored verifiable credentials by resolving each issuer's DID document at verification time, rather than pinning the document version captured at issuance. Does not apply to single-hop bearer credentials with embedded public keys, nor to chains where the root DID document is immutably pinned by hash in the credential itself. ## Core Distinction The failure is not signature forgery and not DID resolution failure. It is a **time-of-verification scope reconstruction** problem. A delegation credential `C` issued by agent `A` to agent `B` carries a `credentialSubject` attenuation — the set of capabilities `B` may exercise on `A`'s behalf. That attenuation is only meaningful relative to the **authorization scope of `A` itself**, which is declared not inside `C` but inside `A`'s DID document (its `capabilityInvocation` / scope assertion). When a verifier checks `C`, it resolves `A`'s DID document *now* and reads the current scope. If `A`'s DID document was rotated between issuance and verification — a routine key-rotation event that also re-declares scope — the verifier silently reconstructs `C`'s effective scope against a *different* parent scope than the one the issuer reasoned about. The cryptographic chain remains valid end to end. Every signature verifies. Every `proofPurpose` matches. The chain is *sound* and yet *unsound in meaning*: an attenuation that was a strict subset at issuance can become a superset at verification, because attenuation is expressed as a delta against a parent that moved. This is the boundary: **delegation chain validity is a property of a (chain, parent-scope-snapshot) pair, not of the chain alone**, and most verifiers treat it as the latter. ## What Was Observed A three-hop chain: root orchestrator `R` → planner `P` → executor `E`. `R` holds scope `{fs:read:/data, fs:write:/data/out, net:egress:api.internal}`. `R` issues `P` a credential attenuating to `{fs:read:/data, fs:write:/data/out}` — dropping egress. `P` issues `E` a credential attenuating further to `{fs:read:/data}` — dropping write. At issuance, `E`'s effective scope is the intersection down the chain: `{fs:read:/data}`. Correct. At T+40min, `R`'s key is rotated. The new DID document re-declares `R`'s scope, and during the rotation an operator *widened* `R`'s scope to include `fs:write:/data/out/staging` and — critically — restructured the scope vocabulary so that `fs:write:/data/out` now denotes a *prefix* grant rather than the exact path it denoted before. The DID document's `alsoKnownAs` and service endpoints are unchanged; only the scope assertion and the verification method rotated. `E` presents its credential to a resource server. The verifier resolves `R`'s DID document, gets the *new* scope, resolves `P`'s DID document (unchanged), and recomputes the chain intersection. Because `P`'s attenuation was recorded as a *relative* delta ("everything `R` grants under `fs:write:/data/out` minus egress") rather than an absolute set, the re-interpretation under the new prefix semantics yields `E` effective scope `{fs:read:/data, fs:write:/data/out/staging}`. `E` never requested write. `P` never intended to grant it. The signature chain is intact. The verifier authorizes the write. The signal that surfaced it was not an auth failure — it was an *audit replay discrepancy*: a post-hoc replay of the same credential against the historical DID document produced `{fs:read:/data}`, while live verification produced the wider set. The two verifiers disagreed by 40 minutes of wall-clock and one key rotation. ## Condition of Validity The invariant that makes delegation chains safe is: > For every credential `C_i` in a chain, the effective scope of `C_i` MUST be computed as `scope(C_i) = scope(C_{i-1}) ∩ attenuation(C_i)`, where `scope(C_{i-1})` is the parent scope **as it existed at the issuance time of `C_i`**, identified by a content-addressed reference, not by DID resolution at verification time. This holds only if one of two conditions is met: 1. **Pinned parent**: each credential embeds a hash (e.g. `parentScopeDigest`) of the parent DID document's scope assertion as of issuance, and the verifier rejects if the resolved document's scope digest differs. Rotation then forces re-issuance rather than silent re-interpretation. 2. **Absolute attenuation**: attenuations are recorded as absolute capability sets, never as relative deltas ("everything the parent grants minus X"). Absolute sets are rotation-invariant because they don't reference the parent's vocabulary. The failure above violates both. Most DID-based agent passport schemes violate condition 2 by default, because expressing attenuation as a delta is more compact and survives parent-scope growth "gracefully" — which is exactly the pathology. ## Decision Boundary The verifier must draw a hard line between two questions that look identical: - *Is this chain cryptographically sound?* — answerable from signatures and current DID documents. - *Does this chain authorize this action?* — answerable **only** from the chain plus the parent-scope snapshot each link was issued against. When a DID document's scope assertion has changed since a downstream credential was issued, the verifier is at a decision boundary: it may either (a) **fail closed** and require re-issuance of the downstream chain, or (b) **reconstruct against the pinned historical document** if and only if the credential carries a `parentScopeDigest` matching it. It may never (c) resolve the current document and intersect against that. Option (c) is the silent-widening path. The boundary condition is detectable: `resolved_scope_digest != credential.parent_scope_digest` is a rotation-crossing event, and crossing it without a pin is the unsafe branch. Note the asymmetry that makes this non-obvious: key rotation is a *security-positive* event, and verifiers are trained to accept rotated keys as authoritative. The same rotation that correctly invalidates old *signatures* silently re-scopes old *authorizations*. A verifier that treats "DID document resolves and key is current" as sufficient has conflated key freshness with scope stability. ## Operational Effect Downstream, the widened scope propagates as if legitimately delegated. `E`'s tool calls succeed; audit logs record a valid signature chain; the incident is invisible until a replay against historical state diverges. The blast radius is bounded by the *widest* re-interpretation any rotated ancestor introduces, which is unbounded in principle because scope vocabularies can be restructured arbitrarily during rotation. The guardrail is to make scope reconstruction a function of `(chain, snapshot)` and to treat any digest mismatch as a re-attestation trigger. Concretely: pin `parentScopeDigest` at issuance, verify against the pinned document (fetched from a content-addressed store, not the live resolver), and fail closed on mismatch. This converts a silent widening into an explicit `ScopeDriftError` that forces the orchestrator to re-issue the chain under the new scope — at which point the human or policy layer sees the widened scope and can veto it. The cost is re-issuance churn on every ancestor rotation; the benefit is that delegation meaning is stable across the exact events (rotation, vocabulary change, operator edit) most likely to corrupt it. ```python import hashlib from dataclasses import dataclass class ScopeDriftError(RuntimeError): """Raised when a delegation credential's parent scope no longer matches the scope snapshot it was issued against (rotation-crossing event).""" pass @dataclass(frozen=True) class Credential: issuer: str subject: str attenuation: frozenset # absolute capability set, NOT a delta parent_scope_digest: str # content hash of parent scope at issuance signature_valid: bool = True def scope_digest(scope: frozenset) -> str: return hashlib.sha256("|".join(sorted(scope)).encode()).hexdigest() def verify_chain( chain: list[Credential], resolved_parent_scopes: dict[str, frozenset], ) -> frozenset: """Reconstruct effective scope by intersecting absolute attenuations, refusing to proceed if any link's parent scope has drifted since issuance.""" if not chain: raise ScopeDriftError("empty delegation chain") effective = None for cred in chain: if not cred.signature_valid: raise ScopeDriftError(f"bad signature from {cred.issuer}") current_parent = resolved_parent_scopes.get(cred.issuer) if current_parent is None: raise ScopeDriftError(f"cannot resolve scope for {cred.issuer}") if scope_digest(current_parent) != cred.parent_scope_digest: # Ancestor DID document rotated/re-scoped since this link was issued. # Intersecting against the *current* parent would silently widen. raise ScopeDriftError( f"scope drift at {cred.issuer}: parent digest " f"{cred.parent_scope_digest[:12]} != resolved " f"{scope_digest(current_parent)[:12]}; re-attestation required" ) effective = cred.attenuation if effective is None else (effective & cred.attenuation) return effective def authorize_write(chain, resolved_parent_scopes, path: str) -> bool: scope = verify_chain(chain, resolved_parent_scopes) if f"fs:write:{path}" not in scope: raise ScopeDriftError(f"write to {path} not in effective scope {sorted(scope)}") return True ```