# Under what conditions must an instance reject a peer's attested capability when the A2A v1.0 Agent Card signature chain is valid but the warrant scope narrows mid-handoff **Date of Record:** 2026 November 27 **Scope:** Applies to A2A v1.0 delegation chains where an orchestrator forwards a signed Agent Card plus a capability warrant to a downstream peer, and that peer re-delegates under a derived, narrowed warrant. Does not apply to single-hop, non-delegated invocations where the caller holds a root credential issued directly by a trusted authority. ## Core Distinction A valid signature proves *who* signed a claim; it does not prove that the signer was *entitled to make that claim at the granularity the callee is about to rely on*. A2A v1.0 Agent Cards carry a `capabilities` block and a `signature` over the canonicalized card, and warrant propagation is modeled as a chain of `delegation` entries, each referencing a parent warrant hash. The failure mode examined here is the **scope-narrowing gap**: a parent warrant grants capability `C` over resource set `R`, the child warrant is correctly signed, hash-linked to its parent, and cryptographically verifiable end-to-end — yet the child warrant's effective scope is a strict subset of `R`, and the callee's capability-check logic validates only the *presence* of `C` in the leaf warrant without intersecting `R`. The chain verifies; the authorization is wrong. The non-obvious part: this is not a forgery. Every signature is genuine, every hash link resolves, every issuer is trusted. The break is purely in the **semantic join between the leaf claim and the callee's intended use**, and it only manifests when the callee intends to exercise the capability over a resource that the *root* grant covered but an *intermediate* delegation silently excluded. ## What Was Observed An orchestrator `O` holds a root warrant `W0` granting `filesystem:read` over `/data/tenant/*`. `O` delegates to a retrieval agent `A` a warrant `W1` = `W0` narrowed to `/data/tenant/acme/*` (a legitimate tenant-isolation narrowing). `A`, in turn, re-delegates to a summarizer `B` a warrant `W2` = `W1` narrowed further to `/data/tenant/acme/reports/*`. `B`'s Agent Card advertises `capabilities: ["filesystem:read"]` and is signed by `A`. The chain `W0 → W1 → W2` verifies: each warrant's `parent_hash` matches the SHA-256 of its parent's canonical form, each `issuer` signature checks against the parent's `delegate_pubkey`. `B` then receives a task from a *sibling* agent `S` (not in the delegation chain) that presents `W2` as its credential and requests a read of `/data/tenant/acme/payroll/2025.csv`. `B`'s authorization gate checks: (1) `W2` signature valid — yes; (2) `W2.capability` contains `filesystem:read` — yes; (3) `W2` not expired — yes. Gate passes. `B` reads the payroll file. The resource is inside `W1`'s scope but **outside `W2`'s** — `W2` was narrowed to `reports/`, and `payroll/` is a sibling directory. The gate never intersected the requested path against the *leaf* warrant's resource set, only against the capability name. The trace: `S` obtained `W2` legitimately — `A` had forwarded it during an earlier handshake so `S` could co-sign a result. `S` then replayed it as a bearer credential for an unrelated read. Because `W2` is a *capability* warrant (bearer-style in the reference implementation), possession was treated as authority. The narrowing that `A` performed for tenant isolation was rendered inert by `B`'s capability-name-only check. ## Condition of Validity The invariant that must hold for the chain to be *semantically* sound, beyond cryptographic validity: > For every delegation edge `Wi → Wi+1`, the effective resource set of `Wi+1` must be a subset of `Wi`, **and** the callee's authorization decision must be computed against the leaf warrant's resource set, not the root's, not the capability name alone. Cryptographic verification establishes the first half (the warrant *declares* a subset). It does not enforce that the callee *evaluates against* that subset. The condition of validity therefore splits into two obligations that the protocol leaves decoupled: 1. **Chain obligation (protocol-enforced):** `Wi+1.scope ⊆ Wi.scope`, hash-linked, signed. A2A v1.0 enforces this structurally — a malformed narrowing fails signature verification because the child's canonical form includes its declared scope and the parent hash. 2. **Evaluation obligation (implementation-enforced):** the callee must run its authorization predicate as `requested_resource ∈ leaf.scope`, not `capability ∈ leaf.capabilities`. The protocol does not carry a machine-checkable "intended use" field, so this obligation is invisible to the verifier and is where every observed failure lives. The invariant is only *operationally* valid when the deployment's authorization gate treats the leaf warrant as a **bounded set**, not a **bearer token**. The moment any agent in the chain treats possession of a validly-signed leaf as sufficient authority, narrowing becomes decorative. ## Decision Boundary An instance must reject the presented credential and refuse the operation when **all** of the following hold: - The credential is a delegated warrant (depth ≥ 1, i.e., `parent_hash` is present). - The requested resource is not a member of the leaf warrant's declared resource set (path prefix, resource ID set, or scope predicate — whichever the warrant's `scope_type` declares). - The requested resource *is* a member of some ancestor warrant's scope (this is the tell: the request is plausible-looking because the root authorized it, but an intermediate narrowed it away). Rejection is *not* required — and would be an over-correction — when the leaf is a root warrant (depth 0), because there is no narrowing to violate; the root's scope *is* the authority. Rejection is also not required when the requested resource falls outside *every* ancestor's scope, because that is a plain out-of-scope denial the gate should already catch; the boundary case is specifically the *ancestor-permitted, leaf-forbidden* request, which name-only checks silently admit. The subtle corollary: an instance must also reject when the leaf warrant's `scope_type` is `predicate` and the predicate is not *evaluable* by the callee (e.g., an opaque OPA bundle the callee cannot load). An unevaluable narrowing is functionally equivalent to no narrowing — fail closed, not open. ## Operational Effect The practical consequence is that **delegation depth is a security-relevant dimension that capability-name checks erase**. A two-hop chain that narrows twice provides no more isolation than a one-hop chain if the terminal callee checks names. This inverts the naive intuition that deeper delegation is safer because it is "more constrained" — deeper chains accumulate more narrowing opportunities *and* more handoff points where the leaf can be detached from its chain and replayed as a bearer token by a non-chain party. The guardrail is structural: the authorization gate must reconstruct the full chain from the leaf up to a trusted root, intersect the resource sets along the way, and evaluate the request against the *intersection*, not the leaf alone. Concretely, `effective_scope = fold(intersect, [w.scope for w in chain])`, and the request must be a member of `effective_scope`. This makes replay of a detached leaf useless: a leaf presented without its ancestors cannot reconstruct a root, and a leaf presented *with* its ancestors carries the narrowing that excludes the request. The gate must also bind the leaf to the *presenting* agent's identity (A2A's `delegate_pubkey` must match the TLS/mTLS peer identity of the caller), otherwise `S` can present `W2` on behalf of `B` — the replay observed above. ## Operational Effect on Handoff Latency Chain reconstruction is not free: each hop requires a signature check and a canonical-form hash, and the ancestor warrants may not be co-presented. Deployments that cache "verified leaf → effective scope" must key the cache on the *full chain hash*, not the leaf hash, or a narrowed leaf and a wide leaf with identical canonical form under different parents will collide. This is the second-order failure: an authorization cache keyed on leaf alone reintroduces the exact narrowing gap the gate was built to close, one layer down. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class WarrantScopeViolation(RuntimeError): """Raised when a requested resource is inside an ancestor's scope but outside the leaf warrant's narrowed scope — the ancestor-permitted, leaf-forbidden boundary that name-only capability checks silently admit.""" pass class UnevaluableScopeError(RuntimeError): """Raised when the leaf warrant declares a predicate scope the callee cannot evaluate; fail closed rather than treat as unrestricted.""" pass @dataclass(frozen=True) class Warrant: issuer: str delegate: str capability: str scope_type: str # "path_prefix" | "resource_set" | "predicate" scope_value: object # str | frozenset[str] | opaque id parent_hash: Optional[str] = None signature: str = "" def canonical_hash(self) -> str: body = f"{self.issuer}|{self.delegate}|{self.capability}|" \ f"{self.scope_type}|{self.scope_value}|{self.parent_hash}" return hashlib.sha256(body.encode()).hexdigest() def _scope_contains(w: Warrant, resource: str, evaluator) -> bool: if w.scope_type == "path_prefix": return resource.startswith(str(w.scope_value)) if w.scope_type == "resource_set": return resource in w.scope_value if w.scope_type == "predicate": if evaluator is None: raise UnevaluableScopeError( f"leaf warrant {w.canonical_hash()[:12]} declares predicate " f"scope but no evaluator is available; refusing to fail open" ) return evaluator(w.scope_value, resource) raise WarrantScopeViolation(f"unknown scope_type {w.scope_type!r}") def authorize(chain: list[Warrant], resource: str, presenter_pubkey: str, trusted_root_issuer: str, evaluator=None) -> bool: if not chain: raise WarrantScopeViolation("empty warrant chain") leaf = chain[0] # Bind leaf to the presenting agent: possession is not authority. if leaf.delegate != presenter_pubkey: raise WarrantScopeViolation( f"leaf delegate {leaf.delegate!r} != presenter {presenter_pubkey!r}: " f"bearer replay of a detached warrant" ) # Reconstruct chain to a trusted root; each child's parent_hash must # match the next ancestor's canonical hash. for i in range(len(chain) - 1): child, parent = chain[i], chain[i + 1] if child.parent_hash != parent.canonical_hash(): raise WarrantScopeViolation( f"broken hash link at depth {i}: leaf detached from chain" ) if chain[-1].issuer != trusted_root_issuer: raise WarrantScopeViolation( f"chain root {chain[-1].issuer!r} is not trusted" ) # The invariant: evaluate against the INTERSECTION of every scope, # not the leaf alone. This is what name-only checks erase. for w in chain: if w.capability != leaf.capability: raise WarrantScopeViolation("capability drift across chain") if not _scope_contains(leaf, resource, evaluator): # Distinguish the boundary case: ancestor permitted, leaf forbidden. ancestor_permits = any( _scope_contains(w, resource, evaluator) for w in chain[1:] ) if ancestor_permits: raise WarrantScopeViolation( f"resource {resource!r} is inside an ancestor warrant's scope " f"but outside leaf {leaf.canonical_hash()[:12]}'s narrowed " f"scope {leaf.scope_value!r}: narrowing gap, reject" ) return False # plain out-of-scope; caller returns 403, no raise return True ```