From 74fc03ff953ebe023e779ad5a782883e299deb4d Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 23 Sep 2021 22:42:15 +0900 Subject: [PATCH] [service_auth] password should be secret Change-Id: Ibe8c1ff4519cc36d76914c633ab821835e0a1538 (cherry picked from commit 8f7149e0f7abaae3e2bddc3ab66162922114967a) --- manifests/service_auth.pp | 2 +- spec/classes/octavia_service_auth_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/service_auth.pp b/manifests/service_auth.pp index eccfc775..bdacfb82 100644 --- a/manifests/service_auth.pp +++ b/manifests/service_auth.pp @@ -52,7 +52,7 @@ class octavia::service_auth ( 'service_auth/auth_url' : value => $auth_url; 'service_auth/username' : value => $username; 'service_auth/project_name' : value => $project_name; - 'service_auth/password' : value => $password; + 'service_auth/password' : value => $password, secret => true; 'service_auth/user_domain_name' : value => $user_domain_name; 'service_auth/project_domain_name' : value => $project_domain_name; 'service_auth/auth_type' : value => $auth_type; diff --git a/spec/classes/octavia_service_auth_spec.rb b/spec/classes/octavia_service_auth_spec.rb index 27dcc0e0..d7fdfe4d 100644 --- a/spec/classes/octavia_service_auth_spec.rb +++ b/spec/classes/octavia_service_auth_spec.rb @@ -8,7 +8,7 @@ describe 'octavia::service_auth' do is_expected.to contain_octavia_config('service_auth/auth_url').with_value('') is_expected.to contain_octavia_config('service_auth/username').with_value('') is_expected.to contain_octavia_config('service_auth/project_name').with_value('') - is_expected.to contain_octavia_config('service_auth/password').with_value('') + is_expected.to contain_octavia_config('service_auth/password').with_value('').with_secret(true) is_expected.to contain_octavia_config('service_auth/user_domain_name').with_value('') is_expected.to contain_octavia_config('service_auth/project_domain_name').with_value('') is_expected.to contain_octavia_config('service_auth/auth_type').with_value('') @@ -33,7 +33,7 @@ describe 'octavia::service_auth' do is_expected.to contain_octavia_config('service_auth/auth_url').with_value('http://199.199.199.199:64371') is_expected.to contain_octavia_config('service_auth/username').with_value('some_user') is_expected.to contain_octavia_config('service_auth/project_name').with_value('some_project_name') - is_expected.to contain_octavia_config('service_auth/password').with_value('secure123') + is_expected.to contain_octavia_config('service_auth/password').with_value('secure123').with_secret(true) is_expected.to contain_octavia_config('service_auth/user_domain_name').with_value('my_domain_name') is_expected.to contain_octavia_config('service_auth/project_domain_name').with_value('our_domain_name') is_expected.to contain_octavia_config('service_auth/auth_type').with_value('password')