-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Remove dead code related to auditing #94114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove dead code related to auditing #94114
Conversation
|
Pinging @elastic/es-security (Team:Security) |
|
@elasticmachine run elasticsearch-ci/part-1 |
|
@elasticmachine run elasticsearch-ci/packaging-tests-windows-sample |
ywangd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Linking the PR (#37707) that removed the index audit here for reference.
| public AuditTrailService(@Nullable AuditTrail auditTrail, XPackLicenseState licenseState) { | ||
| this.auditTrail = auditTrail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use NOOP_AUDIT_TRAIL when the pass-in auditTrail is null? I think it's better if we don't have to deal with null within the class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's definitely better to not have to deal with nulls. Problem is that null here means that auditing is not enabled, while NOOP is intended to be used when license level does not allow auditing.
I prefer to not have to deal with the two meanings using the same logger just now...
But thanks for the good point!
|
Thank you for the review Yang! |
This PR removes:
CompositeAuditTrailwhich is designed to fan-out auditing events to multiple logger implementation types. This is not needed because since v7.0 there's only one audit logger implementation, the logfile._xpackuser to read the audit log index.Related: #37707