-
Notifications
You must be signed in to change notification settings - Fork 600
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
don't log the license key even in debug/audit #2339
Conversation
By default the license key isn't logged given a) the default non-debug log level, and b) the default of not enabling the audit log. While accuracy in those 2 non-default contexts can be useful in general, the inclusion of the license key does not provide much value and can serve to make log data more sensitive than it needs to be. Filter out the license key from all contexts.
There is actually another area that logs the license key, I'm not sure if you want to include it in this PR, or address it separately, but when in debug level logging, we log all the config values from each source the agent receives, so the license key gets logged that way as well
Let me know if there is anything i can help with! |
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.
There is one more place, though this might be covered by the other config change. The audit logs include the license key in the request body payload on connect.
- Ensure the license key is not reported in the settings hash within the connect payload - Ensure the license key is not debug logged via the 'Updating config...' debug log entry - When filtering out the license key from URIs, use an asterisk based mask
@@ -3,6 +3,8 @@ | |||
# frozen_string_literal: true | |||
|
|||
module NewRelic | |||
ASTERISK = '*' |
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.
Nice! After this PR, let's consider replacing the two places the agent references '*'
with this constant.
given the short/simple evaluation involved, perform logic inline as opposed to stored its result in a variable and referencing the variable
SimpleCov Report
|
By default the license key isn't logged given a) the default non-debug log level, and b) the default of not enabling the audit log.
While accuracy in those 2 non-default contexts can be useful in general, the inclusion of the license key does not provide much value and can serve to make log data more sensitive than it needs to be.
Filter out the license key from all contexts.