-
Notifications
You must be signed in to change notification settings - Fork 205
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
Sanitize Central config request URI and headers in logs #1471
Conversation
This commit sanitizes the request URI and headers of request to fetch central configuration, to redact username/password info and sensitive headers. - Move sanitization methods to separate Santization helper class. - Add test to assert central config sensitive request details are redacted. - Use Consts.Redacted wherever "[REDACTED]" is needed. Fixes elastic#1376
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
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.
Changes LGTM.
Somewhat related: do we want to maybe change the log level of the log here. We print this as a warning (or even error?) by default and people already asked about it multiple times. When central config is not enabled in Kibana, this is expected and normal behaviour - so at least in that case I think an info log would be enough.
Info log level sounds good. It can probably do with some further refactoring to trim the log down to the essential information, and to detect, if possible, if central config is not enabled and log/not log appropriately. |
This commit uses the log level defined on the FailedToFetchConfigException for logging the exception. This is Debug for 403 and 404 responses and Error for everything else.
I've updated use the log level defined on the |
This commit sanitizes the request URI and headers of
request to fetch central configuration, to redact username/password info
and sensitive headers.
Fixes #1376