Repository navigation
Replies: 1 comment
|
Following the GlaSSLess integration prototype, I implemented another Keycloak prototype using Project Brisbane, which provides the JipherJCE Java security provider: #53711 Implementation details
Limitations and pain points identified during the PoC
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hey Keycloak Community 👋🏻
I would like to gather feedback on PR #51082, which prototypes integrating GlaSSLess as an additional FIPS-capable cryptographic provider for Keycloak.
The proposal does not remove Bouncy Castle support. Instead, it introduces a provider-selection model with:
--fips-provider=auto--fips-provider=bouncycastle--fips-provider=glasslessIn auto mode, Keycloak selects Bouncy Castle when the BCFIPS provider is available and otherwise selects the bundled GlaSSLess provider. This approach helps introducing this feature in a backwards compatible way. Provider implementations are discovered through a small CryptoProviderFactory abstraction rather than being hard-coded into server startup.
The main goal is broader than adding one provider: it is to make Keycloak’s FIPS integration more predictable, portable, and and less dependent on Bouncy Castle.
Why redesigning FIPS capabilities matter?
Bouncy Castle and BCFIPS have enabled FIPS support in Keycloak, but the integration has repeatedly exposed operational problems outside Keycloak’s core identity functionality.
Common sources of friction include:
Addressing the pain points
Here's a short list that showcase, how GlaSSLess could improve the FIPS implementation in Keycloak:
GlaSSLess can be bundled with Keycloak, avoiding the need to install a compatible set of
bc-fips,bcpkix-fips,bctls-fips, andbcutil-fipsJARs.Keycloak can select
glasslessdirectly, register it at the required JCA priority, and fail startup when provider registration is incorrect.GlaSSLess is not tied to the Bouncy Castle-specific BCFKS format, allowing standard keystore formats or external HSM/KMS solutions where the deployment’s security policy permits them.
Strict-mode startup checks can confirm that GlaSSLess and the OpenSSL FIPS provider are active before Keycloak accesses cryptographic services, reducing initialization-order failures.
GlaSSLess supplies JCA cryptography without inherently replacing the JDK TLS implementation, reducing BCJSSE-specific behavior across HTTPS, LDAP, databases, Infinispan, and JGroups.
Using the operating system’s OpenSSL provider can align Keycloak with platform patching and FIPS-module lifecycles. This does not remove vulnerability tracking, but reduces dependence on coordinated upgrades across several Bouncy Castle artifacts.
Related work
Several Keycloak issues demonstrate the operational impact of the current integration:
The documented Bouncy Castle artifact set was incomplete. Users also needed bcutil-fips; without it, Keycloak failed with a NoClassDefFoundError.
This is a relatively small documentation problem, but it shows how easy it is to produce a non-working FIPS image by omitting one provider JAR.
Truststore consolidation introduced PKCS12 assumptions that conflicted with BCFKS-based strict-mode deployments. Keycloak attempted to merge or parse a BCFKS store through an incompatible path and failed during startup.
This shows how tightly BCFIPS provider selection and BCFKS store handling have become connected.
A Quarkus build-step ordering change caused truststore initialization to run before the Bouncy Castle provider had been registered. Consequently, KeyStore.getInstance("BCFKS") failed even though the necessary provider files were present.
This is an example of provider-registration order becoming part of Keycloak’s startup correctness.
A containerized, clustered deployment encountered BCJSSE TLS errors while JGroups attempted to establish encrypted connections. The nodes could not reliably form a cluster.
This demonstrates that selecting Bouncy Castle for FIPS can affect subsystems such as Infinispan and JGroups, even though those components are not directly related to token signing or password hashing.
Keycloak’s Java 25 FIPS work was partially blocked by the validation status of BCFIPS on Java 25. Code and CI work could progress, but documentation could not simply claim a supported FIPS configuration without a matching validated provider/runtime combination.
This highlights how Keycloak’s Java upgrade path can become coupled to the validation lifecycle of a single cryptographic provider.
All reactions