Repository navigation
[OID4VCI] Also exclude non-self-signed trust anchors from the X5C chain of signed issuer metadata - #54930
Open
IngridPuppet wants to merge 2 commits into
Open
[OID4VCI] Also exclude non-self-signed trust anchors from the X5C chain of signed issuer metadata#54930IngridPuppet wants to merge 2 commits into
IngridPuppet wants to merge 2 commits into
Conversation
…ed issuer metadata Signed-off-by: Ingrid Kamga <Ingrid.Kamga@adorsys.com>
IngridPuppet
force-pushed
the
54890-also-exclude-non-self-signed-ca-certs
branch
from
November 9, 2026 15:36
581e973 to
073c009
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the metadata certificate-filtering and keystore chain-handling changes.
No open issues 🎉
What changed in this PR
Addresses #54890 by excluding non-self-signed CA trust anchors from signed OID4VCI issuer metadata, improving wallet interoperability.
Changes:
- Removes the topmost non-leaf certificate from metadata
x5cheaders when self-signed or marked CA. - Allows Java keystores with incomplete chains, including a single non-self-signed certificate.
- Adds certificate-chain test scenarios and documents the differing metadata and SD-JWT VC behavior.
| File | Description |
|---|---|
| tests/base/src/test/java/org/keycloak/tests/oid4vc/OID4VCIssuerWellKnownProviderTest.java | Tests metadata certificate filtering and signatures across four chain variants. |
| tests/base/src/test/java/org/keycloak/tests/oid4vc/OID4VCIssuerTestBase.java | Adds reusable signing-provider registration and cleanup helpers. |
| tests/base/src/test/java/org/keycloak/tests/oid4vc/MdocTestSigningKey.java | Generates keystores for four certificate-chain scenarios. |
| tests/base/src/test/java/org/keycloak/tests/keys/JavaKeystoreKeyProviderTest.java | Tests importing chains without self-signed roots. |
| test-framework/core/src/main/java/org/keycloak/testframework/crypto/CryptoKeyStore.java | Adds certificate-chain support to the keystore helper. |
| services/src/main/java/org/keycloak/protocol/oid4vc/issuance/OID4VCIssuerWellKnownProvider.java | Extends metadata trust-anchor filtering to non-self-signed CA certificates. |
| services/src/main/java/org/keycloak/keys/JavaKeystoreKeyProviderFactory.java | Validates chains excluding the anchor and accepts single certificates. |
| docs/documentation/server_admin/topics/oid4vci/vc-issuer-configuration.adoc | Clarifies keystore support and certificate-header filtering rules. |
Review effort: Balanced
Contributor
Author
|
Working on review comments at https://oid4vc-sig.eudi-test.dev/reviews/54930.html... |
Signed-off-by: Ingrid Kamga <Ingrid.Kamga@adorsys.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The implementation retains a trailing non-self-signed CA certificate in x5c contrary to the stated requirement, so configured chains can still produce headers rejected by the referenced wallet.
1 open issue
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #54890
Main change in
JavaKeystoreKeyProviderFactoryto allow loading keystores whose chain does not terminate in a self-signed certificate, including a lone non-self-signed certificate. Admins could now omit certificates that should not be added to the metadata header. Rationale: It is hard to tell apart a standard intermediate certificate from one that is treated as a trust anchor.