8000 PEM server identity suppresses custom HTTPS truststore type in 26.8.2 · Issue #55500 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

PEM server identity suppresses custom HTTPS truststore type in 26.8.2 #55500

Backlog

Description

@trixpan

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-password

Change 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).

Activity

  1. added
    kind/bug
    on Nov 25, 2026
  2. added theissue type on Nov 25, 2026
  3. added
    area/core
    on Nov 25, 2026
  4. trixpan commented on Nov 26, 2026

    @trixpan
    ContributorAuthor

    @vmuzikar this is vaguely related to #54468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/corekind/bugstatus/triageteam/core-shared

    Type

    Fields

    No fields configured for bug.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0