summaryrefslogtreecommitdiff
path: root/keystoneclient/session.py
diff options
context:
space:
mode:
authorTin Lam <tinlam@gmail.com>2017-01-09 10:31:35 -0600
committerSteve Martinelli <s.martinelli@gmail.com>2017-01-09 19:53:53 +0000
commit398c8fb5160a05d4b28fb11147a9a295e11bcf31 (patch)
treeb0d0a3fb2e1532fa61b27b58c5e20105f7cf2ec8 /keystoneclient/session.py
parent8f872e9a56e65ae06ef4dc561bc9fb01172d98d7 (diff)
downloadpython-keystoneclient-398c8fb5160a05d4b28fb11147a9a295e11bcf31.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 (cherry picked from commit 56af8c90ecbb3cb5d29036151108b1e4e7a69bcc)
Diffstat (limited to 'keystoneclient/session.py')
-rw-r--r--keystoneclient/session.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystoneclient/session.py b/keystoneclient/session.py
index 1e08213..9e26b76 100644
--- a/keystoneclient/session.py
+++ b/keystoneclient/session.py
@@ -164,7 +164,7 @@ class Session(object):
def _process_header(header):
"""Redacts 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'))