Skip to content

Commit

Permalink
Do not leak password (#9637)
Browse files Browse the repository at this point in the history
  • Loading branch information
hithwen authored Jul 19, 2021
1 parent 18eb1d3 commit 0e302f6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import copy
from os import environ

import requests
Expand Down Expand Up @@ -476,8 +477,10 @@ def _post_auth_token(logger, keystone_endpoint, identity, requests_wrapper, scop
return resp

except (requests.exceptions.HTTPError, requests.exceptions.Timeout, requests.exceptions.ConnectionError):
safe_identity = copy.deepcopy(identity)
safe_identity['password']['user']['password'] = '********'
msg = "Failed keystone auth with identity:{identity} scope:{scope} @{url}".format(
identity=identity, scope=scope, url=auth_url
identity=safe_identity, scope=scope, url=auth_url
)
logger.debug(msg)
raise KeystoneUnreachable(msg)
Expand Down

0 comments on commit 0e302f6

Please sign in to comment.