Do not write passwords to verbose logs. bug 916167
Look for _key and _password in flag names Change-Id: Ic0c43ad70db0b9f819219e8ca4966908e48b50c9
This commit is contained in:
@@ -393,6 +393,12 @@ def wait():
|
||||
logging.debug(_('Full set of FLAGS:'))
|
||||
for flag in FLAGS:
|
||||
flag_get = FLAGS.get(flag, None)
|
||||
# hide flag contents from log if contains a password
|
||||
# should use secret flag when switch over to openstack-common
|
||||
if ("_password" in flag or "_key" in flag or
|
||||
(flag == "sql_connection" and "mysql:" in flag_get)):
|
||||
logging.debug('%(flag)s : FLAG SET ' % locals())
|
||||
else:
|
||||
logging.debug('%(flag)s : %(flag_get)s' % locals())
|
||||
try:
|
||||
_launcher.wait()
|
||||
|
||||
Reference in New Issue
Block a user