cinder backend: password should be secret

This change ensures that password information for cinder backend is
properly hidden.

Change-Id: Ib188ef46d53ea2ac2adc5deaf0d249f8bdb8f1aa
(cherry picked from commit 3a9ae92204)
This commit is contained in:
Takashi Kajinami 2020-12-21 21:02:27 +09:00
parent ddb7d4e48e
commit fb6c573c2b
2 changed files with 6 additions and 6 deletions

View File

@ -108,7 +108,7 @@ define glance::backend::multistore::cinder(
"${name}/cinder_store_auth_address": value => $cinder_store_auth_address;
"${name}/cinder_store_project_name": value => $cinder_store_project_name;
"${name}/cinder_store_user_name": value => $cinder_store_user_name;
"${name}/cinder_store_password": value => $cinder_store_password;
"${name}/cinder_store_password": value => $cinder_store_password, secret => true;
"${name}/cinder_os_region_name": value => $cinder_os_region_name_real;
"${name}/cinder_enforce_multipath": value => $cinder_enforce_multipath;
"${name}/cinder_use_multipath": value => $cinder_use_multipath;
@ -124,10 +124,10 @@ define glance::backend::multistore::cinder(
"${name}/cinder_store_auth_address": value => $cinder_store_auth_address;
"${name}/cinder_store_project_name": value => $cinder_store_project_name;
"${name}/cinder_store_user_name": value => $cinder_store_user_name;
"${name}/cinder_store_password": value => $cinder_store_password, secret => true;
"${name}/cinder_os_region_name": value => $cinder_os_region_name_real;
"${name}/cinder_enforce_multipath": value => $cinder_enforce_multipath;
"${name}/cinder_use_multipath": value => $cinder_use_multipath;
"${name}/cinder_store_password": value => $cinder_store_password;
}
create_resources('glance_api_config', {})

View File

@ -39,7 +39,7 @@ describe 'glance::backend::multistore::cinder' do
is_expected.to contain_glance_api_config('cinder/cinder_store_auth_address').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('cinder/cinder_store_project_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('cinder/cinder_store_user_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('cinder/cinder_store_password').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('cinder/cinder_store_password').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_glance_api_config('cinder/cinder_os_region_name').with_value('RegionOne')
is_expected.to contain_glance_api_config('cinder/cinder_enforce_multipath').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_api_config('cinder/cinder_use_multipath').with_value('<SERVICE DEFAULT>')
@ -54,7 +54,7 @@ describe 'glance::backend::multistore::cinder' do
is_expected.to contain_glance_cache_config('cinder/cinder_store_auth_address').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_cache_config('cinder/cinder_store_project_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_cache_config('cinder/cinder_store_user_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_cache_config('cinder/cinder_store_password').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_cache_config('cinder/cinder_store_password').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_glance_cache_config('cinder/cinder_os_region_name').with_value('RegionOne')
is_expected.to contain_glance_cache_config('cinder/cinder_enforce_multipath').with_value('<SERVICE DEFAULT>')
is_expected.to contain_glance_cache_config('cinder/cinder_use_multipath').with_value('<SERVICE DEFAULT>')
@ -89,7 +89,7 @@ describe 'glance::backend::multistore::cinder' do
is_expected.to contain_glance_api_config('cinder/cinder_store_auth_address').with_value('127.0.0.2:8080/v3/')
is_expected.to contain_glance_api_config('cinder/cinder_store_project_name').with_value('services')
is_expected.to contain_glance_api_config('cinder/cinder_store_user_name').with_value('glance')
is_expected.to contain_glance_api_config('cinder/cinder_store_password').with_value('glance')
is_expected.to contain_glance_api_config('cinder/cinder_store_password').with_value('glance').with_secret(true)
is_expected.to contain_glance_api_config('cinder/cinder_os_region_name').with_value('RegionTwo')
is_expected.to contain_glance_api_config('cinder/cinder_enforce_multipath').with_value(true)
is_expected.to contain_glance_api_config('cinder/cinder_use_multipath').with_value(true)
@ -104,7 +104,7 @@ describe 'glance::backend::multistore::cinder' do
is_expected.to contain_glance_cache_config('cinder/cinder_store_auth_address').with_value('127.0.0.2:8080/v3/')
is_expected.to contain_glance_cache_config('cinder/cinder_store_project_name').with_value('services')
is_expected.to contain_glance_cache_config('cinder/cinder_store_user_name').with_value('glance')
is_expected.to contain_glance_cache_config('cinder/cinder_store_password').with_value('glance')
is_expected.to contain_glance_cache_config('cinder/cinder_store_password').with_value('glance').with_secret(true)
is_expected.to contain_glance_cache_config('cinder/cinder_os_region_name').with_value('RegionTwo')
is_expected.to contain_glance_cache_config('cinder/cinder_enforce_multipath').with_value(true)
is_expected.to contain_glance_cache_config('cinder/cinder_use_multipath').with_value(true)