Skip to content

P10: Port ACL dry-run mode to ZooKeeper 3.8.7 - #186

Merged
bellatrix007 merged 6 commits into
li-dev/base-3.8.7from
adbansal/zk-387-p10-acl-dry-run
Dec 3, 2026
Merged

bellatrix007 merged 6 commits into
li-dev/base-3.8.7from
adbansal/zk-387-p10-acl-dry-run

Conversation

@bellatrix007

@bellatrix007 bellatrix007 commented Nov 23, 2026 •

Copy link
Copy Markdown

Description

Port #163 to ZooKeeper 3.8.7 on li-dev/base-3.8.7, following the merged #185. Add zookeeper.skipACL=dryrun: evaluate ACLs, log checks that would end in NOAUTH, and allow the request to proceed. This is not a no-write simulation; allowed requests execute normally.

  • no (default) and unrecognized values enforce ACLs.
  • yes retains the existing bypass without ACL evaluation.
  • dryrun retains matching/evaluation but replaces the final NOAUTH rejection with a WARN. Other error/check paths are not broadly suppressed.

Diagnostics include path, requested permission, session ID, client address, and scheme:user descriptions of client identities and node ACLs. Standard digest password hashes and unrecognized-provider credential strings are omitted. Forwarded requests retain their request session ID and P09 identity context even when there is no local client connection.

Differences from branch-3.6 at 9d245933379762dc83e8f44934ac1d80b7c55897:

  • No intentional change to P10's runtime mode policy or diagnostic implementation. The mode initializer and four ACL/diagnostic methods match the fork apart from comments/formatting.
  • Retain the surrounding 3.8.7 quota, audit and watch implementations rather than copying older server code over them. No additional API compatibility layer is introduced.
  • Adapt tests to Jupiter and the target logging fixtures, with additional configuration, permission, identity and diagnostic assertions.
  • Expand documentation to distinguish literal JVM property values from values trimmed by the existing zoo.cfg parser, and to clarify initialization timing and warning contents.

Tests

  • Added/adapted ClientSkipACLDryRunTest and ClientTest; the existing ClientSkipACLTest also runs the shared operation checks. The shared checks include existing-node exists() in enforcing, bypass and dry-run modes. The dry-run diagnostics test isolates the unauthorized exists() READ warning and checks that authorized and missing-node calls do not produce it.

  • Earlier matrix validation, before the additional exists() assertions: selected baseline and ACL/identity/diagnostic/quota/audit suites passed 95 cases on each of Java 8/11/17: 285 passed executions, zero failures/errors/skips/automatic reruns.

  • Eleven fresh-JVM configuration cases per JDK verify default/enforcing, bypass and dry-run modes, invalid/case/whitespace values, and class-initialization timing. Provider call counts distinguish evaluation from bypass; WARN assertions distinguish a would-be denial from an allowed ACL check.

  • Real local client operations exercise enforcing and permissive modes. Typed SPIFFE/legacy checks and component forwarding tests verify matching direction, missing context and session diagnostics. Standard digest hashes and unknown credential strings are checked for omission from the new diagnostics.

  • The earlier Java 11 assembly/static checks and cross-JDK matrix used runtime/test baseline 763d2ea2; 990d1d54 added the configuration-whitespace documentation clarification.

  • exists() follow-up: 4 focused Java 11 executions passed, zero failures/errors/skips/reruns, using separate JVMs for the three ACL-mode classes. RAT, Checkstyle including tests and server SpotBugs passed. The full suite and Java 8/17 matrix were not rerun for this test-only change.

  • Full upstream/hosted CI, deployed clients, real mixed-version ensembles and rollout qualification remain separate.

  • Local code review completed

Changes that Break Backward Compatibility (Optional)

  • zookeeper.skipACL=dryrun previously behaved like an unrecognized value and enforced ACLs. It now intentionally permits requests that fail ACL authorization. Both permissive modes leave ACL-guarded operations open; dry-run is not an enforcement mode.
  • The property is read once at server-class initialization, so changing it requires a restart. The raw JVM value is case-sensitive and untrimmed; the existing zoo.cfg parser trims configuration values first.
  • Credential-description filtering is not universal log sanitization: WARN path/user text is not explicitly escaped, and pre-existing DEBUG credential logging is unchanged. These are source-policy limitations, not newly claimed protections.

Documentation (Optional)

Updated zookeeperAdmin.md with mode values/defaults, the permissive nature of dry-run, diagnostic fields, initialization timing, JVM-versus-configuration-file whitespace handling, and the upgrade-specific exists() READ-check warning-volume risk.

🤖 Generated with GitHub Copilot CLI


Tests generated with unit-tests plugin

@bellatrix007 bellatrix007 added the upgrade-3.8.x Port of LinkedIn patches onto Apache ZooKeeper 3.8.x label Dec 2, 2026
@bellatrix007
bellatrix007 force-pushed the adbansal/zk-387-p10-acl-dry-run branch from 95f52ba to 7ceb89f Compare December 3, 2026 05:09

@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.

Base automatically changed from adbansal/zk-387-p09-spiffe-identity to li-dev/base-3.8.7 December 3, 2026 09:03
Aditi Bansal and others added 4 commits December 3, 2026 14:34
Port PR163 behavior from branch-3.6 onto the reviewed P09 identity APIs. Preserve enforcing and bypass modes; test isolated configuration parsing, ACL evaluation, credential-safe warnings, and forwarded request identity/session context.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The JVM property is compared literally, while the existing configuration parser trims values before setting it. No runtime or test changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clarify the READ permission check for existing znodes when upgrading from 3.6.3-35 to 3.8.7. Describe the conditional WARN-volume risk without claiming a measured operation mix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Exercise existing-node exists requests in enforcing, bypass and dry-run mode. Isolate the dry-run READ warning and verify authorized and missing-node requests do not emit it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bellatrix007
bellatrix007 force-pushed the adbansal/zk-387-p10-acl-dry-run branch from 7ceb89f to 9463340 Compare December 3, 2026 09:04
Aditi Bansal and others added 2 commits December 3, 2026 15:10
Require an explicit successful sync as well as a zero client exit status. Preserve per-direction client/server diagnostics and upload them on failures. Add hermetic harness regression tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This reverts commit 281f05e at the user request. Restore the prior CI harness and workflow; keep the retained diagnostic evidence outside the repository.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bellatrix007
bellatrix007 merged commit 389a04c into li-dev/base-3.8.7 Dec 3, 2026
24 checks passed
@bellatrix007
bellatrix007 deleted the adbansal/zk-387-p10-acl-dry-run branch December 3, 2026 12:13
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