From f0304ab2a9744726925ec78e798ce3fd64c75106 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 23 Mar 2021 23:34:46 +0900 Subject: [PATCH] Add missing unit test for p11_crypto_plugin_always_set_cka_sensitive This change is a follow-up of the previous commit[1] and add a unit test case to validate the new parameter and a release note explaining the change. [1] 27b1cc2735264556c372c7ea5d02f7164fdfcb68 Change-Id: Ie7099bdf32a12fa85109279b576ff5ab126b59e0 --- ...pto_plugin_always_set_cka_sensitive-1c9a9b9726c3cf93.yaml | 5 +++++ spec/classes/barbican_plugins_p11_crypto_spec.rb | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 releasenotes/notes/p11_crypto_plugin_always_set_cka_sensitive-1c9a9b9726c3cf93.yaml diff --git a/releasenotes/notes/p11_crypto_plugin_always_set_cka_sensitive-1c9a9b9726c3cf93.yaml b/releasenotes/notes/p11_crypto_plugin_always_set_cka_sensitive-1c9a9b9726c3cf93.yaml new file mode 100644 index 00000000..4c161635 --- /dev/null +++ b/releasenotes/notes/p11_crypto_plugin_always_set_cka_sensitive-1c9a9b9726c3cf93.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Support for the ``[p11_crypto_plugin] always_set_cka_sensitive`` parameter + has been added. diff --git a/spec/classes/barbican_plugins_p11_crypto_spec.rb b/spec/classes/barbican_plugins_p11_crypto_spec.rb index 3b002eeb..b06832b3 100644 --- a/spec/classes/barbican_plugins_p11_crypto_spec.rb +++ b/spec/classes/barbican_plugins_p11_crypto_spec.rb @@ -39,6 +39,7 @@ describe 'barbican::plugins::p11_crypto' do :p11_crypto_plugin_hmac_keygen_mechanism => 'CKM_AES_KEY_GEN', :p11_crypto_plugin_aes_gcm_generate_iv => false, :p11_crypto_plugin_os_locking_ok => false, + :p11_crypto_plugin_always_set_cka_sensitive => true, :global_default => true, } end @@ -70,6 +71,8 @@ describe 'barbican::plugins::p11_crypto' do .with_value(params[:p11_crypto_plugin_hmac_keygen_mechanism]) is_expected.to contain_barbican_config('p11_crypto_plugin/aes_gcm_generate_iv') \ .with_value(params[:p11_crypto_plugin_aes_gcm_generate_iv]) + is_expected.to contain_barbican_config('p11_crypto_plugin/always_set_cka_sensitive') \ + .with_value(params[:p11_crypto_plugin_always_set_cka_sensitive]) is_expected.to contain_barbican_config('p11_crypto_plugin/os_locking_ok') \ .with_value(params[:p11_crypto_plugin_os_locking_ok]) is_expected.to contain_barbican_config(