-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Prevent sensitive request headers from being logged in debug level #9652
Comments
Thanks for raising @nulltrope. In general today we assume that debug/trace logs carry sensitive/trusted information and are primarily used for development, though I think it's reasonable to (optionally) do better here. Marking this as needing a design proposal. |
Hi. I was about to report a similar issue. For sure we need a possibility of specifying sensitive headers through some configuration as there are a variety of different deployment scenarios and some of them find the full authorization logging useful. Also another issue regarding sanitization of config_dump #7365 |
Having similar concerns about the debug logs. Not sure if someone is looking into this. |
FYI: I had an attempt at this issue, to provide way to exclude particular headers from being logged in debug level, in #27579 and #27820. Feedback from #27579 (comment) is that this approach is discouraged, and wrapper script to process logs is encouraged. |
Ultimately, this is how I solved this issue myself. |
We stumbled onto this issue as well. It is common to enable the debug log level for troubleshooting issues, but is can also be impractical to write a wrapper script. Not to mention that many users are unaware that sensitive info is being logged, and might be sending them to 3rd parties. Maybe an easy way to solve this would be to change the level of that particular log to |
Description:
Hey all, first just some quick background before getting into the issue we're experiencing. We wrote a small service that is called by the
ext_authz
filter to perform an OIDC Authorization Flow, and verify existing JWTs stored as cookies in request headers.The JWT cookie contains sensitive information and therefore shouldn't be logged, however we noticed that when envoy is run with
-l debug
, various components will log the full request headers including the JWT, e.g.:and
Normally we don't run our production envoy's with debug level, however there are instances where we will temporarily set the level to debug when troubleshooting issues etc.
I'm wondering if there is some way to exclude particular headers from being logged in debug level? The only documentation I can seem to find for configuring logging is for access logs, not envoy's application logs.
Thanks!
The text was updated successfully, but these errors were encountered: