Repository navigation
P08: Port runtime TLS defaults to ZooKeeper 3.8.7 - #184
Merged
bellatrix007 merged 2 commits intoDec 3, 2026
Merged
bellatrix007 merged 2 commits into
bellatrix007 merged 2 commits into
Conversation
This was referenced Nov 23, 2026
bellatrix007
force-pushed
the
adbansal/zk-387-p08-tls-defaults
branch
from
November 27, 2026 06:10
22608f4 to
fefcfa5
Compare
arkmish
reviewed
Dec 1, 2026
arkmish
left a comment
There was a problem hiding this comment.
This branch inherits P07's (#183) stale pre-e2eb23564a base, causing mvn (full-build-java-tests, 11) to fail on ReadOnlyModeTest.testConnectionEvents (failed job). Please rebase once #183 is rebased onto current #182 HEAD.
Select TLSv1.3 when supported, retain explicit socket and server-engine options, and keep the target FIPS and SSLContext APIs. Add runtime defaults, override, and negotiation regressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain the default-delegation comparison and independently require an enabled TLS 1.3 cipher suite when TLS 1.3 is enabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bellatrix007
force-pushed
the
adbansal/zk-387-p08-tls-defaults
branch
from
December 2, 2026 05:00
fefcfa5 to
0af0cfd
Compare
arkmish
approved these changes
Dec 3, 2026
arkmish
left a comment
There was a problem hiding this comment.
LGTM. Thanks for addressing the comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Port #143 (ZOOKEEPER-4415 / ZOOKEEPER-4912) to 3.8.7, stacked on #183. Select TLSv1.3 when the runtime supports it, otherwise TLSv1.2. When protocol/cipher overrides are absent, use the selected context's default enabled protocols and stop imposing ZooKeeper's hardcoded cipher list.
JDK sockets use JDK cipher defaults; Netty server engines use Netty defaults. Explicit configured socket/server-engine overrides and the target FIPS, hostname-verification, password-file and SSLContext-supplier paths are retained.
The existing Netty client behavior is unchanged: its raw SSLContext engine does not apply
ssl.enabledProtocolsorssl.ciphersuites. This PR does not add an unrelated client override-enforcement fix.Tests
Extended
X509UtilTestwith actual socket/engine defaults, explicit and invalid overrides, and certificate-verified negotiation with default and TLSv1.2-only peers. Pinned the existing renegotiation test to TLSv1.2.Java 11: 374 focused cases plus 181 supplemental baseline/TLS cases passed. Java 8 and 17 each ran a 414-case selected baseline/TLS suite.
Three initial hostname-based client failures were transport errors before TLS. After native hostname routing recovered, the unchanged eight-case SSL client selection passed on each JDK (24 rerun executions). Negative hostname-verification controls still rejected certificate names. Original failed runs are retained, not reported as clean first runs.
Java 11 assembly, RAT, Checkstyle including tests and SpotBugs passed.
All installed JDKs support TLSv1.3; fallback on an older runtime without it is not runtime-qualified. These are selected local suites, not full production or mixed-version rollout qualification.
The additional Netty TLSv1.3 cipher assertion and rebase passed 44 selected Java 11 cases; the strengthened method also passed all 8 parameterized rows on each of Java 8 and 17. RAT, Checkstyle including tests, and SpotBugs passed on Java 11.
Local code review completed
Changes that Break Backward Compatibility (Optional)
X509Util.DEFAULT_PROTOCOLis computed at class initialization, not a compile-time constant. Old binaries can retain the inlined TLSv1.2 value until recompiled; source usages requiring a constant expression need adjustment.getDefaultCipherSuites()andgetDefaultCipherSuitesForJavaVersion()helpers are removed. Upgrading a server does not upgrade separately deployed application client JARs.Documentation (Optional)
Updated the TLS property entries in
zookeeperAdmin.mdwith runtime capability selection, JDK/Netty default distinctions, override scope and client/constant compatibility caveats.🤖 Generated with GitHub Copilot CLI
Tests generated with unit-tests plugin