Remove password display for rabbitmq on connection log

When start karbor-protection and karbor-operationengine service,
Karbor will log rabbitmq password if debug is enabled. In a
production environment, this is pretty bad. This patch will fix it.

Change-Id: I11bd6db001739869fc6cddd005c9990d2943b809
Closes-Bug: #1859540
This commit is contained in:
wangyu 2020-01-14 10:33:38 +08:00
parent 95c1a0e7e2
commit a0415ae7f5
1 changed files with 1 additions and 0 deletions

View File

@ -417,6 +417,7 @@ def wait():
# 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 == "transport_url" and "rabbit:" in flag_get) or
(flag == "sql_connection" and
("mysql:" in flag_get or "postgresql:" in flag_get))):
LOG.debug('%s : FLAG SET ', flag)