From: Michael J Fork Date: Mon, 4 Feb 2013 15:27:37 +0000 (+0000) Subject: Mark password config options with secret X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=664869d8431255e0dbda75365da7a7b0d791988a;p=openstack-build%2Fneutron-build.git Mark password config options with secret Config object supports masking values when writing out if the secret flag is set on the option definition. This change flags all quantum options containing a password. Change-Id: I68d9bf80c673acc72db22dc2c6907ee180dcc605 --- diff --git a/quantum/agent/dhcp_agent.py b/quantum/agent/dhcp_agent.py index 5631f4235..0167e55e7 100644 --- a/quantum/agent/dhcp_agent.py +++ b/quantum/agent/dhcp_agent.py @@ -410,7 +410,8 @@ class DeviceManager(object): cfg.StrOpt('admin_user', help=_("Admin username")), cfg.StrOpt('admin_password', - help=_("Admin password")), + help=_("Admin password"), + secret=True), cfg.StrOpt('admin_tenant_name', help=_("Admin tenant name")), cfg.StrOpt('auth_url', diff --git a/quantum/agent/metadata/agent.py b/quantum/agent/metadata/agent.py index 825125dcb..ec144f206 100644 --- a/quantum/agent/metadata/agent.py +++ b/quantum/agent/metadata/agent.py @@ -42,7 +42,8 @@ class MetadataProxyHandler(object): cfg.StrOpt('admin_user', help=_("Admin user")), cfg.StrOpt('admin_password', - help=_("Admin password")), + help=_("Admin password"), + secret=True), cfg.StrOpt('admin_tenant_name', help=_("Admin tenant name")), cfg.StrOpt('auth_url', @@ -58,7 +59,8 @@ class MetadataProxyHandler(object): help=_("TCP Port used by Nova metadata server.")), cfg.StrOpt('metadata_proxy_shared_secret', default='', - help=_('Shared secret to sign instance-id request')) + help=_('Shared secret to sign instance-id request'), + secret=True) ] def __init__(self, conf): diff --git a/quantum/debug/debug_agent.py b/quantum/debug/debug_agent.py index 27c3f69f7..de874f1d5 100644 --- a/quantum/debug/debug_agent.py +++ b/quantum/debug/debug_agent.py @@ -40,7 +40,8 @@ class QuantumDebugAgent(): cfg.StrOpt('admin_user', help=_("Admin user")), cfg.StrOpt('admin_password', - help=_("Admin password")), + help=_("Admin password"), + secret=True), cfg.StrOpt('admin_tenant_name', help=_("Admin tenant name")), cfg.StrOpt('auth_url', diff --git a/quantum/plugins/bigswitch/plugin.py b/quantum/plugins/bigswitch/plugin.py index 9cfb2aaad..5105da748 100644 --- a/quantum/plugins/bigswitch/plugin.py +++ b/quantum/plugins/bigswitch/plugin.py @@ -70,7 +70,8 @@ restproxy_opts = [ help=_("A comma separated list of servers and port numbers " "to proxy request to.")), cfg.StrOpt('serverauth', default='username:password', - help=_("Server authentication")), + help=_("Server authentication"), + secret=True), cfg.BoolOpt('serverssl', default=False, help=_("Use SSL to connect")), cfg.BoolOpt('syncdata', default=False, diff --git a/quantum/plugins/metaplugin/common/config.py b/quantum/plugins/metaplugin/common/config.py index cf0e354f8..b92541c69 100644 --- a/quantum/plugins/metaplugin/common/config.py +++ b/quantum/plugins/metaplugin/common/config.py @@ -37,7 +37,8 @@ proxy_plugin_opts = [ cfg.StrOpt('admin_user', help=_("Admin user")), cfg.StrOpt('admin_password', - help=_("Admin password")), + help=_("Admin password"), + secret=True), cfg.StrOpt('admin_tenant_name', help=_("Admin tenant name")), cfg.StrOpt('auth_url',