Repository navigation
Description
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
core
Bug Description
Keycloak 26.8.2 fails to start when a PEM server certificate/key is configured together with a dedicated HTTPS truststore whose type maps to Quarkus's OTHER store category. This is reproducible with JCEKS, which is supplied by the stock JDK: no additional providers, extensions, or Java agents are involved. The same configuration works in 26.7.4.
Server identity and inbound client-certificate trust are independent settings. Using JVM-wide trust as a fallback does not preserve a deployment's separation between broad outbound trust and restricted inbound mTLS trust.
Version
26.8.2 (official container image; latest release at time of testing)
Regression
- The issue is a regression
Expected behavior
Start with the PEM server identity and validate incoming mTLS client certificates against the explicitly configured JCEKS truststore.
Actual behavior
Startup fails with configuration validation errors:
java.util.NoSuchElementException: SRCFG00014: The config property quarkus.tls."keycloak-management-server".trust-store.other.type is required but it could not be found in any config source
java.util.NoSuchElementException: SRCFG00014: The config property quarkus.tls."keycloak-https-server".trust-store.other.type is required but it could not be found in any config source
How to Reproduce?
In an empty directory, create disposable test certificates and a JCEKS truststore (requires OpenSSL, keytool, and Docker):
openssl req -x509 -newkey rsa:2048 -nodes -days 2 \
-subj /CN=localhost -keyout server-key.pem -out server.pem
openssl req -x509 -newkey rsa:2048 -nodes -days 2 \
-subj /CN=test-client -keyout client-key.pem -out client.pem
keytool -importcert -noprompt -alias client -file client.pem \
-keystore trust.jceks -storetype JCEKS -storepass smoke-password
# Allow the container user to read these disposable test fixtures.
chmod a+r server.pem server-key.pem trust.jceks
docker run --rm -v "$PWD:/smoke:ro" quay.io/keycloak/keycloak:26.8.2 \
start-dev --db=dev-file --cache=local --hostname=localhost \
--http-host=0.0.0.0 --https-client-auth=required \
--https-certificate-file=/smoke/server.pem \
--https-certificate-key-file=/smoke/server-key.pem \
--https-trust-store-file=/smoke/trust.jceks \
--https-trust-store-type=JCEKS \
--https-trust-store-password=smoke-passwordChange only the image tag to 26.7.4: startup succeeds.
Anything else?
All four cases below were tested using unmodified official images and the same server identity and trusted client certificate:
| Version | Server identity | Dedicated inbound truststore | Result |
|---|---|---|---|
| 26.8.2 | PEM | JKS | Starts; mTLS HTTPS returns 200 |
| 26.8.2 | PEM | JCEKS | Fails: trust-store.other.type missing |
| 26.8.2 | PKCS12 | JCEKS | Starts; mTLS HTTPS returns 200 |
| 26.7.4 | PEM | JCEKS | Starts; mTLS HTTPS returns 200 |
The successful 26.8.2 PKCS12/JCEKS control also rejects a request without a client certificate.
Source diagnosis: in HttpPropertyMappers, addTrustStoreMappers calls filterOtherStoreType(value, HTTPS_TRUST_STORE_FILE). That overload passes HTTPS_CERTIFICATE_FILE to the helper, which returns null whenever the PEM server certificate is configured. The independent truststore path still maps to trust-store.other.path, but its required type is suppressed.
This behavior appears to have been introduced by #51567 (commit af2d7c4).
Metadata
Metadata
Assignees
Labels
Type
Fields
Projects
- StatusShow more project fieldsOpen
Activity
trixpan commentedon Nov 26, 2026
@vmuzikar this is vaguely related to #54468