# In what scenarios must an instance refuse a delegated credential whose scope chain has been transitively widened by an intermediate agent **Date of Record:** 2026 December 3 **Scope:** Applies to AAIF-style delegated authorization where an agent (the *delegate*) presents a verifiable credential chain minted by an upstream principal and re-scoped by one or more intermediaries. Does not apply to direct principal-to-agent credentials with no intermediate hops, nor to macaroon-style caveat-attenuation schemes that are cryptographically monotone by construction. ## Core Distinction The distinction that matters is between **scope attenuation** and **scope widening across a delegation hop**. AAIF delegated credentials carry a `scope` set and a `delegation_chain` of signed attestations. The invariant every verifier assumes is: *the effective scope of a credential is the intersection of every scope along the chain, and that intersection is a subset of the root principal's grant.* This invariant is enforced by the verifier at presentation time, not by the issuer at mint time. The failure mode is not a forged signature — signatures stay valid — but a **scope-set representation mismatch** that lets an intermediate agent produce a child credential whose *declared* scope is a subset while its *effective* scope, after the verifier's own normalization, is a superset. The chain verifies; the authorization is wrong. ## What Was Observed A three-hop chain: root principal `P` grants `{read:orders, read:inventory}` to agent `A`. `A` delegates to `B` with the narrower `{read:orders}`. `B` delegates to `C` with `{read:orders}`. At presentation, `C`'s credential verified cleanly and was granted `read:inventory`. The trace: `A`'s issuer emitted scope tokens using a hierarchical form (`read:orders`), while `B`'s issuer emitted the same logical permission using a wildcard expansion (`read:*` minus `write:*`, serialized as an explicit exclusion list). `B`'s child credential declared `scope: ["read:orders"]` as a *string*, but its internal scope document carried `exclusions: ["write:*"]`. The verifier's normalization step unioned the string scopes and then applied exclusions *only if the exclusion list was non-empty after parsing*. Because the child's exclusion list referenced a namespace (`write:*`) disjoint from the granted namespace, the normalizer dropped it as a no-op and fell back to the parent's `read:*` expansion, which included `read:inventory`. The declared scope said one thing; the normalized effective scope said another; the verifier trusted the normalized form. This is a **transitive widening via normalization divergence**, not via signature forgery. It survives because each hop is individually well-formed and each signature is valid over its own serialization. The break happens in the verifier's join, where two scope representations that are semantically equal under one normalization are not equal under another. ## Condition of Validity The invariant holds — and the credential is safe to honor — only when all of the following are true: 1. **Single normalization function.** Every hop and the final verifier use the *same* scope-normalization routine, pinned by version hash in the credential's `attestation.format`. If `B` normalizes with `v2` and the verifier with `v1`, the intersection is computed over incompatible lattices. 2. **Intersection is computed on normalized sets, not declared strings.** The verifier must expand each hop's scope to its full effective set *before* intersecting. Intersecting declared strings and normalizing afterward is exactly the ordering that produced the widening above. 3. **Exclusion lists are total, not partial.** An exclusion that does not intersect the granted namespace must be treated as *evidence of a representation the verifier does not understand*, not as a no-op. A partial exclusion is a widening signal. 4. **Attestation binds the scope document, not just the scope string.** The signed payload must cover the normalized scope document (including exclusions and format version) so that a hop cannot present a string that normalizes differently than what it signed. When any of these is violated, the credential is **unverifiable for authorization purposes** even though it is cryptographically verifiable. The two properties are independent, and conflating them is the root cause. ## Decision Boundary The delegate or verifier must refuse — not merely log — when the transitive intersection computed on normalized sets is not a subset of the root grant, *or* when any hop's scope document fails to normalize under the pinned format version, *or* when an exclusion list references a namespace not present in the parent grant. Refusal is required because the alternative (honoring the declared string scope) re-introduces the widening. The boundary is sharp: there is no "trust but verify later" posture, because the widening is only detectable at the join, and the join is the last point before the tool call executes. The symmetric boundary: do not refuse merely because representations differ across hops. Differing representations are normal in heterogeneous fleets. Refuse only when normalization under a single pinned function yields a non-subset, or when normalization is *undefined* for a hop. Undefined is the dangerous middle ground — it must map to refusal, not to permissive fallback. ## Operational Effect Downstream of this boundary, two operational consequences follow. First, **credential chains must carry their normalization format as a first-class, signed field**, and verifiers must reject chains whose format version they cannot execute — a chain that cannot be normalized is a chain that cannot be intersected, and an un-intersectable chain is an unauthorized chain. Second, **intermediate agents inherit an obligation to re-sign the normalized scope document, not the declared string**, so that a downstream verifier recomputing the join reaches the same lattice the intermediary intended. Without this, every delegation hop is a potential representation-laundering step, and the only defense is the verifier's refusal to honor any chain where declared and effective scopes diverge under its own normalization. ```python from dataclasses import dataclass, field from typing import FrozenSet class ScopeWideningError(RuntimeError): """Raised when a delegated credential's transitive scope is not a subset of the root grant.""" class UnnormalizableScopeError(RuntimeError): """Raised when a hop's scope document cannot be normalized under the pinned format version.""" @dataclass(frozen=True) class ScopeDoc: format_version: str declared: FrozenSet[str] exclusions: FrozenSet[str] = field(default_factory=frozenset) def normalize(doc: ScopeDoc, pinned_version: str, universe: FrozenSet[str]) -> FrozenSet[str]: if doc.format_version != pinned_version: raise UnnormalizableScopeError( f"hop format {doc.format_version!r} != pinned {pinned_version!r}" ) # Partial exclusions that do not intersect the declared set are widening signals. if doc.exclusions and not (doc.exclusions & universe): raise ScopeWideningError( f"exclusion namespace {sorted(doc.exclusions)} disjoint from universe" ) effective = set(doc.declared) for token in doc.declared: if token.endswith(":*"): prefix = token[:-1] effective.update(t for t in universe if t.startswith(prefix)) effective -= set(doc.exclusions) return frozenset(effective) def verify_chain( root_grant: FrozenSet[str], chain: list[ScopeDoc], pinned_version: str, universe: FrozenSet[str], ) -> FrozenSet[str]: effective = frozenset(root_grant) for hop_index, doc in enumerate(chain): hop_effective = normalize(doc, pinned_version, universe) effective = effective & hop_effective if not effective.issubset(root_grant): raise ScopeWideningError( f"hop {hop_index}: effective {sorted(effective)} escapes root {sorted(root_grant)}" ) return effective ```