Skip to content

P03: Port X509 and znode-group ACL support to ZooKeeper 3.8.7 - #177

Merged
bellatrix007 merged 5 commits into
adbansal/zk-387-p02-backupfrom
adbansal/zk-387-p03-acl
Dec 3, 2026
Merged

bellatrix007 merged 5 commits into
adbansal/zk-387-p02-backupfrom
adbansal/zk-387-p03-acl

Conversation

@bellatrix007

@bellatrix007 bellatrix007 commented Nov 13, 2026 •

Copy link
Copy Markdown

Description

Port configurable SAN identities, watched URI/domain mappings, group/superuser authorization, automatic ACLs and dedicated-domain filtering above #175. Preserve branch-3.6's volatile/non-volatile field declarations, lazy-initialization rationale and SpotBugs suppressions, while retaining required upstream TLS/watch adaptations.

Preserve configured open-read semantics on create and setACL: matching paths receive world:anyone READ even when writers retain supplied ownership ACLs, subject to the existing group-provider, automatic/allowlist and non-dedicated gates.

Tests

  • CI fixture corrections use the TLS listener's IPv4 address with a matching certificate IP SAN, isolate watcher state across read-only clients, and wait for queued-request metrics before asserting them. Production behavior and existing assertions are unchanged; no test cases were added.
  • At e2eb2356, Java 11 test checkstyle:check passed 20 existing cases across RequestThrottlerTest, ReadOnlyModeTest and X509GroupAclIntegrationTest, with no failures/errors/skips or automatic retries. Checkstyle included test sources. The JVM preferred IPv6 addresses with IPv4 forcing disabled; the TLS fixture still uses its explicitly bound IPv4 endpoint and retains hostname verification.
  • Earlier field-parity follow-up (7278cdf7): selected Java 11 clean test run passed 36 tests, with no failures/errors/skips. Selection: X509AuthenticationConfigTest, X509ZNodeGroupAclProviderTest, ZkClientUriDomainMappingHelperTest, TestFixupACL and X509GroupAclIntegrationTest. RAT, Checkstyle including test sources, and SpotBugs passed.
  • Removed the obsolete test that required the additional volatile modifiers; retained configuration-prefix coverage. No new tests were added for this follow-up.
  • Earlier matrix at 3492f002: clean verify passed 103 tests per JDK (8/11/17), 309 total, with no failures/errors/skips. Selection: 27 established baseline cases plus X509AuthTest, X509AuthenticationConfigTest, TestFixupACL, X509ZNodeGroupAclProviderTest, ZkClientUriDomainMappingHelperTest, X509GroupAclIntegrationTest, PersistentWatcherACLTest, ACLTest and ClientSSLTest. Java 11 assembly, RAT, Checkstyle and SpotBugs also passed at that revision. Java 8/17 and assembly were not rerun for 7278cdf7.
  • Source-parity regressions include secure/unified TLS create and setACL: retained owner ALL, other-domain READ, and denied non-owner WRITE/ADMIN.
  • The earlier runs at 3492f002 and 7278cdf7 used process-local -Djava.net.preferIPv4Stack=true; initial Java 8/11 hostname connection timeouts were diagnosed and retained. IPv6 connectivity remains unqualified.
  • Local macOS ARM64 only; no full-suite, Linux or mixed-version qualification.
  • Local code review completed

Changes that Break Backward Compatibility (Optional)

Automatic ACL replacement, configured public READ and dedicated-domain filtering are opt-in access policies. Feature defaults and wire formats are unchanged.

The group-ACL X509 provider now follows Apache 3.8.7 password-file handling: nonempty zookeeper.ssl.keyStore.passwordPath / zookeeper.ssl.trustStore.passwordPath override the corresponding inline zookeeper.ssl.keyStore.password / zookeeper.ssl.trustStore.password values. Password-file read failures propagate as IllegalStateException, without falling back to inline passwords. With no password path configured, inline-password behavior is unchanged.

Documentation (Optional)

The admin guide describes configuration, defaults, mapping-root lifecycle and open-read behavior with retained ownership ACLs.

🤖 Generated with GitHub Copilot CLI

@arkmish arkmish left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provenance notes for P03, compared with the LinkedIn release branch-3.6 (3.6.3-35) and Apache release-3.8.7. They cover three things: Apache 3.8.7 lines this PR changes, LinkedIn behaviour that is not carried over (checked through P14/#190), and LinkedIn comments that were dropped. Items owned by later PRs in the stack (P04/P09/P10/P11) are left for those PRs.

Aditi Bansal and others added 4 commits November 27, 2026 11:32
Reconcile final branch-3.6 P03 behavior with PR #132, excluding SPIFFE and later patch groups. Preserve upstream TLS policy and READ/watch authorization, adapt internal watch callbacks, safely publish lazy state, and restrict open-read ACLs to automatically replaced ACLs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply configured READ prefixes within the existing group-processing gates, independently of per-writer ownership ACL replacement. Cover retained ACL validation and secure/unified TLS create and setACL behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Revert six added volatile modifiers and restore the source rationale and SpotBugs suppressions. Preserve the two originally volatile fields and required 3.8.7 adaptations. Remove the obsolete volatility-specific test while retaining configuration-prefix coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore fork certificate helper signatures and mapping-test ordering and
isolation. Restore explanatory Netty and ACL comments, and clarify the
configuration-key parsing paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bellatrix007
bellatrix007 force-pushed the adbansal/zk-387-p03-acl branch from 034bdaf to 6663ac2 Compare November 27, 2026 06:10
Use the bound IPv4 endpoint and a matching certificate SAN for TLS tests.
Close the previous read-only test client and isolate its replacement watcher.
Wait for the enqueue metric before asserting the throttler request count.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bellatrix007 bellatrix007 added the upgrade-3.8.x Port of LinkedIn patches onto Apache ZooKeeper 3.8.x label Dec 2, 2026

@arkmish arkmish left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for addressing the comments.

@bellatrix007
bellatrix007 merged commit 7e24936 into li-dev/base-3.8.7 Dec 3, 2026
24 checks passed
@bellatrix007
bellatrix007 deleted the adbansal/zk-387-p03-acl branch December 3, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upgrade-3.8.x Port of LinkedIn patches onto Apache ZooKeeper 3.8.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants