From cecf061e6e4f666104170e3bba93fdae24255309 Mon Sep 17 00:00:00 2001 From: whoami-rajat Date: Wed, 4 Oct 2023 17:42:31 +0000 Subject: [PATCH] Mask chapsecret Doesn't mask chapsecre >>> strutils.mask_password("'chapsecre' : 'aaaaa'") "'chapsecre' : 'aaaaa'" Masks chapsecret >>> strutils.mask_password("'chapsecret' : 'aaaaa'") "'chapsecret' : '***'" Closes-Bug: #2038466 Change-Id: Iae22a544ff69069b1b82b6ab3a885f3a19869287 --- oslo_utils/strutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo_utils/strutils.py b/oslo_utils/strutils.py index 2eb88fa8..568b63ce 100644 --- a/oslo_utils/strutils.py +++ b/oslo_utils/strutils.py @@ -76,7 +76,7 @@ _SANITIZE_KEYS = ['adminpass', 'admin_pass', 'password', 'admin_password', 'designaterndckey', 'cephadminkey', 'heatauthencryptionkey', 'cephclientkey', 'keystonecredential', 'barbicansimplecryptokek', 'cephrgwkey', 'swifthashsuffix', - 'migrationsshkey', 'cephmdskey', 'cephmonkey'] + 'migrationsshkey', 'cephmdskey', 'cephmonkey', 'chapsecret'] # 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