From f583551ea65f2fdc4744acfce99812bd38ca3df7 Mon Sep 17 00:00:00 2001 From: Michael J Fork Date: Mon, 4 Feb 2013 14:51:29 +0000 Subject: [PATCH] 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 cinder options containing a password. Change-Id: Ia0b203417774797c1fe1eaf2946453c9b2509b98 --- cinder/volume/drivers/netapp.py | 3 ++- cinder/volume/drivers/nexenta/volume.py | 3 ++- cinder/volume/drivers/san/hp/hp_3par_common.py | 3 ++- cinder/volume/drivers/san/san.py | 3 ++- cinder/volume/drivers/xenapi/sm.py | 3 ++- cinder/volume/drivers/zadara.py | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cinder/volume/drivers/netapp.py b/cinder/volume/drivers/netapp.py index d3d1316a3..9f4d85eec 100644 --- a/cinder/volume/drivers/netapp.py +++ b/cinder/volume/drivers/netapp.py @@ -47,7 +47,8 @@ netapp_opts = [ help='User name for the DFM server'), cfg.StrOpt('netapp_password', default=None, - help='Password for the DFM server'), + help='Password for the DFM server', + secret=True), cfg.StrOpt('netapp_server_hostname', default=None, help='Hostname for the DFM server'), diff --git a/cinder/volume/drivers/nexenta/volume.py b/cinder/volume/drivers/nexenta/volume.py index 5af2084e9..163a97509 100644 --- a/cinder/volume/drivers/nexenta/volume.py +++ b/cinder/volume/drivers/nexenta/volume.py @@ -48,7 +48,8 @@ nexenta_opts = [ help='User name to connect to Nexenta SA'), cfg.StrOpt('nexenta_password', default='nexenta', - help='Password to connect to Nexenta SA'), + help='Password to connect to Nexenta SA', + secret=True), cfg.IntOpt('nexenta_iscsi_target_portal_port', default=3260, help='Nexenta target portal port'), diff --git a/cinder/volume/drivers/san/hp/hp_3par_common.py b/cinder/volume/drivers/san/hp/hp_3par_common.py index 177037f5e..418a9aba2 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_common.py +++ b/cinder/volume/drivers/san/hp/hp_3par_common.py @@ -63,7 +63,8 @@ hp3par_opts = [ help="3PAR Super user username"), cfg.StrOpt('hp3par_password', default='', - help="3PAR Super user password"), + help="3PAR Super user password", + secret=True), cfg.StrOpt('hp3par_domain', default="OpenStack", help="The 3par domain name to use"), diff --git a/cinder/volume/drivers/san/san.py b/cinder/volume/drivers/san/san.py index b6b442c16..9315b1641 100644 --- a/cinder/volume/drivers/san/san.py +++ b/cinder/volume/drivers/san/san.py @@ -48,7 +48,8 @@ san_opts = [ help='Username for SAN controller'), cfg.StrOpt('san_password', default='', - help='Password for SAN controller'), + help='Password for SAN controller', + secret=True), cfg.StrOpt('san_private_key', default='', help='Filename of private key to use for SSH authentication'), diff --git a/cinder/volume/drivers/xenapi/sm.py b/cinder/volume/drivers/xenapi/sm.py index 337a3d851..a0bf1164d 100644 --- a/cinder/volume/drivers/xenapi/sm.py +++ b/cinder/volume/drivers/xenapi/sm.py @@ -31,7 +31,8 @@ xenapi_opts = [ help='Username for XenAPI connection'), cfg.StrOpt('xenapi_connection_password', default=None, - help='Password for XenAPI connection'), + help='Password for XenAPI connection', + secret=True), ] xenapi_nfs_opts = [ diff --git a/cinder/volume/drivers/zadara.py b/cinder/volume/drivers/zadara.py index 6af373c15..620298767 100644 --- a/cinder/volume/drivers/zadara.py +++ b/cinder/volume/drivers/zadara.py @@ -51,7 +51,8 @@ zadara_opts = [ help='User name for the VPSA'), cfg.StrOpt('zadara_password', default=None, - help='Password for the VPSA'), + help='Password for the VPSA', + secret=True), cfg.StrOpt('zadara_vpsa_poolname', default=None, -- 2.45.2