Add support for [keystone_authtoken] service_type

Change-Id: Id7048f2b1bfed8641c9a6f6b7508a88282c25cf2
This commit is contained in:
Takashi Kajinami 2022-01-24 13:11:10 +09:00
parent 69eca59c78
commit 8b5cb8c0a3
3 changed files with 15 additions and 0 deletions

View File

@ -182,6 +182,11 @@
# true/false # true/false
# Defaults to $::os_service_default. # Defaults to $::os_service_default.
# #
# [*service_type*]
# (Optional) The name or type of the service as it appears in the service
# catalog. This is used to validate tokens that have restricted access rules.
# Defaults to $::os_service_default.
#
# [*interface*] # [*interface*]
# (Optional) Interface to use for the Identity API endpoint. Valid values are # (Optional) Interface to use for the Identity API endpoint. Valid values are
# "public", "internal" or "admin". # "public", "internal" or "admin".
@ -222,6 +227,7 @@ class trove::keystone::authtoken(
$token_cache_time = $::os_service_default, $token_cache_time = $::os_service_default,
$service_token_roles = $::os_service_default, $service_token_roles = $::os_service_default,
$service_token_roles_required = $::os_service_default, $service_token_roles_required = $::os_service_default,
$service_type = $::os_service_default,
$interface = $::os_service_default, $interface = $::os_service_default,
) { ) {
@ -266,6 +272,7 @@ class trove::keystone::authtoken(
token_cache_time => $token_cache_time, token_cache_time => $token_cache_time,
service_token_roles => $service_token_roles, service_token_roles => $service_token_roles,
service_token_roles_required => $service_token_roles_required, service_token_roles_required => $service_token_roles_required,
service_type => $service_type,
interface => $interface, interface => $interface,
} }
} }

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``trove::keystone::authtoken::service_type`` parameter has been
added to configure the service_type parameter in authtoken middleware.

View File

@ -46,6 +46,7 @@ describe 'trove::keystone::authtoken' do
:token_cache_time => '<SERVICE DEFAULT>', :token_cache_time => '<SERVICE DEFAULT>',
:service_token_roles => '<SERVICE DEFAULT>', :service_token_roles => '<SERVICE DEFAULT>',
:service_token_roles_required => '<SERVICE DEFAULT>', :service_token_roles_required => '<SERVICE DEFAULT>',
:service_type => '<SERVICE DEFAULT>',
:interface => '<SERVICE DEFAULT>', :interface => '<SERVICE DEFAULT>',
) )
end end
@ -88,6 +89,7 @@ describe 'trove::keystone::authtoken' do
:token_cache_time => '301', :token_cache_time => '301',
:service_token_roles => ['service'], :service_token_roles => ['service'],
:service_token_roles_required => false, :service_token_roles_required => false,
:service_type => 'identity',
:interface => 'internal', :interface => 'internal',
}) })
end end
@ -128,6 +130,7 @@ describe 'trove::keystone::authtoken' do
:token_cache_time => '301', :token_cache_time => '301',
:service_token_roles => ['service'], :service_token_roles => ['service'],
:service_token_roles_required => false, :service_token_roles_required => false,
:service_type => 'identity',
:interface => 'internal', :interface => 'internal',
) )
end end