Skip to content

ZOOKEEPER-5070: Support Single EKU certificates - #2429

Open
PDavid wants to merge 2 commits into
apache:masterfrom
PDavid:ZOOKEEPER-5070-single-eku
Open

ZOOKEEPER-5070: Support Single EKU certificates#2429
PDavid wants to merge 2 commits into
apache:masterfrom
PDavid:ZOOKEEPER-5070-single-eku

Conversation

@PDavid

@PDavid PDavid commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Goal

Support certificates with a single Extended Key Usage (EKU) - one cert with serverAuth for incoming connections, another with clientAuth for outgoing connections

Approach

Use separate SSLContext instances for client and server role instead of one. Each is initialized with standard PKIX managers from its own keystore / truststore.

If these new properties are not set, ZooKeeper falls back to the existing keyStore.* and trustStore.* configs (shared for both roles), so the change is fully backward-compatible.

Configuration changes

Introduces the following new config properties:

Client keystore

Presented when initiating connections (client role). Allows using a certificate with only clientAuth EKU.

zookeeper.ssl.client.keyStore.location=/etc/zookeeper/certs/client-keystore.jks
zookeeper.ssl.client.keyStore.password=clientKeystorePass
zookeeper.ssl.client.keyStore.type=JKS

Server truststore

Used when accepting connections (server role). Validates the connecting client's certificate during mTLS.

zookeeper.ssl.server.trustStore.location=/etc/zookeeper/certs/server-truststore.jks
zookeeper.ssl.server.trustStore.password=serverTruststorePass
zookeeper.ssl.server.trustStore.type=JKS

Quorum client keystore

zookeeper.ssl.quorum.client.keyStore.location=/etc/zookeeper/certs/quorum-client-keystore.jks
zookeeper.ssl.quorum.client.keyStore.password=quorumClientKeystorePass

Quorum server truststore (validates clients when accepting connections)

zookeeper.ssl.quorum.server.trustStore.location=/etc/zookeeper/certs/quorum-server-truststore.jks
zookeeper.ssl.quorum.server.trustStore.password=quorumServerTruststorePass

PDavid and others added 2 commits August 18, 2026 15:53
Added client keystore, server truststore config
…pport

Replace custom ClientServerX509KeyManager and ClientServerX509TrustManager
wrappers with two separate SSLContext instances — one for client role
(outgoing connections) and one for server role (incoming connections).

The custom wrappers were passed to SSLContext.init(), which is rejected by
JVM-level FIPS providers that only accept their own validated manager
implementations. The new approach initializes each context with standard
PKIX managers from their respective keystores, making single-EKU
certificate support fully FIPS-compatible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@PDavid
PDavid force-pushed the ZOOKEEPER-5070-single-eku branch from bad8dd7 to d056eeb Compare August 18, 2026 13:54
@PDavid
PDavid marked this pull request as ready for review August 19, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant