[OID4VCI] Add advanced key attestation integration tests - #51395
Conversation
Signed-off-by: forkimenjeckayang <forkimenjeckayang@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds end-to-end OID4VCI coverage for key-attested SD-JWT issuance and fixes resistance-level serialization.
Changes:
- Tests JWT and attestation proofs using
kidandx5c. - Verifies SD-JWT holder-key binding.
- Correctly serializes key-attestation resistance levels.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/base/.../OID4VCIssuerTestBase.java |
Configures the attestation scope for SD-JWT and both proof types. |
tests/base/.../OID4VCKeyAttestationTest.java |
Adds four complete issuance-flow scenarios. |
services/.../CredentialScopeRepresentation.java |
Fixes resistance-level list serialization. |
server-spi-private/.../CredentialScopeModel.java |
Fixes model-level resistance-list serialization. |
mposolda
left a comment
There was a problem hiding this comment.
@forkimenjeckayang Thanks! PR looks good to me, however there are conflicts (probably due your other PR, which was merged in the meantime). Are you please able to rebase to fix the conflict?
|
@forkimenjeckayang I've merged another PR, which is also related to your changes #51356 . Maybe after rebase your PR, there is no need to change the |
Signed-off-by: forkimenjeckayang <forkimenjeckayang@gmail.com>
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.federation.ldap.LDAPGroupMapperTest#test01_ldapOnlyGroupMappings |
mposolda
left a comment
There was a problem hiding this comment.
@forkimenjeckayang Thanks!
closes keycloak#51348 Signed-off-by: forkimenjeckayang <forkimenjeckayang@gmail.com> Signed-off-by: theohh0 <theo.hinton-hallows@ibm.com>
Adds full OID4VCI integration coverage for credential configurations with
key_attestations_requiredenabled.The tests cover the complete authorization, token, and credential issuance
flow for:
kid-based key attestationkidheaderx5c-based key attestationx5ccertificate chainThe tested credential configuration issues SD-JWT credentials and supports
both
jwtandattestationproof types. Each successful flow verifies thatthe issued SD-JWT contains a
cnf.jwkholder binding that matches the exactkey supplied by the validated proof.
Additional fix
The integration tests uncovered an issue in the key-attestation requirement
setters. Configured resistance-level lists were serialized as empty strings
because the list argument was not passed to
String.join.This fixes serialization in both
CredentialScopeModelandCredentialScopeRepresentation.closes #51348