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

security(remote_method): redact ingest key in trace level logs #1948

Merged
merged 2 commits into from Jan 16, 2024

Conversation

bizob2828
Copy link
Member

@bizob2828 bizob2828 commented Jan 12, 2024

Description

Updated private _path method to pass in boolean to generate path for remote method. If arg is true it'll redact the ingest key. This is only called when logging certain trace level logs. This does not remove ingest key from collector path or payload in connect and pre-connect as the downstream services lack support for this.

After this PR you see this in logs

{"v":0,"level":10,"name":"newrelic","hostname":"TK46XHNX04","pid":84136,"time":"2024-01-12T21:26:05.878Z","msg":"Posting to https://staging-collector.newrelic.com:443/agent_listener/invoke_raw_method?marshal_format=json&protocol_version=17&license_key=REDACTED&method=agent_settings&run_id=","component":"remote_method","body":"Buffer 26910"}

Related Issues

Fixes NR-214994

@mrickard mrickard self-assigned this Jan 12, 2024
Copy link

codecov bot commented Jan 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (33a59fd) 97.02% compared to head (859e1bc) 97.02%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1948   +/-   ##
=======================================
  Coverage   97.02%   97.02%           
=======================================
  Files         215      215           
  Lines       40253    40258    +5     
=======================================
+ Hits        39054    39062    +8     
+ Misses       1199     1196    -3     
Flag Coverage Δ
integration-tests-16.x 78.88% <37.50%> (-0.02%) ⬇️
integration-tests-18.x 79.13% <37.50%> (-0.03%) ⬇️
integration-tests-20.x 79.13% <37.50%> (-0.04%) ⬇️
unit-tests-16.x 91.10% <100.00%> (+<0.01%) ⬆️
unit-tests-18.x 91.08% <100.00%> (+<0.01%) ⬆️
unit-tests-20.x 91.08% <100.00%> (+<0.01%) ⬆️
versioned-tests-16.x 73.94% <12.50%> (-0.04%) ⬇️
versioned-tests-18.x 73.96% <12.50%> (-0.04%) ⬇️
versioned-tests-20.x 73.97% <12.50%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

mrickard
mrickard previously approved these changes Jan 12, 2024
jsumners-nr
jsumners-nr previously approved these changes Jan 16, 2024
@bizob2828 bizob2828 merged commit 04fee88 into newrelic:main Jan 16, 2024
22 checks passed
Node.js Engineering Board automation moved this from Needs PR Review to Done: Issues recently completed Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Node.js Engineering Board
  
Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

None yet

3 participants