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. Change-Id: Iebcd726b081ebfa33332dbfae132638600b5cc87 Closes-Bug: #1903955
This commit is contained in:
@@ -17,6 +17,7 @@ from urllib import parse
|
|||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
from oslo_utils import strutils
|
||||||
|
|
||||||
from tacker._i18n import _
|
from tacker._i18n import _
|
||||||
from tacker.vnfm.monitor_drivers.token import Token
|
from tacker.vnfm.monitor_drivers.token import Token
|
||||||
@@ -48,7 +49,7 @@ def config_opts():
|
|||||||
|
|
||||||
class AlarmReceiver(wsgi.Middleware):
|
class AlarmReceiver(wsgi.Middleware):
|
||||||
def process_request(self, req):
|
def process_request(self, req):
|
||||||
LOG.debug('Process request: %s', req)
|
LOG.debug('Process request: %s', strutils.mask_password(req))
|
||||||
if req.method != 'POST':
|
if req.method != 'POST':
|
||||||
return
|
return
|
||||||
url = req.url
|
url = req.url
|
||||||
|
Reference in New Issue
Block a user