diff options
author | Tin Lam <tinlam@gmail.com> | 2017-01-09 10:31:35 -0600 |
---|---|---|
committer | Tin Lam <tinlam@gmail.com> | 2017-01-09 10:31:35 -0600 |
commit | 56af8c90ecbb3cb5d29036151108b1e4e7a69bcc (patch) | |
tree | f3a54ee79aeb9c7b738ee68fd41dfcd6d8930579 /keystoneclient/session.py | |
parent | 1112abe54b126d390fc3600e07b813dfee3a736a (diff) | |
download | python-keystoneclient-56af8c90ecbb3cb5d29036151108b1e4e7a69bcc.tar.gz |
X-Serivce-Token should be hashed in the log
Currently, logs display the hash values of X-Auth-Token,
Authorization, and X-Subject-Token, but not the value of
the X-Service-Token. This patch set adds the X-Service-Token
to the list of header fields to be hashed for logging purposes.
Change-Id: Iaa3a27f4b6c3baf964fa0c71328ffe9df43b2c0a
Closes-Bug: #1654847
Diffstat (limited to 'keystoneclient/session.py')
-rw-r--r-- | keystoneclient/session.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/keystoneclient/session.py b/keystoneclient/session.py index 0f57383..2501120 100644 --- a/keystoneclient/session.py +++ b/keystoneclient/session.py @@ -166,7 +166,7 @@ class Session(object): def _process_header(header): """Redact the secure headers to be logged.""" secure_headers = ('authorization', 'x-auth-token', - 'x-subject-token',) + 'x-subject-token', 'x-service-token') if header[0].lower() in secure_headers: token_hasher = hashlib.sha1() token_hasher.update(header[1].encode('utf-8')) |