Remove dead code related to auditing#94114
Merged
albertzaharovits merged 3 commits intoelastic:mainfrom Feb 27, 2023
Merged
Conversation
Collaborator
|
Pinging @elastic/es-security (Team:Security) |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/part-1 |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/packaging-tests-windows-sample |
ywangd
approved these changes
Feb 26, 2023
Comment on lines
+37
to
+38
| public AuditTrailService(@Nullable AuditTrail auditTrail, XPackLicenseState licenseState) { | ||
| this.auditTrail = auditTrail; |
Member
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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!
Contributor
Author
|
Thank you for the review Yang! |
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.
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