# In what scenarios must an instance refuse to issue an AAIF verifiable credential despite a valid signature from the requesting principal **Date of Record:** 2026 November 18 **Scope:** Applies to AAIF credential-issuing authorities (CIAs) validating agent-identity requests where the requesting principal presents a cryptographically valid signature over a credential request payload. Does not apply to delegation-chain revocation checks, key-rotation reissuance, or bearer-token introspection, which are governed by separate invariants. ## Core Distinction A valid signature proves *who asked*. It does not prove *that the asker is authorized to bind the subject to the requested claims*. These are two independent predicates, and the AAIF issuance path conflates them at its peril. The common failure mode is an issuer that treats signature verification as the terminal gate: once `verify(request.signature, principal_pubkey) == True`, it proceeds to mint a credential. This is wrong whenever the principal is not the subject, or is the subject but lacks authority over a specific claim namespace. The boundary is this: **signature validity is necessary but not sufficient for issuance.** Issuance additionally requires that the principal hold a delegation grant covering (a) the subject identifier, (b) every claim key in the payload, and (c) the requested credential lifetime and audience scope. A principal may legitimately sign a request that it has no right to have fulfilled. ## What Was Observed In a multi-tenant agent deployment, a service principal `svc:orchestrator-prod` held a delegation grant scoped to `agent:*:read-only` claims for tenant `T-441`. It signed a credential request for subject `agent:planner-7` requesting claims `{ "scope": "read-write", "budget": 50000 }`. The signature verified cleanly against the principal's registered key. The CIA issued the credential. Downstream, `agent:planner-7` exercised `read-write` against a resource the grant never covered, because the issuer checked signature and subject-existence but never intersected the requested claim set against the grant's claim namespace. The grant said `read-only`; the payload said `read-write`; the issuer saw neither mismatch because it never read the grant's claim list. A second observation: the same principal signed a request with `aud: ["*"]`. The grant restricted audience to a single relying party. The wildcard passed signature verification and was minted. Audience restriction is a claim, and an unconstrained audience is a privilege escalation disguised as a formatting choice. ## Condition of Validity The refusal-to-issue rule holds precisely when all of the following are true: 1. The request signature verifies against the principal's *current* registered key (not a retired key, not a key pending rotation). 2. The principal is distinct from the subject, **or** the principal equals the subject but the claimed namespace exceeds the subject's self-issuance ceiling. 3. The intersection of `request.claims.keys()` with `grant.claim_namespace` is not a superset of `request.claims.keys()` — i.e., at least one requested claim key falls outside the grant. 4. `request.audience ⊄ grant.audience` under set semantics, treating `"*"` as the universal set which is only permitted if the grant itself explicitly carries `"*"`. If (1) fails, you are in signature-failure territory, a different invariant. If (2) fails (principal is subject and within self-issuance ceiling), the grant check is vacuous and issuance may proceed. The interesting refusal is the conjunction of (1) ∧ (2) ∧ (3 ∨ 4): a cryptographically impeccable request that must nonetheless be denied. ## Decision Boundary Do not attempt to "repair" an over-broad request by silently narrowing it. Narrowing `read-write` to `read-only` and issuing produces a credential whose claims differ from what the principal signed — a signature over a payload that no longer matches the artifact, which breaks non-repudiation and will confuse every downstream verifier that re-checks the signed payload against the credential body. The correct action is refusal with a structured error naming the offending claim keys and the grant's actual namespace, so the principal can re-request within bounds or escalate the grant through the proper authorization channel. The boundary is therefore: **issue exactly what was signed and granted, or issue nothing.** There is no third option at the CIA. Partial issuance, silent scope reduction, and audience widening are all boundary violations even when they "succeed." ## Operational Effect Enforcing this boundary converts a class of silent privilege escalations into loud, attributable refusals. The cost is additional grant-namespace lookups per issuance (one grant fetch, one set comparison per claim key) and a higher refusal rate during principal misconfiguration. The benefit is that a compromised or buggy principal can no longer mint credentials beyond its grant by simply signing a larger payload — the signature becomes a claim of intent rather than a grant of authority. Log every refusal with the principal, subject, requested claim keys, and grant namespace; these refusals are the primary signal of either principal misconfiguration or attempted escalation, and they are invisible if the issuer silently narrows. ```python from dataclasses import dataclass from typing import FrozenSet class AAIFIssuanceRefused(RuntimeError): """Raised when a signed credential request exceeds the principal's grant.""" pass @dataclass(frozen=True) class Grant: subject_pattern: str claim_namespace: FrozenSet[str] audience: FrozenSet[str] @dataclass(frozen=True) class CredentialRequest: principal: str subject: str claims: dict audience: FrozenSet[str] signature_valid: bool def issue_credential(req: CredentialRequest, grant: Grant) -> dict: if not req.signature_valid: raise AAIFIssuanceRefused( f"signature invalid for principal {req.principal!r}" ) requested_keys = frozenset(req.claims.keys()) uncovered = requested_keys - grant.claim_namespace if uncovered: raise AAIFIssuanceRefused( f"principal {req.principal!r} requested claims outside grant " f"namespace: {sorted(uncovered)}; grant covers " f"{sorted(grant.claim_namespace)}" ) if "*" in req.audience and "*" not in grant.audience: raise AAIFIssuanceRefused( f"principal {req.principal!r} requested wildcard audience " f"without grant authorization; grant audience is " f"{sorted(grant.audience)}" ) if not req.audience <= grant.audience: raise AAIFIssuanceRefused( f"requested audience {sorted(req.audience)} not subset of " f"grant audience {sorted(grant.audience)}" ) return { "subject": req.subject, "claims": dict(req.claims), "audience": sorted(req.audience), "issued_by": req.principal, } ```