From 0fb1b0aabe100bb36d0e4ad6d5a9f96dd8eb6ff6 Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Fri, 11 May 2018 17:13:58 +0100 Subject: [PATCH] Add private_key to the list of sanitized keys Nova's create keypair operation will currently log the generated keypair if debug logs are enabled. Closes-Bug: #1770683 Change-Id: I7f889f0bf254fad43b1e26d32fa145f88c668b39 --- 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 929b34db..c7d0f55d 100644 --- a/oslo_utils/strutils.py +++ b/oslo_utils/strutils.py @@ -58,7 +58,7 @@ SLUGIFY_HYPHENATE_RE = re.compile(r"[-\s]+") _SANITIZE_KEYS = ['adminPass', 'admin_pass', 'password', 'admin_password', 'auth_token', 'new_pass', 'auth_password', 'secret_uuid', 'secret', 'sys_pswd', 'token', 'configdrive', - 'CHAPPASSWORD', 'encrypted_key'] + 'CHAPPASSWORD', 'encrypted_key', 'private_key'] # 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