Allow to configure policy_dirs
This patch makes it possible to override the current service default, which is /etc/<service>/policy.d . Change-Id: Ib8f71445a680d845a3434c127daa202a3a75269b
This commit is contained in:
parent
acd24e6dda
commit
b8ee62c094
|
@ -32,11 +32,16 @@
|
|||
# (Optional) Path to the barbican policy.yaml file
|
||||
# Defaults to /etc/barbican/policy.yaml
|
||||
#
|
||||
# [*policy_dirs*]
|
||||
# (Optional) Path to the keystone policy folder
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class barbican::policy (
|
||||
$enforce_scope = $::os_service_default,
|
||||
$enforce_new_defaults = $::os_service_default,
|
||||
$policies = {},
|
||||
$policy_path = '/etc/barbican/policy.yaml',
|
||||
$policy_dirs = $::os_service_default,
|
||||
) {
|
||||
|
||||
include barbican::deps
|
||||
|
@ -56,7 +61,8 @@ class barbican::policy (
|
|||
oslo::policy { 'barbican_config':
|
||||
enforce_scope => $enforce_scope,
|
||||
enforce_new_defaults => $enforce_new_defaults,
|
||||
policy_file => $policy_path
|
||||
policy_file => $policy_path,
|
||||
policy_dirs => $policy_dirs,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
There is now a new policy_dirs parameter in the keystone::policy class,
|
||||
so one can set a custom path.
|
|
@ -7,6 +7,7 @@ describe 'barbican::policy' do
|
|||
:enforce_scope => false,
|
||||
:enforce_new_defaults => false,
|
||||
:policy_path => '/etc/barbican/policy.yaml',
|
||||
:policy_dirs => '/etc/barbican/policy.d',
|
||||
:policies => {
|
||||
'context_is_admin' => {
|
||||
'key' => 'context_is_admin',
|
||||
|
@ -28,6 +29,7 @@ describe 'barbican::policy' do
|
|||
:enforce_scope => false,
|
||||
:enforce_new_defaults => false,
|
||||
:policy_file => '/etc/barbican/policy.yaml',
|
||||
:policy_dirs => '/etc/barbican/policy.d',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue