From 58a8dcc1a54f61e1a5bfcc4f6cc967bc034f96a8 Mon Sep 17 00:00:00 2001 From: Christian Schwede Date: Fri, 28 Aug 2015 08:06:23 +0000 Subject: [PATCH] Put staticweb middleware after keystoneauth in proxy pipeline The staticweb middleware needs to be put after authentication middlewares to ensure correct functionality as documented in http://docs.openstack.org/developer/swift/middleware.html#staticweb Without this Swift sends a HTML response even if the request was done using a X-Auth-Token. This might result in a faulty handling of the response on the client side; for example, "swift stat containername" would report an empty, private container, while the container might actually be public readable with data stored in it. Change-Id: Ic70581ee6e2578b99c01fb241f4f3f4737c8cbba --- manifests/proxy/staticweb.pp | 2 +- spec/classes/swift_proxy_staticweb_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/proxy/staticweb.pp b/manifests/proxy/staticweb.pp index 3531751..7fc6a5c 100644 --- a/manifests/proxy/staticweb.pp +++ b/manifests/proxy/staticweb.pp @@ -20,7 +20,7 @@ class swift::proxy::staticweb() { concat::fragment { 'swift-proxy-staticweb': target => '/etc/swift/proxy-server.conf', content => template('swift/proxy/staticweb.conf.erb'), - order => '32', + order => '82', } } diff --git a/spec/classes/swift_proxy_staticweb_spec.rb b/spec/classes/swift_proxy_staticweb_spec.rb index 7cff74f..e0c13f8 100644 --- a/spec/classes/swift_proxy_staticweb_spec.rb +++ b/spec/classes/swift_proxy_staticweb_spec.rb @@ -12,7 +12,7 @@ describe 'swift::proxy::staticweb' do end let :fragment_file do - "/var/lib/puppet/concat/_etc_swift_proxy-server.conf/fragments/32_swift-proxy-staticweb" + "/var/lib/puppet/concat/_etc_swift_proxy-server.conf/fragments/82_swift-proxy-staticweb" end it { is_expected.to contain_file(fragment_file).with_content(/[filter:staticweb]/) } -- 2.4.3