KAFKA-14605: Change audit log level in StandardAuthorizer - #23223
Open
hulincup wants to merge 2 commits into
Open
KAFKA-14605: Change audit log level in StandardAuthorizer#23223hulincup wants to merge 2 commits into
hulincup wants to merge 2 commits into
Conversation
Change log level to INFO when logIfAllowed is set (was DEBUG), and to WARN when logIfDenied is set (was INFO). Audit logs are security-critical and should be visible at default log levels. DEBUG is too verbose for INFO, and INFO is not prominent enough for security denials.
- Update StandardAuthorizerTest to verify INFO for ALLOWED and WARN for DENIED - Update security-model.md to reflect new log level contract: INFO logs allowed requests, WARN logs denied requests
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.
What changes were proposed in this pull request?
Change the audit log level in StandardAuthorizerData:
Why are the changes needed?
Audit logs are security-critical and should be visible at default log levels.
Currently:
After this change:
Did this PR include tests?
Yes. Updated StandardAuthorizerTest:
Documentation
Updated docs/security/security-model.md to reflect the new log level contract:
Performance Considerations
The default log4j2.yaml sets kafka.authorizer.logger to INFO. After this change, ALLOWED operations will be logged by default on brokers with ACLs enabled. This increases audit visibility but also increases log volume. Operators who want the previous behavior can set the logger level to WARN.
Fixes: KAFKA-14605