Closed
Description
Describe the bug
From the spec:
Captured request and response headers, cookies, and form bodies MUST be sanitised (i.e. secrets removed) according to data sanitization rules.
However, this only happens for the http.request.cookies
property, not the Cookie
header.
It's possible to mitigate the issue just by extending ELASTIC_APM_SANITIZE_FIELD_NAMES
with cookie
wildcard, but that's different from the default agent behaviour
Steps to reproduce
It is enough just to inspect any transaction containing Cookie
header with session
, or any other sensitive key
Expected behaviour
One of the following behaviours needs to be implemented:
- removing the
Cookie
header after adding thecookie
property (like it's done in java agent - link) - sanitizing Cookie header (like it's done in nodejs agent)
Environment
- OS: linux
- Ruby version: 3.1.2
- Framework and version: 6.1.7.3
- APM Server version: 7.16.3
- Agent version: 4.6.2