Avoid leaking Authorization request headers in cleartext for Phoenix Controllers#160
Conversation
|
Mmh, tests are failing on CI. I'll have a look. edit : it is the test suite failing for Mysql / Maria DB for all elixir versions. I don't understand this error, but I'll have a look with a local maria db. I believe this to be an existing bug that this PR has uncovered. |
|
Okay, after reading a bit more closely, I'm seeing that this now works with |
Co-authored-by: Chiara Sarta <chiara.sarta@maersk.com>
… MariaDB" This reverts commit 4222b22.
Hello !
Similar to #156 I ran into the issue where my Phoenix application has some controllers that are receiving API requests that use an Authorization header. Similar to how the
ErrorTracker.Integrations.Plugdrops thecookieheader, as it is considered sensitive, I strongly believe that we should avoid storing and showing theAuthorizationheader in clear text, as this could allow for an attacker to escalate privileges and hop from one system to another.For now all I've done is the following
ErrorTracker.Integrations.PlugErrorTracker.Integrations.Plugto avoid logging theAuthorizationandCookieheadersGiven that there wasn't any existing tests for this module, I'm open to feedback to make these tests more sensible to other users of this codebase.
I'd also like to consider, in a follow-up PR, to obfuscate, rather than avoid logging. In the context for an error occurrence, we would see something like the following
Fixes #156
Fixes #150