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,7 +393,13 @@ def wait():
|
|||||||
logging.debug(_('Full set of FLAGS:'))
|
logging.debug(_('Full set of FLAGS:'))
|
||||||
for flag in FLAGS:
|
for flag in FLAGS:
|
||||||
flag_get = FLAGS.get(flag, None)
|
flag_get = FLAGS.get(flag, None)
|
||||||
logging.debug('%(flag)s : %(flag_get)s' % locals())
|
# 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:
|
try:
|
||||||
_launcher.wait()
|
_launcher.wait()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|||||||
Reference in New Issue
Block a user