Conversation
Decode typed requests without changing their buffers, cover TTL writes, correlate multi members by position and distinguish atomic rollback from commit. Add safe enhanced ACL metadata, deletion identity and observable audit failures while retaining legacy logging defaults. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use validated concrete built-in authentication providers for enhanced user extraction, redact custom and unknown identity representations, and preserve legacy behavior. Cover the registered default-getUserName leak with real client authentication. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Report audit failures through independently best-effort counter and diagnostic operations without recursive retries. Verify an applied write still receives success and multiple system deletions complete when both the audit sink and error counter fail. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Carry the captured enhanced mode into event construction without rereading the property. Preserve public delegating overloads and keep every multi parent/member on the same mode. Cover deterministic ACL off-to-on and multi mode transitions with subsequent genuine v2 emission. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 28, 2026
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
Make audit records useful for diagnosing large writes and failed or rolled-back mutations without changing the client's operation result.
Enhanced logging adds
schema_version=2, attempteddata_length, knownerror_code, transaction identifiers, and an explicitoutcomeofcommitted,failed,rolled_back, orunknown.setData; retain the original request buffer's position, limit, and mark.audit_errorscounter.Enablement requires both
zookeeper.audit.enable=trueandzookeeper.audit.enhanced.enable=true. Both default to false.Tests
Validated
AuditHelperTest,AuditEventTest,StandaloneServerAuditTest,Slf4JAuditLoggerTest,CreateTTLTest,ServerMetricsTest,DataTreeTest, andAuthUtilTeston JDK 11 with Java 8 API targeting:Coverage includes real write results, atomic multi rollback, payload-size boundaries, typed TTL handling, buffer preservation, custom-provider redaction, logger/counter failures, and deterministic mode changes during emission.
Changes that Break Backward Compatibility (Optional)
Default audit output and existing public logging overloads are preserved. Enhanced mode is opt-in and adds versioned fields and conservative identity redaction; consumers must be prepared before it is enabled.
No authentication/ACL decision, client response, persistence-format, or ordinary-read auditing change.
committeddescribes transaction application, not client delivery. The error counter cannot detect silent asynchronous-appender or downstream log loss.Documentation (Optional)
Updated
zookeeper-docs/src/main/resources/markdown/zookeeperAuditLogs.mdwith fields, escaping, operation/outcome semantics, privacy requirements, rollout guidance, and coverage limits.🤖 Generated with GitHub Copilot CLI