From 6052dfd0fffef2c6b2b6edfdf3f0df6fbf263b35 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 29 Nov 2021 22:06:43 +0900 Subject: [PATCH] [trustee] password should be secret Change-Id: I8a29944a53171db1d17eb598f4a16c58c71febad --- manifests/keystone/trust.pp | 10 +++++----- spec/classes/zaqar_keystone_trust_spec.rb | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/manifests/keystone/trust.pp b/manifests/keystone/trust.pp index 61a6441..aee18b5 100644 --- a/manifests/keystone/trust.pp +++ b/manifests/keystone/trust.pp @@ -40,12 +40,12 @@ class zaqar::keystone::trust( include zaqar::deps zaqar_config { - 'trustee/username': value => $username; - 'trustee/password': value => $password; + 'trustee/username': value => $username; + 'trustee/password': value => $password, secret =>true; 'trustee/user_domain_name': value => $user_domain_name; - 'trustee/auth_url': value => $auth_url; - 'trustee/auth_section': value => $auth_section; - 'trustee/auth_type': value => $auth_type; + 'trustee/auth_url': value => $auth_url; + 'trustee/auth_section': value => $auth_section; + 'trustee/auth_type': value => $auth_type; } } diff --git a/spec/classes/zaqar_keystone_trust_spec.rb b/spec/classes/zaqar_keystone_trust_spec.rb index 10eef03..22d482e 100644 --- a/spec/classes/zaqar_keystone_trust_spec.rb +++ b/spec/classes/zaqar_keystone_trust_spec.rb @@ -6,18 +6,18 @@ describe 'zaqar::keystone::trust' do describe 'with custom values' do let :params do { - :username => 'user', - :password => 'secret', - :auth_url => 'http://there', - :user_domain_name => 'domain', - :auth_section => 'keystone', - :auth_type => 'token', + :username => 'user', + :password => 'secret', + :auth_url => 'http://there', + :user_domain_name => 'domain', + :auth_section => 'keystone', + :auth_type => 'token', } end it 'configures custom values' do is_expected.to contain_zaqar_config('trustee/username').with_value('user') - is_expected.to contain_zaqar_config('trustee/password').with_value('secret') + is_expected.to contain_zaqar_config('trustee/password').with_value('secret').with_secret(true) is_expected.to contain_zaqar_config('trustee/auth_url').with_value('http://there') is_expected.to contain_zaqar_config('trustee/user_domain_name').with_value('domain') is_expected.to contain_zaqar_config('trustee/auth_section').with_value('keystone')