Skip to content

[OID4VCI] Fix IssuerKeyAttestationTest conformance failures - #51404

Merged
rmartinc merged 2 commits into
keycloak:mainfrom
adorsys:issue-51399
Aug 6, 2026
Merged

[OID4VCI] Fix IssuerKeyAttestationTest conformance failures#51404
rmartinc merged 2 commits into
keycloak:mainfrom
adorsys:issue-51399

Conversation

@Awambeng

@Awambeng Awambeng commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the OID4VCI conformance suite (IssuerKeyAttestationTest) failures after the key-attestation x5c validation hardening introduced in #51042.

The updated validation requires attester certificate chains to be resolved through trust-material identity providers instead of the server truststore. The conformance setup is updated to provide the required trust material and generate certificates compliant with the new validation rules.

Key changes:

  • Add a conformance-attester-x509 trust-material IdP to the VCI conformance realm, trusting the attester CA with the emailProtection attestation extended key usage, and configure the client oid4vci.attester_trust_idps attribute.

  • Generate compliant test certificates in ConformanceSigningKey:

    • a v3 CA certificate with CA basic constraints and keyCertSign / cRLSign key usages
    • an end-entity attestation certificate with digital signature usage and the required attestation EKU
  • Remove the obsolete truststore-paths workaround from IssuerKeyAttestationTest and use the base server configuration.

Closes #51399

@Awambeng

Awambeng commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@mposolda @dominikschlosser @tdiesler @thomasdarimont @forkimenjeckayang @VinodAnandan Could you please take a look when you get a chance?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The shared certificate helper applies the VCI-specific emailProtection EKU to OID4VP certificates.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Updates OID4VCI conformance trust configuration and certificates for hardened x5c validation.

Changes:

  • Adds an X.509 trust-material IdP for the attester CA.
  • Generates CA and leaf certificates with required constraints and usages.
  • Removes the obsolete server truststore workaround.
File summaries
File Description
VciConformanceRealmConfig.java Configures attester X.509 trust material and client references.
IssuerKeyAttestationTest.java Uses the standard server configuration.
ConformanceSigningKey.java Generates PKIX-compliant CA and leaf certificates.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

The conformance realm now trusts the attester CA through an X.509
trust-material identity provider. ConformanceSigningKey generates a valid
v3 CA and an end-entity attestation certificate, and IssuerKeyAttestationTest
no longer relies on the server truststore.

Closes keycloak#51399

Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
Signed-off-by: Awambeng Rodrick <awambengrodrick@gmail.com>
Copilot AI review requested due to automatic review settings August 3, 2026 16:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Ready to approve

The changes consistently address the hardened validation requirements without leaving unresolved issues.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@dominikschlosser

Copy link
Copy Markdown
Contributor

@Awambeng Very nice, thank you. LGTM!

@vaceksimon vaceksimon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @Awambeng

@vaceksimon
vaceksimon requested a review from rmartinc August 6, 2026 08:49

@rmartinc rmartinc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Awambeng for teh PR! And all the rest for the review! I tested the conformance tests are now executed OK.

@rmartinc
rmartinc merged commit aed6034 into keycloak:main Aug 6, 2026
91 checks passed
@Awambeng
Awambeng deleted the issue-51399 branch August 6, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OID4VCI] Fix IssuerKeyAttestationTest conformance failures caused by invalid attester x5c trust validation

5 participants