Skip to content

Conversation

kezhuw
Copy link
Member

@kezhuw kezhuw commented Aug 17, 2025

NettyServerCnxnFactory uses TrustManager from X509AuthenticationProvider
if ssl.authProvider is configured. But clientHostnameVerificationEnabled
is explicitly set to false in construction of X509AuthenticationProvider.

This cause the server skip hostname verification agaist client
certificate.

This is reproducible in case of following server configs:

  • zookeeper.ssl.hostnameVerification: true
  • zookeeper.ssl.clientHostnameVerification: true
  • zookeeper.fips-mode: false
  • zookeeper.ssl.authProvider: x509

@kezhuw kezhuw force-pushed the ZOOKEEPER-4958-client-server-hostname-verification branch from 65e0089 to c2a44bf Compare August 17, 2025 07:31
@kezhuw
Copy link
Member Author

kezhuw commented Aug 17, 2025

It contains changes of #2300 and #2302 for now.

kezhuw added 2 commits August 28, 2025 11:36
Since, `ZooKeeperServerEmbedded` could bind to port 0 and get unused
port from system. It would be good to export the bound client port in
addition to `getConnectionString`.
… ssl.authProvider configured

`NettyServerCnxnFactory` uses `TrustManager` from `X509AuthenticationProvider`
if `ssl.authProvider` is configured. But `clientHostnameVerificationEnabled`
is explicitly set to `false` in construction of `X509AuthenticationProvider`.

This cause the server skip hostname verification agaist client
certificate.

This is reproducible in case of following server configs:

* zookeeper.ssl.hostnameVerification: true
* zookeeper.ssl.clientHostnameVerification: true
* zookeeper.fips-mode: false
* zookeeper.ssl.authProvider: x509
@kezhuw kezhuw force-pushed the ZOOKEEPER-4958-client-server-hostname-verification branch from c2a44bf to 6f53980 Compare August 28, 2025 03:37
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