Repository navigation
Conversation
Closes keycloak#50680 Signed-off-by: Tijl Bormans <tijl.bormans@bexio.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the added ML-DSA truststore regression coverage.
No open issues 🎉
What changed in this PR
Adds regression coverage for ML-DSA certificates in Keycloak’s existing truststore handling, addressing #50680 without production changes or TLS handshakes.
Changes:
- Adds self-signed ML-DSA-44/65/87 certificate fixtures.
- Tests PEM loading and PKCS12 round-trip loading.
- Tests trusted-root classification and SSL socket factory initialization.
| File | Description |
|---|---|
| services/src/test/resources/truststores-ml-dsa/roots.pem | Adds three ML-DSA root certificates outside existing recursive-scan fixtures. |
| services/src/test/java/org/keycloak/truststore/TruststoreBuilderTest.java | Covers ML-DSA truststore loading from PEM and PKCS12. |
| services/src/test/java/org/keycloak/truststore/FileTruststoreProviderFactoryTest.java | Covers root classification, socket factory creation, and accepted issuers. |
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 #50680
Decisions and assumptions:
truststores-ml-dsa/roots.pemholds three self-signed ML-DSA roots (44/65/87) generated withkeytool -genkeypair -keyalg ML-DSA, valid for 100 years. It is outsidetruststores/becauseTruststoreBuilderTest.testMergedTrustStoreFromDirectoryscans that folder recursively.DefaultCryptoProviderregisters BouncyCastle, which supplies the ML-DSA signature verification. For that reason there is no JDK-specific guard.I used an AI assistant (Claude) to help write these tests, and I reviewed the code and ran the tests myself.