diff --git a/manifests/proxy/authtoken.pp b/manifests/proxy/authtoken.pp index e4cb973d..80708086 100644 --- a/manifests/proxy/authtoken.pp +++ b/manifests/proxy/authtoken.pp @@ -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; diff --git a/releasenotes/notes/deprecate-swift-proxy-authtoken-auth-uri-1ed1f096c4eca137.yaml b/releasenotes/notes/deprecate-swift-proxy-authtoken-auth-uri-1ed1f096c4eca137.yaml new file mode 100644 index 00000000..b642268b --- /dev/null +++ b/releasenotes/notes/deprecate-swift-proxy-authtoken-auth-uri-1ed1f096c4eca137.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + swift::proxy::authtoken::auth_uri is now deprecated, please use the + www_authenticate_uri parameter instead. diff --git a/spec/classes/swift_proxy_authtoken_spec.rb b/spec/classes/swift_proxy_authtoken_spec.rb index 980d40a9..3a78a6b3 100644 --- a/spec/classes/swift_proxy_authtoken_spec.rb +++ b/spec/classes/swift_proxy_authtoken_spec.rb @@ -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