Repository navigation
Conversation
ikxeno
force-pushed
the
ZOOKEEPER-4922
branch
from
October 12, 2026 18:35
0dc361c to
8db7154
Compare
Record authentication lifecycle events and retain the authenticated principal across failed renewal attempts. Preserve JAAS results when the audit backend throws runtime or linkage errors. Reject conflicting late audit logger configuration before changing the selected backend. Cover enabled, disabled, failed and concurrent initialization and document the audit configuration order.
ikxeno
force-pushed
the
ZOOKEEPER-4922
branch
from
October 13, 2026 09:12
8db7154 to
9c0dbf2
Compare
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.
Problem
ZooKeeper audits znode operations and server startup and shutdown, but JAAS login, logout and Kerberos ticket renewal are missing from the audit log. Authentication and renewal failures have no audit event identifying the principal involved.
Fix
Add
login,logoutandticketRenewalevents through the existing audit provider, enabled byzookeeper.audit.enable.user,operationandresult. The user comes from the authenticated Kerberos principal, a configured JAAS principal or the OS user. Failed renewals keep the identity from the last successful login.RuntimeExceptionandLinkageErrorfrom logger initialization or writes are logged without changing the JAAS result or replacing the originalLoginException.The audit documentation describes the events and logger configuration timing, marked new in 3.10.0.
Tests
LoginAuditTestchecks principal selection, event ordering, failed renewal retries, skipped attempts, logger write failures and conflicting embedded server configuration.LoginAudit*Testclasses exercise disabled auditing, a client login before embedded server startup, failed logger initialization and configuration during initialization.