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

Permit excluding sensitive headers from dump on fatal error #37793

Open
slavak opened this issue Dec 23, 2024 · 4 comments · May be fixed by #37816
Open

Permit excluding sensitive headers from dump on fatal error #37793

slavak opened this issue Dec 23, 2024 · 4 comments · May be fixed by #37816
Assignees
Labels
area/envoy_log enhancement Feature requests. Not bugs or questions. help wanted Needs help!

Comments

@slavak
Copy link

slavak commented Dec 23, 2024

Description:
On fatal error, Envoy will dump a stack trace and additional details about the program state to the log/stderr for debugging purposes. If this happens during handling of a request, the dumped information includes all request headers. This can cause sensitive information to appear in the stderr output.

For example, if the request uses basic authentication, the "Authorization" header containing base64-encoded credentials will be visible in the logs.

These specific prints happen in FilterManager::dumpState, in the line DUMP_DETAILS(filter_manager_callbacks_.requestHeaders()).

As far as I can tell, there is currently no option to disable this functionality. Would it be possible to provide such an option, either as runtime configuration, or even as a build-time setting?

If there is support for this request I don't mind taking a crack at the code, though I don't think I understand it well enough to make the filtering selective. (i.e.: So that it excludes the "Authorization" header but still dumps all the rest.)

@slavak slavak added enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Dec 23, 2024
@phlax
Copy link
Member

phlax commented Dec 23, 2024

note: envoy maintainers will be mostly on vacation until 6th jan

@phlax phlax added area/envoy_log and removed triage Issue requires triage labels Dec 23, 2024
@phlax
Copy link
Member

phlax commented Dec 23, 2024

cc @botengyao @wbpcode

@phlax
Copy link
Member

phlax commented Dec 23, 2024

@slavak this is not the first time this has been requested - would be amazing to get an implementation

@phlax phlax added the help wanted Needs help! label Dec 23, 2024
@agrawroh
Copy link
Contributor

/assign @agrawroh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/envoy_log enhancement Feature requests. Not bugs or questions. help wanted Needs help!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants