Add strict validation about boolean parameters
This ensures the parameters used by if-else logic accept only boolean values because non-boolean can result in unexpected behavior. Change-Id: I963d73e46f82a780486fa282b424151485e43d1e
This commit is contained in:
parent
626681f04d
commit
3ea9585f2c
|
@ -284,6 +284,11 @@ class barbican::api (
|
|||
include barbican::client
|
||||
include barbican::policy
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
validate_legacy(Boolean, 'validate_bool', $sync_db)
|
||||
validate_legacy(Boolean, 'validate_bool', $multiple_secret_stores_enabled)
|
||||
|
||||
package { 'barbican-api':
|
||||
ensure => $package_ensure,
|
||||
name => $::barbican::params::api_package_name,
|
||||
|
|
|
@ -21,6 +21,8 @@ class barbican(
|
|||
include barbican::deps
|
||||
include barbican::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $purge_config)
|
||||
|
||||
package { 'barbican':
|
||||
ensure => $package_ensure,
|
||||
name => $::barbican::params::common_package_name,
|
||||
|
|
|
@ -59,6 +59,7 @@ class barbican::policy (
|
|||
include barbican::params
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $policies)
|
||||
validate_legacy(Boolean, 'validate_bool', $purge_config)
|
||||
|
||||
$policy_parameters = {
|
||||
policies => $policies,
|
||||
|
|
|
@ -35,6 +35,9 @@ class barbican::retry_scheduler (
|
|||
include barbican::deps
|
||||
include barbican::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
|
||||
barbican_config {
|
||||
'retry_scheduler/initial_delay_seconds': value => $initial_delay_seconds;
|
||||
'retry_scheduler/periodic_interval_max_seconds': value => $periodic_interval_max_seconds;
|
||||
|
|
|
@ -41,6 +41,9 @@ class barbican::worker (
|
|||
|
||||
include barbican::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
|
||||
package { 'barbican-worker':
|
||||
ensure => $package_ensure,
|
||||
name => $::barbican::params::worker_package_name,
|
||||
|
|
Loading…
Reference in New Issue