Repository navigation
Conversation
Closes keycloak#54496 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Closes keycloak#54496 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Adds the startup check, logs the active certificate, and adds docs and release notes. Closes keycloak#54496 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Closes keycloak#54496 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
ahus1
force-pushed
the
is-54496-jgroups-rsa-key-size
branch
2 times, most recently
from
November 16, 2026 13:50
0d263ba to
98b4314
Compare
Closes keycloak#54496 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Closes keycloak#54496 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
ahus1
force-pushed
the
is-54496-jgroups-rsa-key-size
branch
from
November 16, 2026 14:34
98b4314 to
3966750
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Database-backed startup migration tests are missing for larger, smaller, and unchanged keys and concurrent startups, leaving committed-certificate convergence and alias preservation unverified.
1 open issue
What changed in this PR
Strengthens Keycloak’s automatically generated cache-transport certificates for #54496, without changing realm keys or user-supplied certificates.
Changes:
- Defaults to RSA-3072 with RSASSA-PSS, adds RSA/ECDSA configuration, and replaces stored certificates on startup when their keys do not match.
- Adds opt-in PSS signing to shared certificate utilities and stores transport private keys as PKCS#8.
- Updates documentation, adds cryptographic and cluster-formation tests, and enables clustered caches in Arquillian FIPS tests.
| File | Description |
|---|---|
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/servlet/SAMLServletAdapterTest.java |
Removes cluster routes before decoding session cookies. |
testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/AbstractQuarkusDeployableContainer.java |
Supports default clustered-cache configuration. |
tests/clustering/src/test/java/org/keycloak/tests/clustering/EcdsaCacheTransportCertificateTest.java |
Adds ECDSA cluster-formation coverage. |
model/infinispan/src/test/java/org/keycloak/jgroups/certificates/UtilsTest.java |
Tests generation, key matching, and legacy private-key loading. |
model/infinispan/src/main/java/org/keycloak/jgroups/certificates/Utils.java |
Generates configured transport keys and requests PSS signing. |
model/infinispan/src/main/java/org/keycloak/jgroups/certificates/KeySpec.java |
Defines RSA/ECDSA configuration, validation, and matching. |
model/infinispan/src/main/java/org/keycloak/jgroups/certificates/JGroupsCertificate.java |
Stores private keys as PKCS#8. |
model/infinispan/src/main/java/org/keycloak/jgroups/certificates/DefaultJGroupsCertificateProviderFactory.java |
Exposes and reads certificate provider options. |
model/infinispan/src/main/java/org/keycloak/jgroups/certificates/DatabaseJGroupsCertificateProvider.java |
Replaces mismatched stored certificates during startup. |
model/infinispan/pom.xml |
Adds the default crypto provider for tests. |
docs/guides/server/caching.adoc |
Documents stronger defaults and configuration behavior. |
docs/documentation/upgrading/topics/changes/changes-27_0_0.adoc |
Explains migration, retries, and configuration options. |
docs/documentation/release_notes/topics/27_0_0.adoc |
Announces stronger cache-transport certificates. |
crypto/fips1402/src/test/java/org/keycloak/crypto/fips/test/BCFIPSCertificateUtilsProviderTest.java |
Tests PSS and ECDSA certificate signing. |
crypto/fips1402/src/main/java/org/keycloak/crypto/fips/BCFIPSCertificateUtilsProvider.java |
Adds opt-in PSS signing for the FIPS provider. |
crypto/elytron/src/main/java/org/keycloak/crypto/elytron/ElytronCertificateUtilsProvider.java |
Adds PSS signature selection for Elytron. |
crypto/default/src/test/java/org/keycloak/crypto/def/test/BCCertificateUtilsProviderTest.java |
Tests PSS and preserved PKCS#1 signing behavior. |
crypto/default/src/main/java/org/keycloak/crypto/def/BCCertificateUtilsProvider.java |
Adds opt-in PSS signing for the default provider. |
common/src/main/java/org/keycloak/common/util/CertificateUtils.java |
Exposes the optional PSS signing overload. |
common/src/main/java/org/keycloak/common/crypto/CertificateUtilsProvider.java |
Extends the certificate-provider signing contract. |
.github/scripts/run-fips-it.sh |
Enables clustered caches for Arquillian FIPS tests. |
Review effort: Balanced
…ration tests Run the test on the new test framework by letting run-on-server reach the containers of a clustered server, and cover the certificate replacement on startup for larger, smaller and different keys, and concurrent startups. Relates to keycloak#54496 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Relates to keycloak#54496 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The rotation tests fail in stateless and mixed-version CI configurations, and their cleanup can leave shared-cluster certificates inconsistent with the server configuration.
3 open issues
1 resolved since last review
Review effort: Balanced
… compatibility tests in mixed clusters The stateless nodes form independent clusters, so multi-member assertions time out. Mixed-version clusters use released images without the key specification, so only the compatibility tests run there. Reload the certificate on all nodes before restoring it, so that the coordinator knows the alias that was written by the test. Relates to keycloak#54496 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
Relates to keycloak#54496 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
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 #54496
The generated cache-transport certificate follows BSI TR-02102-2, which asks for RSA keys of at least 3000 bits and deprecates PKCS#1 v1.5 signatures.
Decisions and assumptions
algorithm(RSAdefault, orECDSA),key-size(default 3072, minimum 2048) andcurve(secp256r1default,secp384r1,secp521r1) are added to thejgroups-mtlsSPI. Invalid values fail at startup. The CLI options are expected to be removed in a future version, so this is meant to be backported to allow a graceful migration.--cache=ispn) so that they exercise certificate generation in FIPS mode; the Arquillianlocalmode is left in place and can be removed in a follow-up. The new-framework FIPS suites stay on local caches, as tests likeLoginTestassume cookies without a cluster route.tests/clusteringagainst a two-node cluster.JGroupsCertificateRotationClusterTestis migrated from the Arquillian testsuite for this, and the Arquillian version is removed. To run code on a specific node, run-on-server now works with the clustered server: the containers load the test classes from the host viahost.testcontainers.internal, configured through thetest-class-urloption of the run-on-server provider, and the load balancer selects the node. Stopping the coordinator needs its own cluster, so it is a separate test class. The tests skip on stateless clusters, as those nodes do not form one cluster.changes-27_0_0.adoc; a backport needs to move it to the matching version file.org.keycloak.tests.compatibilitypackage, selected throughMixedClusterTestSuite. Its old node is an older patch release that does not know the new key options, so the certificate tests must not run there.