swift/etc
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
..
account-server.conf-sample Allow floats for all intervals 2021-05-05 15:30:21 -07:00
container-reconciler.conf-sample container-reconciler: support multiple processes 2021-07-21 11:45:01 -07:00
container-server.conf-sample sharder: Make stats interval configurable 2021-10-01 14:35:09 -07:00
container-sync-realms.conf-sample Allow floats for all intervals 2021-05-05 15:30:21 -07:00
dispersion.conf-sample Fix swift-dispersion in multi-region setups 2016-06-01 15:35:47 +02:00
drive-audit.conf-sample py3: Fix swift-drive-audit 2019-10-13 21:55:58 -07:00
internal-client.conf-sample Modify log_name in internal clients' pipeline configs 2022-01-12 11:07:25 +00:00
keymaster.conf-sample py3: Work with proper native string paths in crypto meta 2020-07-29 17:33:54 -07:00
memcache.conf-sample Memcached client TLS support 2021-01-06 09:47:38 -08:00
mime.types-sample PEP 8 compliance and small modification to mime.types file 2010-11-23 19:26:02 -06:00
object-expirer.conf-sample Allow floats for all intervals 2021-05-05 15:30:21 -07:00
object-server.conf-sample Finer grained ratelimit for update 2022-01-06 12:47:09 -08:00
proxy-server.conf-sample Trim sensitive information in the logs (CVE-2017-8761) 2022-02-09 10:53:46 +00:00
rsyncd.conf-sample Update SAIO & docker image to use 62xx ports 2020-07-20 15:17:12 -07:00
swift-rsyslog.conf-sample Add sample rsyslog.conf. 2013-06-25 10:24:26 +08:00
swift.conf-sample Update docs to discourage policy names being numbers 2021-03-26 09:17:34 +00:00