Skip to content
This repository was archived by the owner on Nov 29, 2021. It is now read-only.

Feature: Redact / sanitize cookies #30

Closed
jblotus opened this issue Oct 23, 2018 · 2 comments
Closed

Feature: Redact / sanitize cookies #30

jblotus opened this issue Oct 23, 2018 · 2 comments

Comments

@jblotus
Copy link
Contributor

jblotus commented Oct 23, 2018

$context['request']['cookies'] = $_COOKIE;

Ran into issues where I have jwt tokens stored using cookies and that info is being sent off to the APM. While hunting around to see how other agents handled this I came across this pull request for the go agent. Also I had to make sure I wasn't sending HTTP_AUTHORIZATION and HTTP_COOKIE via 'env' configuration.

elastic/apm-agent-go@fad1cec

At the very least it would be cool to prevent sending cookies at all, based on user configuration. I do like the approach they took to use a user-configurable regex as well.

Thoughts?

@philkra
Copy link
Owner

philkra commented Nov 6, 2018

hi, that does make sense! it should be something similar as the masking of the env vars (#28)

feel free to make a PR :)

philkra added a commit that referenced this issue Feb 13, 2019
Allow masking cookies, fixes issue #30
@philkra
Copy link
Owner

philkra commented Feb 13, 2019

Done with PR #45

@philkra philkra closed this as completed Feb 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants