Deprecate revocation_cache_time option
The revocation_cache_time is deprecated for removel because of PKI token format is no longer supported. Update warning message and add a release note. Change-Id: Ib42570c94cf9b2778ae8ffcfb22ca7e129176330 Closes-Bug: #1717144
This commit is contained in:
parent
9f7ff42632
commit
6574abc195
|
@ -199,13 +199,6 @@
|
||||||
# (Optional) The region in which the identity server can be found.
|
# (Optional) The region in which the identity server can be found.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*revocation_cache_time*]
|
|
||||||
# (Optional) Determines the frequency at which the list of revoked tokens is
|
|
||||||
# retrieved from the Identity service (in seconds). A high number of
|
|
||||||
# revocation events combined with a low cache duration may significantly
|
|
||||||
# reduce performance. Only valid for PKI tokens. Integer value
|
|
||||||
# Defaults to $::os_service_default.
|
|
||||||
#
|
|
||||||
# [*token_cache_time*]
|
# [*token_cache_time*]
|
||||||
# (Optional) In order to prevent excessive effort spent validating tokens,
|
# (Optional) In order to prevent excessive effort spent validating tokens,
|
||||||
# the middleware caches previously-seen tokens for a configurable duration
|
# the middleware caches previously-seen tokens for a configurable duration
|
||||||
|
@ -216,6 +209,15 @@
|
||||||
# (Optional) Whether to install the python-memcache package.
|
# (Optional) Whether to install the python-memcache package.
|
||||||
# Defaults to false.
|
# Defaults to false.
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*revocation_cache_time*]
|
||||||
|
# (Optional) Determines the frequency at which the list of revoked tokens is
|
||||||
|
# retrieved from the Identity service (in seconds). A high number of
|
||||||
|
# revocation events combined with a low cache duration may significantly
|
||||||
|
# reduce performance. Only valid for PKI tokens. Integer value
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
define keystone::resource::authtoken(
|
define keystone::resource::authtoken(
|
||||||
$username,
|
$username,
|
||||||
$password,
|
$password,
|
||||||
|
@ -249,9 +251,10 @@ define keystone::resource::authtoken(
|
||||||
$memcache_use_advanced_pool = $::os_service_default,
|
$memcache_use_advanced_pool = $::os_service_default,
|
||||||
$memcached_servers = $::os_service_default,
|
$memcached_servers = $::os_service_default,
|
||||||
$region_name = $::os_service_default,
|
$region_name = $::os_service_default,
|
||||||
$revocation_cache_time = $::os_service_default,
|
|
||||||
$token_cache_time = $::os_service_default,
|
$token_cache_time = $::os_service_default,
|
||||||
$manage_memcache_package = false,
|
$manage_memcache_package = false,
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$revocation_cache_time = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::keystone::deps
|
include ::keystone::deps
|
||||||
|
@ -280,6 +283,10 @@ define keystone::resource::authtoken(
|
||||||
validate_bool($delay_auth_decision)
|
validate_bool($delay_auth_decision)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $revocation_cache_time {
|
||||||
|
warning('revocation_cache_time parameter is deprecated, has no effect and will be removed in the future.')
|
||||||
|
}
|
||||||
|
|
||||||
if !is_service_default($memcached_servers) and !empty($memcached_servers){
|
if !is_service_default($memcached_servers) and !empty($memcached_servers){
|
||||||
$memcached_servers_real = join(any2array($memcached_servers), ',')
|
$memcached_servers_real = join(any2array($memcached_servers), ',')
|
||||||
if $manage_memcache_package {
|
if $manage_memcache_package {
|
||||||
|
@ -319,7 +326,6 @@ define keystone::resource::authtoken(
|
||||||
'keystone_authtoken/memcache_use_advanced_pool' => {'value' => $memcache_use_advanced_pool},
|
'keystone_authtoken/memcache_use_advanced_pool' => {'value' => $memcache_use_advanced_pool},
|
||||||
'keystone_authtoken/memcached_servers' => {'value' => $memcached_servers_real},
|
'keystone_authtoken/memcached_servers' => {'value' => $memcached_servers_real},
|
||||||
'keystone_authtoken/region_name' => {'value' => $region_name},
|
'keystone_authtoken/region_name' => {'value' => $region_name},
|
||||||
'keystone_authtoken/revocation_cache_time' => {'value' => $revocation_cache_time},
|
|
||||||
'keystone_authtoken/token_cache_time' => {'value' => $token_cache_time},
|
'keystone_authtoken/token_cache_time' => {'value' => $token_cache_time},
|
||||||
'keystone_authtoken/auth_url' => {'value' => $auth_url},
|
'keystone_authtoken/auth_url' => {'value' => $auth_url},
|
||||||
'keystone_authtoken/username' => {'value' => $username},
|
'keystone_authtoken/username' => {'value' => $username},
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- revocation_cache_time option is now deprecated for removal, the
|
||||||
|
parameter has no effect.
|
|
@ -46,7 +46,6 @@ describe 'keystone::resource::authtoken' do
|
||||||
is_expected.to contain_keystone_config('keystone_authtoken/memcache_use_advanced_pool').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('keystone_authtoken/memcache_use_advanced_pool').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_keystone_config('keystone_authtoken/memcached_servers').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('keystone_authtoken/memcached_servers').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_keystone_config('keystone_authtoken/region_name').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('keystone_authtoken/region_name').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_keystone_config('keystone_authtoken/revocation_cache_time').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('keystone_authtoken/token_cache_time').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('keystone_authtoken/token_cache_time').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -77,7 +76,6 @@ describe 'keystone::resource::authtoken' do
|
||||||
:include_service_catalog => false,
|
:include_service_catalog => false,
|
||||||
:keyfile => 'somekey.key',
|
:keyfile => 'somekey.key',
|
||||||
:region_name => 'MyRegion',
|
:region_name => 'MyRegion',
|
||||||
:revocation_cache_time => '50',
|
|
||||||
:token_cache_time => '20',
|
:token_cache_time => '20',
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
@ -110,7 +108,6 @@ describe 'keystone::resource::authtoken' do
|
||||||
is_expected.to contain_keystone_config('keystone_authtoken/memcache_use_advanced_pool').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('keystone_authtoken/memcache_use_advanced_pool').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_keystone_config('keystone_authtoken/memcached_servers').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_keystone_config('keystone_authtoken/memcached_servers').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_keystone_config('keystone_authtoken/region_name').with_value(params[:region_name])
|
is_expected.to contain_keystone_config('keystone_authtoken/region_name').with_value(params[:region_name])
|
||||||
is_expected.to contain_keystone_config('keystone_authtoken/revocation_cache_time').with_value(params[:revocation_cache_time])
|
|
||||||
is_expected.to contain_keystone_config('keystone_authtoken/token_cache_time').with_value(params[:token_cache_time])
|
is_expected.to contain_keystone_config('keystone_authtoken/token_cache_time').with_value(params[:token_cache_time])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue