Repository navigation
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34ddf5fc87
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (queryIds != null && !queryIds.containsAll(ids)) | ||
| throw InvalidRequest("credential_ids of verifier_info references an unknown DCQL query") |
There was a problem hiding this comment.
Reject verifier info IDs when the DCQL query is absent
When an incoming request has verifier_info.credential_ids but no dcql_query (for example, a scope-only or otherwise malformed VP request), queryIds is null and this condition skips reference validation entirely, so arbitrary non-empty identifiers are accepted even though they cannot reference a Credential Query. Treat the missing query as having no valid IDs, as OpenId4VpRequestOptions already does, or reject credential-scoped verifier info in this case.
Useful? React with 👍 / 👎.
DcApiVerifier accepted an ISO/IEC 18013-7 Annex C response as soon as there was one accepted document of each requested docType, even if it withheld requested data elements, which the mdoc may do (ISO/IEC 18013-5:2021, 8.3.2.1.2.2). As VC-K requests only the data elements it requires, every document request now has to be answered by its own accepted document that returns each requested data element issuer-signed. Documents are assigned to requests by backtracking, regardless of their order, so two requests of one docType need two documents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DCQLQuery.toIso180137AnnexCDeviceRequest rejected claim_sets with more than one option, as an ItemsRequest can not express that the wallet presents one of them (OpenID4VP 1.0, 6.4.1). So an mdoc whose data elements are requested if available, with the claim combinations [required + if available] and [required], could not be offered over ISO/IEC 18013-7 Annex C next to OpenID4VP. If one option is contained in every other one, the verifier accepts it, and requesting exactly its claims asks for nothing the verifier does not accept, so that option is requested, as RequestedCredential.Mdoc .toDocRequest does for claims requested if available. Neither ISO/IEC 18013-5:2021 nor ISO/IEC DIS 18013-5:2026 can mark a data element as optional. Alternatives, of which no option is contained in all others, are still rejected, as requesting their common claims would ask for less than the verifier accepts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HolderDCQLQueryMatchingResult only offered toDefaultSubmission, which presents the first satisfiable option of each required credential set and no optional set. Wallets that let the End-User choose, as they "typically" do (OpenID4VP 1.0, 6.4.3), had no view of the credential sets and built the submission map themselves. credentialSets(dcqlQuery) lists the credential sets with whether the holder can satisfy each option, and toSubmission(dcqlQuery, selection) builds the submission of the chosen option of each set, or of none for an optional set, failing for an unsatisfied required set. toDefaultSubmission is that selection of the first satisfiable option of each required set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The matching quoted "Verifiers MUST NOT point to the same claim more
than once in a single query. Wallets SHOULD ignore such duplicate claim
queries." as OpenID4VP 1.0, 6.1, and ignored every claims query of a
combination after the first one of its claim. OpenID4VP 1.0 has no such
rule: draft 31 removed it ("Remove requirements for duplicate claim
entries"). So two claims queries of one claim with different values
silently checked only the first.
Every claims query of a combination is now matched. An mdoc presentation
returns a data element selected by several claims queries once, as an
mdoc does not return a data element twice in one name space (ISO/IEC
18013-5:2021, 8.3.2.1.2.2); SD-JWT disclosures are a set already.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Credential and claims query identifiers have to be non-empty strings of "alphanumeric, underscore (_), or hyphen (-) characters" (OpenID4VP 1.0, 6.1, 6.3). They accepted every Unicode letter and digit, e.g. "ä", with isLetterOrDigit; they now accept the ASCII letters and digits, ALPHA and DIGIT of RFC 5234. DCQLCredentialQueryIdentifierTest tested the claims query identifier instead of the credential query identifier. The credential_ids of verifier_info, if present, are "A non-empty array of strings each referencing a Credential requested by the Verifier" (OpenID4VP 1.0, 5.1), but were not checked. OpenId4VpRequestOptions now rejects empty ones and ones referencing no credential query, and the wallet's AuthorizationRequestValidator rejects such requests with invalid_request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34ddf5f to
0102288
Compare
More validation and detailed checks. But we'll need to implement ISO 18013-5 from 2026 to support optional claims over ISO Device Requests.