From de90de5647b89d0e2eb4feedda90f94b0526d794 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 24 Jan 2021 08:36:18 +0900 Subject: [PATCH] swift_key should be secret Change-Id: I1f45a77c75594e03ec2f014be5bf15872fc3ae89 (cherry picked from commit 7cba6e450e7b580b4912218be43b3c0afd7e10d7) (cherry picked from commit df82059cc15d7f92d53d35d0c1b33b1b42094f35) --- manifests/storage/swift.pp | 2 +- spec/classes/gnocchi_storage_swift_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/storage/swift.pp b/manifests/storage/swift.pp index 1997a91f..c83f48bb 100644 --- a/manifests/storage/swift.pp +++ b/manifests/storage/swift.pp @@ -93,7 +93,7 @@ will be removed in a future release. Use swift_project_name instead') gnocchi_config { 'storage/driver': value => 'swift'; 'storage/swift_user': value => $swift_user; - 'storage/swift_key': value => $swift_key; + 'storage/swift_key': value => $swift_key, secret => true; 'storage/swift_project_name': value => $swift_project_name_real; 'storage/swift_user_domain_name': value => $swift_user_domain_name; 'storage/swift_project_domain_name': value => $swift_project_domain_name; diff --git a/spec/classes/gnocchi_storage_swift_spec.rb b/spec/classes/gnocchi_storage_swift_spec.rb index c18accd5..caea26ec 100644 --- a/spec/classes/gnocchi_storage_swift_spec.rb +++ b/spec/classes/gnocchi_storage_swift_spec.rb @@ -15,7 +15,7 @@ describe 'gnocchi::storage::swift' do it 'configures gnocchi-api with default parameters' do is_expected.to contain_gnocchi_config('storage/driver').with_value('swift') is_expected.to contain_gnocchi_config('storage/swift_user').with_value('') - is_expected.to contain_gnocchi_config('storage/swift_key').with_value('') + is_expected.to contain_gnocchi_config('storage/swift_key').with_value('').with_secret(true) is_expected.to contain_gnocchi_config('storage/swift_authurl').with_value('') is_expected.to contain_gnocchi_config('storage/swift_project_name').with_value('') is_expected.to contain_gnocchi_config('storage/swift_user_domain_name').with_value('') @@ -44,7 +44,7 @@ describe 'gnocchi::storage::swift' do it 'configures gnocchi-api with given endpoint type' do is_expected.to contain_gnocchi_config('storage/driver').with_value('swift') is_expected.to contain_gnocchi_config('storage/swift_user').with_value('swift2') - is_expected.to contain_gnocchi_config('storage/swift_key').with_value('admin') + is_expected.to contain_gnocchi_config('storage/swift_key').with_value('admin').with_secret(true) is_expected.to contain_gnocchi_config('storage/swift_authurl').with_value('http://localhost:5000') is_expected.to contain_gnocchi_config('storage/swift_project_name').with_value('service') is_expected.to contain_gnocchi_config('storage/swift_user_domain_name').with_value('Default')