|
...
|
...
|
@@ -72,6 +72,10 @@ SWIFT_EXTRAS_MIDDLEWARE=${SWIFT_EXTRAS_MIDDLEWARE:-tempurl formpost staticweb}
|
|
72
|
72
|
# the end of the pipeline.
|
|
73
|
73
|
SWIFT_EXTRAS_MIDDLEWARE_LAST=${SWIFT_EXTRAS_MIDDLEWARE_LAST}
|
|
74
|
74
|
|
|
|
75
|
+# Set ``SWIFT_EXTRAS_MIDDLEWARE_NO_AUTH`` to extras middlewares that need to be at
|
|
|
76
|
+# the beginning of the pipeline, before authentication middlewares.
|
|
|
77
|
+SWIFT_EXTRAS_MIDDLEWARE_NO_AUTH=${SWIFT_EXTRAS_MIDDLEWARE_NO_AUTH:-crossdomain}
|
|
|
78
|
+
|
|
75
|
79
|
# The ring uses a configurable number of bits from a path’s MD5 hash as
|
|
76
|
80
|
# a partition index that designates a device. The number of bits kept
|
|
77
|
81
|
# from the hash is known as the partition power, and 2 to the partition
|
|
...
|
...
|
@@ -210,7 +214,7 @@ function _config_swift_apache_wsgi() {
|
|
210
|
210
|
|
|
211
|
211
|
# configure_swift() - Set config files, create data dirs and loop image
|
|
212
|
212
|
function configure_swift() {
|
|
213
|
|
- local swift_pipeline=" "
|
|
|
213
|
+ local swift_pipeline="${SWIFT_EXTRAS_MIDDLEWARE_NO_AUTH}"
|
|
214
|
214
|
local node_number
|
|
215
|
215
|
local swift_node_config
|
|
216
|
216
|
local swift_log_dir
|
|
...
|
...
|
@@ -271,7 +275,7 @@ function configure_swift() {
|
|
271
|
271
|
# tempauth would be prefixed with the reseller_prefix setting TEMPAUTH_ the
|
|
272
|
272
|
# token for keystoneauth would have the standard reseller_prefix AUTH_
|
|
273
|
273
|
if is_service_enabled swift3;then
|
|
274
|
|
- swift_pipeline=" swift3 s3token "
|
|
|
274
|
+ swift_pipeline+=" swift3 s3token "
|
|
275
|
275
|
fi
|
|
276
|
276
|
swift_pipeline+=" authtoken keystoneauth tempauth "
|
|
277
|
277
|
sed -i "/^pipeline/ { s/tempauth/${swift_pipeline} ${SWIFT_EXTRAS_MIDDLEWARE}/ ;}" ${SWIFT_CONFIG_PROXY_SERVER}
|
|
...
|
...
|
@@ -283,6 +287,9 @@ function configure_swift() {
|
|
283
|
283
|
iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth reseller_prefix
|
|
284
|
284
|
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth reseller_prefix "TEMPAUTH"
|
|
285
|
285
|
|
|
|
286
|
+ # Configure Crossdomain
|
|
|
287
|
+ iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:crossdomain use "egg:swift#crossdomain"
|
|
|
288
|
+
|
|
286
|
289
|
# Configure Keystone
|
|
287
|
290
|
sed -i '/^# \[filter:authtoken\]/,/^# \[filter:keystoneauth\]$/ s/^#[ \t]*//' ${SWIFT_CONFIG_PROXY_SERVER}
|
|
288
|
291
|
iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:authtoken auth_host $KEYSTONE_AUTH_HOST
|