Remove support for [p11_crypto_plugin] token_label

... because it was deprecated during Wallaby cycle[1].

[1] 4403fe7247

Change-Id: Ia9b89d92256f51d5a48a19849715335f6856e839
This commit is contained in:
Takashi Kajinami 2022-06-23 12:39:29 +09:00
parent 3b1ecbed5c
commit f606fd1ca3
3 changed files with 5 additions and 20 deletions

View File

@ -66,12 +66,6 @@
# (optional) set plugin as global default
# Defaults to false
#
# DEPRECATED PARAMETERS
#
# [*p11_crypto_plugin_token_label*]
# (optional) Label to identify PKCS#11 token
# Defaults to undef
#
class barbican::plugins::p11_crypto (
$p11_crypto_plugin_library_path,
$p11_crypto_plugin_login,
@ -88,20 +82,10 @@ class barbican::plugins::p11_crypto (
$p11_crypto_plugin_os_locking_ok = $::os_service_default,
$p11_crypto_plugin_always_set_cka_sensitive = $::os_service_default,
$global_default = false,
# DEPRECATED PARAMETERS
$p11_crypto_plugin_token_label = undef,
) {
include barbican::deps
if $p11_crypto_plugin_token_label != undef {
warning('The p11_crypto_plugin_token_label parameter has been deprecated. \
Use the p11_crypto_plugin_token_labels parameter instead')
$p11_crypto_plugin_token_label_real = $p11_crypto_plugin_token_label
} else {
$p11_crypto_plugin_token_label_real = $::os_service_default
}
barbican_config {
'p11_crypto_plugin/library_path': value => $p11_crypto_plugin_library_path;
'p11_crypto_plugin/login': value => $p11_crypto_plugin_login;
@ -109,7 +93,6 @@ Use the p11_crypto_plugin_token_labels parameter instead')
'p11_crypto_plugin/mkek_length': value => $p11_crypto_plugin_mkek_length;
'p11_crypto_plugin/hmac_label': value => $p11_crypto_plugin_hmac_label;
'p11_crypto_plugin/token_serial_number': value => $p11_crypto_plugin_token_serial_number;
'p11_crypto_plugin/token_label': value => $p11_crypto_plugin_token_label_real;
'p11_crypto_plugin/token_labels': value => join(any2array($p11_crypto_plugin_token_labels), ',');
'p11_crypto_plugin/slot_id': value => $p11_crypto_plugin_slot_id;
'p11_crypto_plugin/encryption_mechanism': value => $p11_crypto_plugin_encryption_mechanism;

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``barbican::plugins::p11_crypto::token_label`` parameter has been
removed. Use the ``token_labels`` parameter instead.

View File

@ -30,7 +30,6 @@ describe 'barbican::plugins::p11_crypto' do
:p11_crypto_plugin_mkek_length => 32,
:p11_crypto_plugin_hmac_label => 'hmac_label',
:p11_crypto_plugin_token_serial_number => 'token_serial',
:p11_crypto_plugin_token_label => 'token_label',
:p11_crypto_plugin_token_labels => 'token_label1,token_label2',
:p11_crypto_plugin_slot_id => 1,
:p11_crypto_plugin_library_path => '/usr/lib/libCryptoki2_64.so',
@ -55,8 +54,6 @@ describe 'barbican::plugins::p11_crypto' do
.with_value(params[:p11_crypto_plugin_hmac_label])
is_expected.to contain_barbican_config('p11_crypto_plugin/token_serial_number') \
.with_value(params[:p11_crypto_plugin_token_serial_number])
is_expected.to contain_barbican_config('p11_crypto_plugin/token_label') \
.with_value(params[:p11_crypto_plugin_token_label])
is_expected.to contain_barbican_config('p11_crypto_plugin/token_labels') \
.with_value(params[:p11_crypto_plugin_token_labels])
is_expected.to contain_barbican_config('p11_crypto_plugin/slot_id') \