diff --git a/releasenotes/notes/omit_X-Subject-Token_from_log-1bf5fef88c80334b.yaml b/releasenotes/notes/omit_X-Subject-Token_from_log-1bf5fef88c80334b.yaml new file mode 100644 index 0000000000..51c8f79e00 --- /dev/null +++ b/releasenotes/notes/omit_X-Subject-Token_from_log-1bf5fef88c80334b.yaml @@ -0,0 +1,7 @@ +--- +security: + - | + The x-subject-token of a response header is ommitted from log, + but clients specify the same token on a request header on + Keystone API and that was not omitted. In this release, + that has been omitted for a security reason. diff --git a/tempest/lib/common/rest_client.py b/tempest/lib/common/rest_client.py index 22276d4d4f..bc9cfe22ea 100644 --- a/tempest/lib/common/rest_client.py +++ b/tempest/lib/common/rest_client.py @@ -416,6 +416,8 @@ class RestClient(object): resp_body=None, extra=None): if 'X-Auth-Token' in req_headers: req_headers['X-Auth-Token'] = '' + if 'X-Subject-Token' in req_headers: + req_headers['X-Subject-Token'] = '' # A shallow copy is sufficient resp_log = resp.copy() if 'x-subject-token' in resp_log: