# Where must an instance refuse a delegated AAIF credential whose chain is valid but whose attenuation scope silently widened at the hop boundary? **Date of Record:** 2026 November 20 **Scope:** Applies to any AAIF-compliant agent that validates a multi-hop delegated verifiable credential (VC) chain before invoking a tool or sub-agent on behalf of a principal. Does not apply to single-hop, root-signed credentials or to bearer tokens without a delegation chain. ## Core Distinction There are two independent properties a delegated credential chain can carry, and they fail in different ways: 1. **Chain integrity** — every link's signature verifies against the issuer key named in the previous link, and the root resolves to a trusted principal. This is a *cryptographic* property. It is either true or false and is cheaply checkable. 2. **Attenuation monotonicity** — the effective capability set (scopes, resource globs, time bounds, budget caps) at hop *n* is a subset of the effective set at hop *n−1*. This is a *semantic* property. It is not implied by signature validity, and a chain can be perfectly signed while still granting a downstream agent more authority than its delegator ever held. The failure mode this record isolates is the case where **integrity holds but monotonicity is violated without any signature breaking**. The chain verifies. The verifier passes. The instance acts with authority it was never actually granted. ## What Was Observed During a replay of a three-hop delegation, an orchestrator instance (`O`) delegated to a planner (`P`) with scope `repo:read` and resource glob `org/widgets/*`. `P` re-delegated to an executor (`E`) with scope `repo:read` and resource glob `org/widgets/**`. Each credential's `proof` verified cleanly against the prior issuer. A naive structural check — "does the child's declared scope appear in the parent's declared scope list?" — returned `true`, because both declared the literal string `repo:read`. The widening lived in the **resource glob**, not the scope name. `org/widgets/**` (recursive) is a strict superset of `org/widgets/*` (single segment). The child could read `org/widgets/internal/secrets`, which the parent could not. The verifier compared scope identifiers as opaque strings and never evaluated glob containment. The executor ran a read against a path `O` had explicitly excluded. A second, subtler variant appeared in time bounds. The root credential carried `not_after: T+3600`. Hop 2 carried `not_after: T+7200` because the delegating agent serialized an absolute expiry from its own clock skew instead of deriving it as `min(parent.not_after, now + ttl)`. Both signatures valid; the effective window doubled. A third variant: scope vocabularies were versioned. Parent used `v2` scope `repo:read`, child used `v1` scope `repo:read` where `v1` semantics included write. The string matched; the meaning inverted. No integrity check catches this because the bytes are consistent. ## Condition of Validity Monotonicity can only be asserted when the verifier enforces **all** of the following at every hop boundary: - **Scope identity is resolved, not string-matched.** Each scope identifier must map through a pinned vocabulary version to a canonical capability set; the child's canonical set must be a subset of the parent's canonical set. A version mismatch is a hard refusal, not a coercion. - **Resource selectors are evaluated for containment, not equality.** Glob/label/prefix selectors must be checked with a subset relation over the resource universe (`glob_subset(child, parent)`), never by comparing selector strings. - **Time and budget bounds are derived downward.** `child.not_after <= parent.not_after` and `child.budget <= parent.budget − parent.consumed`. Absolute values from a delegating agent's local clock are untrusted; only the `min(parent_bound, now + requested_ttl)` derivation is admissible. - **The chain is walked root-to-leaf with the effective set accumulated**, and each comparison is against the *accumulated* set, not merely the immediate parent. A child that is a subset of its parent but not of the root's intersection is still a violation. If any of these cannot be established — unknown vocabulary version, selector type the verifier cannot decide containment for, missing bound — the correct outcome is refusal, not best-effort. ## Decision Boundary The instance must **refuse and fail closed** when chain integrity verifies but any attenuation check returns *undecidable* or *violated*. The boundary is not "is the signature good" but "can I prove the effective set did not grow." Undecidability is treated identically to violation, because an unproven subset relation is exactly the gap an attacker occupies. The instance must **not** refuse when the child's effective set is provably a subset, even if the declared selector strings differ (e.g., a child narrowing `org/widgets/**` to `org/widgets/public/*`). String inequality is not evidence of widening; only failed containment is. The instance must **re-derive**, never trust, any bound that a delegating peer computed from its own clock or budget ledger. ## Operational Effect Failing closed on undecidable attenuation converts a class of silent privilege-escalation bugs into loud, attributable refusals at the hop where the widening was introduced — which is the only place the offending delegator can be identified. The cost is that vocabulary version skew and exotic selector types now block execution until the verifier's containment oracle is extended; this is the correct trade, because the alternative is an executor that reads paths its principal excluded while every log line says the credential was valid. ```python from dataclasses import dataclass from typing import Optional class AttenuationViolation(RuntimeError): """Raised when a delegated credential's effective authority is not provably a subset of its delegator's, despite valid chain integrity.""" @dataclass class Credential: scope: str scope_vocab_version: int resource_glob: str not_after: float budget: float parent_not_after: float parent_budget: float signature_valid: bool # Pinned vocabularies: version -> scope -> canonical capability set. VOCAB = { 1: {"repo:read": {"read", "write"}}, # v1 conflated read/write 2: {"repo:read": {"read"}}, } KNOWN_VOCAB_VERSIONS = set(VOCAB) def glob_subset(child: str, parent: str) -> Optional[bool]: """Return True/False if containment is decidable, None if not.""" if parent.endswith("/**"): return child.startswith(parent[:-2]) if parent.endswith("/*"): if child.endswith("/**"): return False return child.startswith(parent[:-1]) and "/" not in child[len(parent) - 1:] return child == parent def verify_hop(child: Credential, parent_effective_caps: set, parent_glob: str, parent_not_after: float, parent_budget: float) -> set: if not child.signature_valid: raise AttenuationViolation("integrity failed before attenuation check") if child.scope_vocab_version not in KNOWN_VOCAB_VERSIONS: raise AttenuationViolation( f"undecidable: unknown scope vocab v{child.scope_vocab_version}") child_caps = VOCAB[child.scope_vocab_version].get(child.scope) if child_caps is None: raise AttenuationViolation(f"undecidable: unknown scope {child.scope!r}") if not child_caps.issubset(parent_effective_caps): raise AttenuationViolation( f"scope widening: {child_caps - parent_effective_caps} not held by delegator") contained = glob_subset(child.resource_glob, parent_glob) if contained is None: raise AttenuationViolation( f"undecidable: cannot decide containment of {child.resource_glob!r} " f"within {parent_glob!r}") if not contained: raise AttenuationViolation( f"resource widening: {child.resource_glob!r} escapes {parent_glob!r}") if child.not_after > parent_not_after: raise AttenuationViolation( f"time widening: {child.not_after} > {parent_not_after}") if child.budget > parent_budget: raise AttenuationViolation( f"budget widening: {child.budget} > {parent_budget}") return child_caps # new accumulated effective set for the next hop ```