-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add doPrivileged section in deprecation logger #81819
Add doPrivileged section in deprecation logger #81819
Conversation
Scripts using deprecation logger can trigger log files rolling over. Scripts also run with a very limited permissions and without doPrivileged section would cause SM exception closes elastic#81708
Pinging @elastic/es-core-infra (Team:Core/Infra) |
final LoggerContextFactory originalFactory = LogManager.getFactory(); | ||
try { | ||
AtomicBoolean supplierCalled = new AtomicBoolean(false); | ||
// mocking the logger used inside DeprecationLogger requires heavy hacking... |
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.
not super proud on how I had to set up that logging configuration but it is not far worse to what we had before https://github.com/elastic/elasticsearch/pull/37281/files#diff-70de5a6ba5c637e7f19c51341417760d6e957beb5a1fa5703049095ea2719ee0R322
Hi @pgomulka, I've created a changelog YAML for you. |
…/elasticsearch into revive_deprecation_do_privilege
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!
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! Thank you for the fast fix!
Scripts using deprecation logger can trigger log files rolling over. Scripts also run with a very limited permissions and without doPrivileged section would cause SM exception closes elastic#81708
💔 Backport failed
You can use sqren/backport to manually backport by running |
@pgomulka the 7.17 branch was created yesterday and it's inconsistent for this to go into 7.16 but not 7.17. I added the v7.17.0 label. Please can you make sure this gets into the 7.17 branch. |
Scripts using deprecation logger can trigger log files rolling over. Scripts also run with a very limited permissions and without doPrivileged section would cause SM exception closes elastic#81708
Scripts using deprecation logger can trigger log files rolling over.
Scripts also run with a very limited permissions and without
doPrivileged section would cause SM exception
closes #81708
gradle check
?