# Where must an instance refuse a delegated credential whose scope was narrowed by a downstream vendor's attestation chain **Date of Record:** 2026 November 25 **Scope:** Applies to any AAIF-compliant agent that receives a delegated credential via a cross-vendor attestation chain and must decide whether to honor, clamp, or reject the effective scope. Does not apply to single-vendor same-issuer chains, nor to bearer tokens without attestation envelopes. ## Core Distinction A delegated credential in AAIF carries two independent scope representations: the **granted scope** (`scope.granted`, the set the issuing principal authorized) and the **attested scope** (`scope.attested`, the subset each intermediary vendor in the chain claims it verified the downstream agent can safely exercise). The interoperability invariant most implementations assume is *monotonic narrowing*: every hop may only intersect, never union, so `effective_scope = granted ∩ attested_1 ∩ attested_2 ∩ … ∩ attested_n`. The failure mode is not that a hop widens scope—that is trivially detectable. It is that a hop **re-attests a scope it did not receive**, because its attestation vocabulary is not a strict superset of the upstream vocabulary. Intersection over non-aligned vocabularies is not narrowing; it is *silent substitution*, and the resulting effective scope can contain permissions the original grant never covered. The distinction that matters operationally: a scope token that fails to intersect is *dropped* (safe), but a scope token that maps to a *different* permission under the downstream vendor's namespace is *retained under the wrong meaning* (unsafe). The chain does not signal which happened. ## What Was Observed A three-vendor chain: principal `P` issues to agent `A1` (vendor V1) a grant containing `fs:read:/data/tenant-42` and `net:egress:internal-only`. `A1` delegates to `A2` (vendor V2). V2's attestation service does not model path-scoped filesystem grants; it models a coarse `storage:read` capability and, during envelope construction, projects `fs:read:/data/tenant-42` → `storage:read` because its schema mapping table treats any `fs:read:*` as evidence for `storage:read`. V2's attested scope is therefore `{storage:read, net:egress:internal-only}`. `A2` delegates to `A3` (vendor V3), whose namespace models `storage:read` as tenant-agnostic read across the storage backend. V3 attests `{storage:read, net:egress:internal-only}` unchanged. At `A3`, the naive intersection over the *string* tokens yields `{storage:read, net:egress:internal-only}` — both hops "agreed." But the effective permission at `A3` is read access to *all* tenants' storage, because the path qualifier `tenant-42` was consumed by V2's projection and never re-emitted. The grant was narrowed in *cardinality* (two tokens to two tokens) while being widened in *authority*. No hop violated monotonic narrowing at the token level; the violation lives in the mapping function, which is not part of the signed envelope. The failure trace is precise: (1) V1 signs `granted` with path qualifier; (2) V2's mapper is lossy and non-injective, produces `attested` without the qualifier, and signs only the *output*, not the mapping; (3) V3 intersects on token identity, sees a match, and passes through; (4) `A3` computes effective scope from token intersection and authorizes a cross-tenant read. The audit log at each hop is internally consistent. Only replaying the *mapping functions*—which are unsigned and vendor-local—reveals the widening. ## Condition of Validity The monotonic-narrowing invariant holds **only if** every hop's attestation vocabulary is a refinement of its upstream vocabulary: every downstream token must denote a subset of exactly one upstream token's denotation, and the mapping must be total on the upstream scope. Formally, for hop `i`, the mapper `m_i` must satisfy `denote(m_i(t)) ⊆ denote(t)` for every upstream token `t`, and `m_i` must be injective on the qualifier space. When a vendor's vocabulary is *coarser* (many-to-one, as V2's `storage:read`) or *orthogonal* (different axes, e.g., time-bounded vs. path-bounded), the refinement condition fails and intersection is unsound. This condition is checkable only if the envelope carries the mapper's *domain and codomain declarations*—i.e., a signed `vocabulary_manifest` per hop stating which upstream tokens it can faithfully represent and which it must refuse. AAIF as commonly deployed signs the attested scope but not the manifest, so the receiver cannot distinguish "V2 faithfully attested a narrowed scope" from "V2 substituted a coarser scope." The invariant is therefore *unverifiable at the receiver* under current envelopes, which means the receiver must not treat token intersection as sufficient. ## Decision Boundary The boundary is: **an instance must refuse to compute effective scope by intersection alone when any hop's vocabulary manifest is absent or declares a codomain that is not a refinement of the upstream codomain.** Refusal means either (a) reject the chain and re-request a grant directly from `P` scoped to `A3`, or (b) clamp to the *intersection of denotations under the strictest upstream qualifier*, which requires the receiver to possess the upstream vocabulary—available only if the full chain of grants is carried, not just the terminal attested scope. Concretely: if the terminal envelope carries only `attested_n` and a chain digest, the receiver **cannot** safely authorize. It must treat any token whose upstream qualifier is unrecoverable as un-attested and drop it. Dropping `storage:read` because the `tenant-42` qualifier cannot be reconstructed is the correct, conservative action; retaining it because "the token matched" is the failure. The boundary is crossed the moment an implementation prefers token equality over denotation containment. ## Operational Effect The operational consequence is a hard rule for AAIF receivers: **effective scope is the intersection of *denotations*, not tokens, and denotations are only computable when the full grant chain plus per-hop vocabulary manifests are present and signed.** Absent that, the receiver must fail closed on any token whose qualifier was consumed upstream. This converts a silent cross-tenant authorization widening into a visible, auditable rejection—at the cost of availability when vendors deploy coarse vocabularies. The trade is correct: a dropped permission produces a retryable denial, while a substituted permission produces an unbounded authority escalation that no per-hop audit log will ever flag, because every hop's local view is consistent. ```python class ScopeSubstitutionError(RuntimeError): """Raised when a hop's attested scope is not a faithful refinement of the upstream grant.""" pass def compute_effective_scope(grant_chain): """ grant_chain: list of hops, each dict with keys: 'granted' : set[str] (upstream tokens this hop received) 'attested' : set[str] (tokens this hop emitted) 'manifest' : dict[str, str] | None (upstream_token -> downstream_token, signed) Returns the set of downstream tokens safe to authorize at the terminal agent. """ effective = set(grant_chain[0]['granted']) for i, hop in enumerate(grant_chain[1:], start=1): attested = hop['attested'] manifest = hop.get('manifest') # No signed manifest: cannot prove refinement. Fail closed on any token # whose qualifier may have been consumed by an unverifiable mapping. if manifest is None: for tok in attested: if ':' in tok and tok.count(':') >= 2: # qualified token with unrecoverable upstream meaning raise ScopeSubstitutionError( f"hop {i}: attested token {tok!r} carries qualifiers but no " f"signed vocabulary_manifest; denotation containment unprovable" ) effective &= attested continue # Manifest present: verify it is a total, injective refinement of upstream. for up_tok in effective: if up_tok not in manifest: raise ScopeSubstitutionError( f"hop {i}: manifest is not total over upstream token {up_tok!r}" ) down_tok = manifest[up_tok] if down_tok not in attested: raise ScopeSubstitutionError( f"hop {i}: manifest maps {up_tok!r} -> {down_tok!r} but {down_tok!r} " f"absent from attested scope" ) # Reject any attested token that is not the image of an upstream token: # it is either a substitution or an unattested widening. image = {manifest[t] for t in effective} for tok in attested: if tok not in image: raise ScopeSubstitutionError( f"hop {i}: attested token {tok!r} has no upstream preimage; " f"possible vocabulary substitution (coarse-to-fine widening)" ) effective = image return effective ```