Deprecate auth_uri in swift::proxy::authtoken
Depends-On: https://review.openstack.org/621191 Change-Id: If7d8b03367625792bfe983d9d00d74e031f738d0
This commit is contained in:
parent
2e640cc9e6
commit
d409c7b6c6
|
@ -17,7 +17,7 @@
|
|||
# The cache backend to use
|
||||
# Optional. Defaults to 'swift.cache'
|
||||
#
|
||||
# [*auth_uri*]
|
||||
# [*www_authenticate_uri*]
|
||||
# (Optional) Complete public Identity API endpoint.
|
||||
# Defaults to 'http://127.0.0.1:5000'
|
||||
#
|
||||
|
@ -77,6 +77,10 @@
|
|||
# (optional) Deprecated. Use password instead.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*auth_uri*]
|
||||
# (Optional) Complete public Identity API endpoint.
|
||||
# Defaults to 'http://127.0.0.1:5000'
|
||||
#
|
||||
# == Authors
|
||||
#
|
||||
# Dan Bode dan@puppetlabs.com
|
||||
|
@ -89,7 +93,7 @@ class swift::proxy::authtoken(
|
|||
$delay_auth_decision = 1,
|
||||
$signing_dir = $::swift::params::signing_dir,
|
||||
$cache = 'swift.cache',
|
||||
$auth_uri = 'http://127.0.0.1:5000',
|
||||
$www_authenticate_uri = 'http://127.0.0.1:5000',
|
||||
$auth_url = 'http://127.0.0.1:5000',
|
||||
$auth_plugin = 'password',
|
||||
$project_domain_id = 'default',
|
||||
|
@ -104,6 +108,7 @@ class swift::proxy::authtoken(
|
|||
$admin_password = undef,
|
||||
$identity_uri = undef,
|
||||
$admin_token = undef,
|
||||
$auth_uri = undef,
|
||||
) inherits swift::params {
|
||||
|
||||
include ::swift::deps
|
||||
|
@ -128,10 +133,15 @@ class swift::proxy::authtoken(
|
|||
warning('admin_password is deprecated and will be removed, please use password instead')
|
||||
}
|
||||
|
||||
if $auth_uri {
|
||||
warning('auth_uri is deprecated, please use www_authenticate_uri')
|
||||
}
|
||||
|
||||
$auth_url_real = pick($identity_uri, $auth_url)
|
||||
$username_real = pick($admin_user, $username)
|
||||
$project_name_real = pick($admin_tenant_name, $project_name)
|
||||
$password_real = pick($admin_password, $password)
|
||||
$www_authenticate_uri_real = pick($auth_uri, $www_authenticate_uri)
|
||||
|
||||
if ($::os_package_type != 'debian') {
|
||||
file { $signing_dir:
|
||||
|
@ -150,7 +160,7 @@ class swift::proxy::authtoken(
|
|||
'filter:authtoken/log_name': value => 'swift';
|
||||
'filter:authtoken/signing_dir': value => $signing_dir;
|
||||
'filter:authtoken/paste.filter_factory': value => 'keystonemiddleware.auth_token:filter_factory';
|
||||
'filter:authtoken/www_authenticate_uri': value => $auth_uri;
|
||||
'filter:authtoken/www_authenticate_uri': value => $www_authenticate_uri_real;
|
||||
'filter:authtoken/auth_url': value => $auth_url_real;
|
||||
'filter:authtoken/auth_plugin': value => $auth_plugin;
|
||||
'filter:authtoken/project_domain_id': value => $project_domain_id;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
deprecations:
|
||||
- |
|
||||
swift::proxy::authtoken::auth_uri is now deprecated, please use the
|
||||
www_authenticate_uri parameter instead.
|
|
@ -62,9 +62,9 @@ describe 'swift::proxy::authtoken' do
|
|||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/include_service_catalog').with_value('false') }
|
||||
end
|
||||
|
||||
describe 'when overriding auth_uri' do
|
||||
describe 'when overriding www_authenticate_uri' do
|
||||
let :params do
|
||||
{ :auth_uri => 'http://public.host/keystone/main' }
|
||||
{ :www_authenticate_uri => 'http://public.host/keystone/main' }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/www_authenticate_uri').with_value('http://public.host/keystone/main') }
|
||||
|
@ -80,11 +80,11 @@ describe 'swift::proxy::authtoken' do
|
|||
it { is_expected.to contain_swift_proxy_config('filter:authtoken/auth_url').with_value('https://foo.bar:5000/') }
|
||||
end
|
||||
|
||||
describe "when both auth_uri and identity_uri are set" do
|
||||
describe "when both www_authenticate_uri and identity_uri are set" do
|
||||
let :params do
|
||||
{
|
||||
:auth_uri => 'https://foo.bar:5000/v2.0/',
|
||||
:identity_uri => 'https://foo.bar:5000/'
|
||||
:www_authenticate_uri => 'https://foo.bar:5000/v2.0/',
|
||||
:identity_uri => 'https://foo.bar:5000/'
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue