From 5d034e58bff22db7d694b4245d88c67349fa3041 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Wed, 8 Oct 2014 08:45:22 +0200 Subject: [PATCH] Hide auth_token and new_pass mask_password will be used in oslo.messaging on the message payload soon. We mask auth_token and new_pass field to have the same behavior as the current oslo.messaging fix_password method. Change-Id: Ic7904793d29b323575b77a42f5c637c29e32cd43 Closes-Bug: #1378647 --- oslo/utils/strutils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oslo/utils/strutils.py b/oslo/utils/strutils.py index 150d8e9..6c3649f 100644 --- a/oslo/utils/strutils.py +++ b/oslo/utils/strutils.py @@ -51,7 +51,8 @@ SLUGIFY_HYPHENATE_RE = re.compile(r"[-\s]+") # NOTE(flaper87): The following globals are used by `mask_password` -_SANITIZE_KEYS = ['adminPass', 'admin_pass', 'password', 'admin_password'] +_SANITIZE_KEYS = ['adminPass', 'admin_pass', 'password', 'admin_password', + 'auth_token', 'new_pass'] # NOTE(ldbragst): Let's build a list of regex objects using the list of # _SANITIZE_KEYS we already have. This way, we only have to add the new key