Fix to encrypt password print in debug logs
In the case of OpenStack VIM registration, tacker/event_alarm.py
prints request details along with the password of the user in
tacker debug logs.
This patch encrypts sensitive information such as passwords in
log messages.
Closes-Bug:
@@ -17,6 +17,7 @@ from urllib import parse
from oslo_config import cfg
from oslo_log import log as logging
from oslo_serialization import jsonutils
+from oslo_utils import strutils
from tacker._i18n import _
from tacker.vnfm.monitor_drivers.token import Token
@@ -48,7 +49,7 @@ def config_opts():
class AlarmReceiver(wsgi.Middleware):
def process_request(self, req):
- LOG.debug('Process request: %s', req)
+ LOG.debug('Process request: %s', strutils.mask_password(req))
if req.method != 'POST':
return
url = req.url
