From 389bd83aaf246a84e7d0992fffa8a3c98194c037 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 14 Nov 2023 20:58:45 +0900 Subject: [PATCH] Storage URIs should be secret ... because these can contain password as its element. Change-Id: Id570941ee3b02e7b60ca3330c36edb8f0f9f56fc --- zaqar/conf/drivers_management_store_mongodb.py | 1 + zaqar/conf/drivers_management_store_redis.py | 1 + zaqar/conf/drivers_management_store_sqlalchemy.py | 4 +++- zaqar/conf/drivers_message_store_mongodb.py | 1 + zaqar/conf/drivers_message_store_redis.py | 4 +++- zaqar/conf/drivers_message_store_swift.py | 1 + 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/zaqar/conf/drivers_management_store_mongodb.py b/zaqar/conf/drivers_management_store_mongodb.py index 782fe7789..5bed2eb16 100644 --- a/zaqar/conf/drivers_management_store_mongodb.py +++ b/zaqar/conf/drivers_management_store_mongodb.py @@ -67,6 +67,7 @@ ssl_ca_certs = cfg.StrOpt( uri = cfg.StrOpt( 'uri', + secret=True, deprecated_opts=[cfg.DeprecatedOpt( 'uri', group=_deprecated_group), ], diff --git a/zaqar/conf/drivers_management_store_redis.py b/zaqar/conf/drivers_management_store_redis.py index d6be0c6cf..405b125a0 100644 --- a/zaqar/conf/drivers_management_store_redis.py +++ b/zaqar/conf/drivers_management_store_redis.py @@ -18,6 +18,7 @@ _deprecated_group = 'drivers:storage:redis' uri = cfg.StrOpt( 'uri', default="redis://127.0.0.1:6379", + secret=True, deprecated_opts=[cfg.DeprecatedOpt( 'uri', group=_deprecated_group), ], diff --git a/zaqar/conf/drivers_management_store_sqlalchemy.py b/zaqar/conf/drivers_management_store_sqlalchemy.py index 3de3feb25..dcb2b786c 100644 --- a/zaqar/conf/drivers_management_store_sqlalchemy.py +++ b/zaqar/conf/drivers_management_store_sqlalchemy.py @@ -17,7 +17,9 @@ from oslo_config import cfg _deprecated_group = 'drivers:storage:sqlalchemy' uri = cfg.StrOpt( - 'uri', default='sqlite:///:memory:', + 'uri', + default='sqlite:///:memory:', + secret=True, deprecated_opts=[cfg.DeprecatedOpt( 'uri', group=_deprecated_group), ], diff --git a/zaqar/conf/drivers_message_store_mongodb.py b/zaqar/conf/drivers_message_store_mongodb.py index 314023a35..a32cc754e 100644 --- a/zaqar/conf/drivers_message_store_mongodb.py +++ b/zaqar/conf/drivers_message_store_mongodb.py @@ -67,6 +67,7 @@ ssl_ca_certs = cfg.StrOpt( uri = cfg.StrOpt( 'uri', + secret=True, deprecated_opts=[cfg.DeprecatedOpt( 'uri', group=_deprecated_group), ], diff --git a/zaqar/conf/drivers_message_store_redis.py b/zaqar/conf/drivers_message_store_redis.py index 1584d8e18..689f4329d 100644 --- a/zaqar/conf/drivers_message_store_redis.py +++ b/zaqar/conf/drivers_message_store_redis.py @@ -17,7 +17,9 @@ _deprecated_group = 'drivers:storage:redis' uri = cfg.StrOpt( - 'uri', default="redis://127.0.0.1:6379", + 'uri', + default="redis://127.0.0.1:6379", + secret=True, deprecated_opts=[cfg.DeprecatedOpt( 'uri', group=_deprecated_group), ], diff --git a/zaqar/conf/drivers_message_store_swift.py b/zaqar/conf/drivers_message_store_swift.py index f9e2d0a3a..0849e2645 100644 --- a/zaqar/conf/drivers_message_store_swift.py +++ b/zaqar/conf/drivers_message_store_swift.py @@ -21,6 +21,7 @@ auth_url = cfg.StrOpt( uri = cfg.StrOpt( "uri", default="swift://demo:nomoresecrete@/demo", + secret=True, help="Custom URI describing the swift connection.")