Skip to content

Add SASL EXTERNAL authentication for LDAP federation using TLS Registry - #48832

Draft
tsaarni wants to merge 1 commit into
keycloak:mainfrom
Nordix:mutual-tls-for-ldap
Draft

Add SASL EXTERNAL authentication for LDAP federation using TLS Registry#48832
tsaarni wants to merge 1 commit into
keycloak:mainfrom
Nordix:mutual-tls-for-ldap

Conversation

@tsaarni

@tsaarni tsaarni commented May 8, 2026

Copy link
Copy Markdown
Contributor

Note

This is PoC for SASL EXTERNAL client certificate authentication for LDAP federation using Quarkus TLS registry.
#7365 (comment)

This change adds support for SASL EXTERNAL method, using x509 certificate as client credentials for LDAP federation. It works with both: LDAPS and LDAP + StartTLS.

This is much simplified successor of #7365, replacing the custom KeyStore SPI proposal with the Quarkus TLS Registry which includes similar functionality and much more (e.g. cipher suite config). As there is no prior precedent for using the TLS registry inKeycloak, configuration happens at the Quarkus level. Example via environment variables:

QUARKUS_TLS_LDAP_KEY_STORE_PEM__0__CERT=/path/to/ldap-admin.pem
QUARKUS_TLS_LDAP_KEY_STORE_PEM__0__KEY=/path/to/ldap-admin-key.pem
QUARKUS_TLS_LDAP_RELOAD_PERIOD=10s

For trusted certificate KC_TRUSTSTORE_PATHS is used (link).

See also #48879 for another PoC which uses Java default keystore for the same goal. In my opinion, Quarkus TLS Registry is superior because the Java default keystore leaks client credentials to every socket created with the default factory. This solution also supports options like PEM files, which aligns with existing Keycloak TLS configurations.

Fixes #11725

Signed-off-by: Tero Saarni <tero.saarni@est.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for SASL EXTERNAL authentication for LDAP federation

2 participants