Repository navigation
Conversation
There was a problem hiding this comment.
AI review by Claude Code: Fix first · 1 should fix
The PR makes JwtProofValidator return every key in attested_keys and makes the endpoint issue one credential per returned key, which also takes effect for the unchanged attestation proof type. It resolves a numeric proof kid as a position in attested_keys and caps the batch by credentials instead of proofs. The fan out is clean, and each credential is built separately, so salts and generated ids stay unique. One case is new and wrong: several JWT proofs that carry the same key attestation each add the full attested key list, so the wallet gets duplicate credentials for the same keys.
For EUDI:
EUDI wallets that send one proof with a WUA listing several keys now receive one PID or attestation per key, which batch issuance and unlinkability under the ARF need. Wallets that send one JWT proof per key with the same WUA get linkable duplicates when batch_size is larger than the number of proofs, unless the scope sets vc.key_attestation.proof_key_index to 0, which rejects such requests anyway.
Claude Code wrote this review of 2eaf285. It read the code without building or running it.
Awambeng asked the tracker's bot account to post this.
Automatic review by Claude Opus 5.5, checked by Claude Fable 5.2: https://oid4vc-sig.eudi-test.dev/reviews/54638.html
- Add vc.key_attestation.proof_key_index to allow a credential configuration to require the proof signing key to be attested_keys[0], as required by ETSI TS 119 472-3 and Regulation (EU) 2026/1731. - If the option is not set, the existing membership check is kept for backwards compatibility. Closes keycloak#52786 Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
- return every attested key from the JWT proof validator and issue one credential per key - resolve a JWT proof kid against attested_keys by key id first, then by position - apply the batch limit to issued credentials and collect nonces only for issued ones - add validator and integration tests for kid positions and multi-key issuance Closes keycloak#54634 Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
There was a problem hiding 8000 this comment.
AI review by Claude Code: Merge as is · 1 follow-up
The PR makes JwtProofValidator return every key in attested_keys and makes the credential endpoint build one credential per returned key, for both the jwt and the attestation proof types. A numeric proof kid without an exact match resolves to the key at that position, and the batch limit now applies to credentials instead of proofs. Keys that an earlier proof in the same request already bound are skipped by JWK thumbprint, so the duplicate credentials from the earlier review no longer occur. The signature check against the resolved key and the trust check on the key attestation still guard every path, and I found nothing that must change.
For EUDI:
EUDI wallets that send one proof with a WUA listing several keys now get one PID or attestation per key up to the realm batch_size, as batch issuance and unlinkability under the ARF need. When the scope sets vc.key_attestation.proof_key_index to 0, the proof must be signed by attested_keys[0], so a wallet has to send that single proof and a request with a further proof signed by another attested key is rejected.
Claude Code wrote this review of 738fbd5. It read the code without building or running it.
Awambeng asked the tracker's bot account to post this.
Automatic review by Claude Opus 5.5, checked by Claude Fable 5.2: https://oid4vc-sig.eudi-test.dev/reviews/54638.html
| } | ||
|
|
||
| // A proof can bind several attested keys, so the limit applies to credentials, not proofs. | ||
| if (vcIssuanceContexts.size() > maxBatchSize) { |
There was a problem hiding this comment.
Follow-up · No test covers the new credential cap when attested keys exceed batch_size.
Impact:
A WUA with more keys than the realm batch_size relies on this cap, and a regression would issue more credentials than the operator allowed without any test failing.
testCompleteSdJwtIssuanceWithMultipleAttestedKeys uses two keys with the default limit of 2, and the deduplication test uses a limit of 10, so the truncation at line 1070 and the nonce collection after it never run with a cut.
Suggested fix:
Add an end to end test with three attested keys and batch_size 2 that asserts two credentials bound to attested_keys[0] and attested_keys[1] and that the nonce is consumed.
Awambeng asked the tracker's bot account to post this.
Automatic review by Claude Opus 5.5, checked by Claude Fable 5.2: https://oid4vc-sig.eudi-test.dev/reviews/54638.html#c-5faacb5b810f41fd-0
This PR addresses the two follow-ups from #53476 on JWT proofs carrying a key attestation.
Closes #54634