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

fix: redact sensitive req/response headers by default #904

Merged

Conversation

vigneshshanmugam
Copy link
Member

@vigneshshanmugam vigneshshanmugam commented Mar 19, 2024

  • fix Support suppressing of sensitive parameters / URLs #468
  • Redacts some of the well known sensitive headers and other Access token related keys that might be accidentally captured by the agent when capturing network information.
  • Cookies are already filtered out by Playwright, But we still get rid of Cookie and Set cookie for the request/response cycle to be on safer side.

@devcorpio
Copy link
Contributor

devcorpio commented Mar 20, 2024

LGTM 🎉 , just added a question

Testing went well:

before the PR changes screenshot

before changes

after the PR changes screenshot

after changes

* https://github.com/elastic/apm/blob/36a5abd49ff156c80cf0c9e2e1eac919873cb18b/specs/agents/sanitization.md?plain=1#L27
*/
const SANITIZE_HEADER_KEYS = [
/^password$/i,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[question]

Is there any reason for not adding all the "default" keys available in the APM document?

default keys

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly because it was an exhaustive set of list and we can introduce these extra headers like credit, card etc incase its required. Also frontend headers differ a lot between the backend transactions which might involve order processing system and other services which makes sense for backend agents.

@vigneshshanmugam vigneshshanmugam merged commit 0b5ffa7 into elastic:main Mar 20, 2024
9 checks passed
@vigneshshanmugam vigneshshanmugam deleted the redact-sensitive-headers branch March 20, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support suppressing of sensitive parameters / URLs
2 participants