Add more debug info for token_client request
Add the request headers and response body to the debug logs of the token_client request. Request body is omitted because of security reasons of not revealing passwords in the debug logs. Also, response body has sufficient information about the type of the token requested, therefore omitting request headers is ok. Closes-Bug: #1503751 Change-Id: I830364e1df0e34398039442dc003fe46ca1db3a1
This commit is contained in:
@@ -84,7 +84,8 @@ class TokenClient(rest_client.RestClient):
|
||||
|
||||
resp, resp_body = self.raw_request(url, method,
|
||||
headers=headers, body=body)
|
||||
self._log_request(method, url, resp)
|
||||
self._log_request(method, url, resp, req_headers=headers,
|
||||
req_body='<omitted>', resp_body=resp_body)
|
||||
|
||||
if resp.status in [401, 403]:
|
||||
resp_body = json.loads(resp_body)
|
||||
|
@@ -134,7 +134,8 @@ class V3TokenClient(rest_client.RestClient):
|
||||
|
||||
resp, resp_body = self.raw_request(url, method,
|
||||
headers=headers, body=body)
|
||||
self._log_request(method, url, resp)
|
||||
self._log_request(method, url, resp, req_headers=headers,
|
||||
req_body='<omitted>', resp_body=resp_body)
|
||||
|
||||
if resp.status in [401, 403]:
|
||||
resp_body = json.loads(resp_body)
|
||||
|
Reference in New Issue
Block a user