swift/test
Matthew Oliver f2c279bae9 Trim sensitive information in the logs (CVE-2017-8761)
Several headers and query params were previously revealed in logs but
are now redacted:

  * X-Auth-Token header (previously redacted in the {auth_token} field,
    but not the {headers} field)
  * temp_url_sig query param (used by tempurl middleware)
  * Authorization header and X-Amz-Signature and Signature query
    parameters (used by s3api middleware)

This patch adds some new middleware helper methods to track headers and
query parameters that should be redacted by proxy-logging. While
instantiating the middleware, authors can call either:

   register_sensitive_header('case-insensitive-header-name')
   register_sensitive_param('case-sensitive-query-param-name')

to add items that should be redacted. The redaction uses proxy-logging's
existing reveal_sensitive_prefix config option to determine how much to
reveal.

Note that query params will still be logged in their entirety if
eventlet_debug is enabled.

UpgradeImpact
=============
The reveal_sensitive_prefix config option now applies to more items;
operators should review their currently-configured value to ensure it
is appropriate for these new contexts. In particular, operators should
consider reducing the value if it is more than 20 or so, even if that
previously offered sufficient protection for auth tokens.

Co-Authored-By: Tim Burke <tim.burke@gmail.com>
Closes-Bug: #1685798
Change-Id: I88b8cfd30292325e0870029058da6fb38026ae1a
2022-02-09 10:53:46 +00:00
..
cors s3api: Allow CORS preflights for pre-signed URLs 2021-07-14 10:52:12 -07:00
functional s3api: Fix non-ascii MPUs 2022-01-28 21:01:17 -08:00
probe Get rid of pipeline_property 2022-01-27 14:40:27 -08:00
s3api replace md5 with swift utils version 2020-12-15 09:52:55 -05:00
unit Trim sensitive information in the logs (CVE-2017-8761) 2022-02-09 10:53:46 +00:00
__init__.py Quiet more deprecation warnings on py2 2021-03-30 14:02:36 -07:00
debug_logger.py Capture logs when running custom daemons in probe tests 2021-06-24 09:32:38 +01:00
sample.conf fix s3api functional tests 2020-05-15 22:38:04 -07:00