From d05a8f0a37689c6c44a4d91725a3b14135c07eb4 Mon Sep 17 00:00:00 2001 From: Rohit Jaiswal Date: Mon, 18 May 2015 18:30:50 +0000 Subject: [PATCH] Mask database.event_connection details in logs In notification and collector logs, database connection details are masked, but other connection strings are not. This fix masks the event_connection, metering_connection and alarm_connection strings. Change-Id: Ib1fdc02e0c0d9cca1201f8304db4584d14498de1 Closes-Bug: #1456263 --- ceilometer/storage/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ceilometer/storage/__init__.py b/ceilometer/storage/__init__.py index 8249365c83..d9b8afb0a3 100644 --- a/ceilometer/storage/__init__.py +++ b/ceilometer/storage/__init__.py @@ -50,10 +50,12 @@ OPTS = [ help=("Number of seconds that events are kept " "in the database for (<= 0 means forever).")), cfg.StrOpt('metering_connection', + secret=True, default=None, help='The connection string used to connect to the metering ' 'database. (if unset, connection is used)'), cfg.StrOpt('alarm_connection', + secret=True, default=None, help='The connection string used to connect to the alarm ' 'database. (if unset, connection is used)'), @@ -62,6 +64,7 @@ OPTS = [ help=("Number of seconds that alarm histories are kept " "in the database for (<= 0 means forever).")), cfg.StrOpt('event_connection', + secret=True, default=None, help='The connection string used to connect to the event ' 'database. (if unset, connection is used)'),