File tree Expand file tree Collapse file tree 5 files changed +31
-7
lines changed Expand file tree Collapse file tree 5 files changed +31
-7
lines changed Original file line number Diff line number Diff line change 60
60
* The authtoken filter requires the keystonemiddleware package.
61
61
* Swift3 explicitly checks that keystoneauth is in the pipeline. You must use this name
62
62
in the pipeline statement and in [ filter: keystoneauth ] section header.
63
+ * The authtoken filter is only required if Keystone users will use the native Swift API.
63
64
64
65
3 ) Add to your proxy-server.conf the section for the Swift3 WSGI filter::
65
66
Original file line number Diff line number Diff line change 5
5
# more middleware.
6
6
#
7
7
# Keystone pipeline
8
- # Note that s3token and authtoken require the keystonemiddleware package.
9
- pipeline = proxy-logging cache swift3 s3token authtoken keystoneauth bulk slo proxy-logging proxy-server
8
+ # Note that authtoken requires the keystonemiddleware package.
9
+ pipeline = proxy-logging cache swift3 s3token keystoneauth bulk slo proxy-logging proxy-server
10
+ # Keystone pipeline with access via both S3 and native Swift API
11
+ # Note that authtoken requires the keystonemiddleware package.
12
+ # pipeline = proxy-logging cache authtoken swift3 s3token keystoneauth bulk slo proxy-logging proxy-server
10
13
11
14
# Tempauth pipeline
12
15
# pipeline = proxy-logging cache swift3 tempauth bulk slo proxy-logging proxy-server
@@ -173,13 +176,14 @@ http_timeout = 10.0
173
176
174
177
[filter:authtoken]
175
178
# See swift manual for more details.
176
- paste.filter_factory = keystonemiddleware. auth_token:filter_factory
179
+ use = egg: keystonemiddleware# auth_token
177
180
identity_uri = http://keystonehost:35357/
178
181
auth_uri = http://keystonehost:5000/
179
182
admin_tenant_name = service
180
183
admin_user = swift
181
184
admin_password = password
182
185
cache = swift.cache
186
+ delay_auth_decision = True
183
187
184
188
[filter:keystoneauth]
185
189
# See swift manual for more details.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ account_autocreate = true
9
9
log_level = DEBUG
10
10
11
11
[pipeline:main]
12
- pipeline = catch_errors gatekeeper proxy-logging cache swift3 %MIDDLEWARE% bulk slo dlo proxy-logging proxy-server
12
+ pipeline = catch_errors gatekeeper proxy-logging cache %MIDDLEWARE% bulk slo dlo proxy-logging proxy-server
13
13
14
14
[app:proxy-server]
15
15
use = egg:swift#proxy
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ mkdir -p ${TEST_DIR}/certs ${TEST_DIR}/private
27
27
28
28
# create config files
29
29
if [ " $AUTH " == ' keystone' ]; then
30
- MIDDLEWARE=" s3token keystoneauth"
30
+ MIDDLEWARE=" swift3 s3token keystoneauth"
31
31
elif [ " $AUTH " == ' tempauth' ]; then
32
- MIDDLEWARE=" tempauth"
32
+ MIDDLEWARE=" swift3 tempauth"
33
33
else
34
34
echo " unknown auth: $AUTH "
35
35
exit 1
Original file line number Diff line number Diff line change @@ -40,7 +40,26 @@ def test_bucket(self):
40
40
self .assertEqual (status , 200 )
41
41
42
42
self .assertCommonResponseHeaders (headers )
43
- self .assertEqual (headers ['location' ], '/' + bucket )
43
+ self .assertIn (headers ['location' ], (
44
+ '/' + bucket , # swob won't touch it...
45
+ # but webob (which we get because of auth_token) *does*
46
+ 'http://%s%s/%s' % (
47
+ self .conn .host ,
48
+ '' if self .conn .port == 80 else ':%d' % self .conn .port ,
49
+ bucket ),
50
+ # This is all based on the Host header the client provided,
51
+ # and boto will double-up ports for sig v4. See
52
+ # - https://github.com/boto/boto/issues/2623
53
+ # - https://github.com/boto/boto/issues/3716
54
+ # with proposed fixes at
55
+ # - https://github.com/boto/boto/pull/3513
56
+ # - https://github.com/boto/boto/pull/3676
57
+ 'http://%s%s:%d/%s' % (
58
+ self .conn .host ,
59
+ '' if self .conn .port == 80 else ':%d' % self .conn .port ,
60
+ self .conn .port ,
61
+ bucket ),
62
+ ))
44
63
self .assertEqual (headers ['content-length' ], '0' )
45
64
46
65
# GET Bucket(Without Object)
You can’t perform that action at this time.
0 commit comments