Add support for the interface parameter in authtoken middleware
This patch adds support for [keystone_authtoken] interface parameter,
so that operators can define which endpoint should be used by authtoken
middleware.
Change-Id: Iebb67609a384ee4c6be1d0f8aff86643ff6775c2
(cherry picked from commit a09758194a
)
This commit is contained in:
parent
d94887e948
commit
263240ea84
|
@ -75,6 +75,11 @@
|
|||
# true/false
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*interface*]
|
||||
# (Optional) Interface to use for the Identity API endpoint. Valid values are
|
||||
# "public", "internal" or "admin".
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# == DEPRECATED
|
||||
#
|
||||
# [*identity_uri*]
|
||||
|
@ -121,6 +126,7 @@ class swift::proxy::authtoken(
|
|||
$include_service_catalog = false,
|
||||
$service_token_roles = $::os_service_default,
|
||||
$service_token_roles_required = $::os_service_default,
|
||||
$interface = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$admin_user = undef,
|
||||
$admin_tenant_name = undef,
|
||||
|
@ -188,5 +194,6 @@ class swift::proxy::authtoken(
|
|||
'filter:authtoken/include_service_catalog': value => $include_service_catalog;
|
||||
'filter:authtoken/service_token_roles': value => $service_token_roles;
|
||||
'filter:authtoken/service_token_roles_required': value => $service_token_roles_required;
|
||||
'filter:authtoken/interface': value => $interface,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The new ``swift::proxy::authtoken::interface`` parameter has been added,
|
||||
which can be used to set the interface parameter in authtoken middleware.
|
|
@ -35,6 +35,7 @@ describe 'swift::proxy::authtoken' do
|
|||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/include_service_catalog').with_value('false') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/service_token_roles').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/service_token_roles_required').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/interface').with_value('<SERVICE DEFAULT>') }
|
||||
end
|
||||
|
||||
describe "when overriding parameters" do
|
||||
|
@ -49,6 +50,7 @@ describe 'swift::proxy::authtoken' do
|
|||
:signing_dir => '/home/swift/keystone-signing',
|
||||
:service_token_roles => ['service'],
|
||||
:service_token_roles_required => true,
|
||||
:interface => 'internal',
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -69,6 +71,7 @@ describe 'swift::proxy::authtoken' do
|
|||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/include_service_catalog').with_value('false') }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/service_token_roles').with_value(['service']) }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/service_token_roles_required').with_value(true) }
|
||||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/interface').with_value('internal') }
|
||||
end
|
||||
|
||||
describe 'when overriding www_authenticate_uri' do
|
||||
|
|
Loading…
Reference in New Issue