Skip to content
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

Prevent license_key value from being written to the agent logs when u… #1653

Merged
merged 3 commits into from Dec 11, 2023

Conversation

jasonjkeller
Copy link
Contributor

@jasonjkeller jasonjkeller commented Dec 9, 2023

…sing debug and/or audit_mode logging

Resolves https://github.com/newrelic/java-agent-integration-tests/issues/223

The license_key value will be replaced with obfuscated when using debug logging:

2023-12-08T16:25:42,436-0800 [23116 44] com.newrelic.agent.deps.org.apache.http.impl.execchain.MainClientExec DEBUG: Executing request POST /agent_listener/invoke_raw_method?method=custom_event_data&license_key=obfuscated&marshal_format=json&protocol_version=17&run_id=BcZAlFahANjoALR0JwJ7_Y HTTP/1.1

or audit mode logging:

2023-12-08T16:18:28,975-0800 [23116 1] com.newrelic INFO: Sent JSON(connect) to: https://staging-collector.newrelic.com:443/agent_listener/invoke_raw_method?method=connect&license_key=obfuscated&marshal_format=json&protocol_version=17, with payload: [{"settings":{...,"license_key":"obfuscated",...},...}]

@jasonjkeller jasonjkeller self-assigned this Dec 9, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2023

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (9f144fd) 70.70% compared to head (405fb08) 70.69%.
Report is 8 commits behind head on main.

Files Patch % Lines
...agent/logging/ApacheCommonsAdaptingLogFactory.java 0.00% 12 Missing ⚠️
...a/com/newrelic/agent/transport/DataSenderImpl.java 0.00% 1 Missing ⚠️
...n/java/com/newrelic/agent/util/LicenseKeyUtil.java 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1653      +/-   ##
============================================
- Coverage     70.70%   70.69%   -0.01%     
- Complexity     9948     9950       +2     
============================================
  Files           827      828       +1     
  Lines         39931    39940       +9     
  Branches       6031     6032       +1     
============================================
+ Hits          28232    28236       +4     
- Misses         8981     8983       +2     
- Partials       2718     2721       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@obenkenobi obenkenobi merged commit 2cbec36 into main Dec 11, 2023
103 checks passed
@jasonjkeller jasonjkeller deleted the NR-184201-obfuscate-license-key-in-logs branch December 11, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants