From 94904e45e3276e1c274a25c785c0143cd6d6fec1 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Tue, 20 Mar 2012 17:08:46 +0000 Subject: Rename tokenauth to authtoken. - Avoid confusing by using the authtoken name for auth_token middleware. - Improve swift_auth middleware doc. Change-Id: I287860eba067b99a1d89f8f17200820340836ff9 --- doc/source/configuringservices.rst | 10 +++++----- keystone/middleware/swift_auth.py | 9 +++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/source/configuringservices.rst b/doc/source/configuringservices.rst index b8911570..8cd5eb80 100644 --- a/doc/source/configuringservices.rst +++ b/doc/source/configuringservices.rst @@ -133,7 +133,7 @@ rather than it's built in 'tempauth'. user = [pipeline:main] - pipeline = catch_errors healthcheck cache tokenauth keystone proxy-server + pipeline = catch_errors healthcheck cache authtoken keystone proxy-server [app:proxy-server] use = egg:swift#proxy @@ -143,7 +143,7 @@ rather than it's built in 'tempauth'. paste.filter_factory = keystone.middleware.swift_auth:filter_factory operator_roles = admin, swiftoperator - [filter:tokenauth] + [filter:authtoken] paste.filter_factory = keystone.middleware.auth_token:filter_factory service_port = 5000 service_host = 127.0.0.1 @@ -196,7 +196,7 @@ S3 api. user = [pipeline:main] - pipeline = catch_errors healthcheck cache swift3 s3token tokenauth keystone proxy-server + pipeline = catch_errors healthcheck cache swift3 s3token authtoken keystone proxy-server [app:proxy-server] use = egg:swift#proxy @@ -227,7 +227,7 @@ S3 api. auth_token = ADMIN admin_token = ADMIN - [filter:tokenauth] + [filter:authtoken] paste.filter_factory = keystone.middleware.auth_token:filter_factory service_port = 5000 service_host = 127.0.0.1 @@ -267,7 +267,7 @@ still valid. Here is an example paste config filter that makes use of the 'admin_user' and 'admin_password' parameters:: - [filter:tokenauth] + [filter:authtoken] paste.filter_factory = keystone.middleware.auth_token:filter_factory service_port = 5000 service_host = 127.0.0.1 diff --git a/keystone/middleware/swift_auth.py b/keystone/middleware/swift_auth.py index 9bb38597..23578723 100644 --- a/keystone/middleware/swift_auth.py +++ b/keystone/middleware/swift_auth.py @@ -38,10 +38,15 @@ from swift.common.middleware import acl as swift_acl class SwiftAuth(object): """Swift middleware to Keystone authorization system. - In Swift's proxy-server.conf add the middleware to your pipeline:: + In Swift's proxy-server.conf add this middleware to your pipeline:: [pipeline:main] - pipeline = catch_errors cache tokenauth swiftauth proxy-server + pipeline = catch_errors cache authtoken swiftauth proxy-server + + Make sure you have the authtoken middleware before the swiftauth + middleware. The authtoken will take care of validating the user + and swiftauth middleware will authorize it. See the documentation + about how to configure the authtoken middleware. Set account auto creation to true:: -- cgit