Skip to content

Commit bd22dbe

Browse files
committed
Removing DevAuth
1 parent ca51e87 commit bd22dbe

26 files changed

+102
-3081
lines changed

bin/swift-auth-add-user

Lines changed: 0 additions & 73 deletions
This file was deleted.

bin/swift-auth-recreate-accounts

Lines changed: 0 additions & 53 deletions
This file was deleted.

bin/swift-auth-server

Lines changed: 0 additions & 22 deletions
This file was deleted.

bin/swift-auth-to-swauth

Lines changed: 0 additions & 44 deletions
This file was deleted.

bin/swift-auth-update-reseller-prefixes

Lines changed: 0 additions & 48 deletions
This file was deleted.

doc/source/admin_guide.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,12 @@ of the cluster, we need to run the swift-stats-report tool to check the health
159159
of each of these containers and objects.
160160

161161
These tools need direct access to the entire cluster and to the ring files
162-
(installing them on an auth server or a proxy server will probably do). Both
162+
(installing them on a proxy server will probably do). Both
163163
swift-stats-populate and swift-stats-report use the same configuration file,
164164
/etc/swift/stats.conf. Example conf file::
165165

166166
[stats]
167-
# For DevAuth:
168-
auth_url = http://saio:11000/v1.0
169-
# For Swauth:
170-
# auth_url = http://saio:11000/auth/v1.0
167+
auth_url = http://saio:11000/auth/v1.0
171168
auth_user = test:tester
172169
auth_key = testing
173170

@@ -236,15 +233,16 @@ then be graphed to see how cluster performance is trending.
236233
Additional Cleanup Script for Swauth
237234
------------------------------------
238235

239-
If you decide to use Swauth, you'll want to install a cronjob to clean up any
236+
With Swauth, you'll want to install a cronjob to clean up any
240237
orphaned expired tokens. These orphaned tokens can occur when a "stampede"
241238
occurs where a single user authenticates several times concurrently. Generally,
242239
these orphaned tokens don't pose much of an issue, but it's good to clean them
243240
up once a "token life" period (default: 1 day or 86400 seconds).
244241

245-
This should be as simple as adding `swauth-cleanup-tokens -K swauthkey >
246-
/dev/null` to a crontab entry on one of the proxies that is running Swauth; but
247-
run `swauth-cleanup-tokens` with no arguments for detailed help on the options
242+
This should be as simple as adding `swauth-cleanup-tokens -A
243+
https://<PROXY_HOSTNAME>:8080/auth/ -K swauthkey > /dev/null` to a crontab
244+
entry on one of the proxies that is running Swauth; but run
245+
`swauth-cleanup-tokens` with no arguments for detailed help on the options
248246
available.
249247

250248
------------------------

doc/source/auth.rst

Lines changed: 0 additions & 15 deletions
This file was deleted.

doc/source/development_auth.rst

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ Auth Server and Middleware
66
Creating Your Own Auth Server and Middleware
77
--------------------------------------------
88

9-
The included swift/auth/server.py and swift/common/middleware/auth.py are good
10-
minimal examples of how to create an external auth server and proxy server auth
11-
middleware. Also, see swift/common/middleware/swauth.py for
12-
a more complete implementation. The main points are that the auth middleware
13-
can reject requests up front, before they ever get to the Swift Proxy
14-
application, and afterwards when the proxy issues callbacks to verify
15-
authorization.
9+
The included swift/common/middleware/swauth.py is a good example of how to
10+
create an auth subsystem with proxy server auth middleware. The main points are
11+
that the auth middleware can reject requests up front, before they ever get to
12+
the Swift Proxy application, and afterwards when the proxy issues callbacks to
13+
verify authorization.
1614

1715
It's generally good to separate the authentication and authorization
1816
procedures. Authentication verifies that a request actually comes from who it
@@ -29,7 +27,7 @@ specific information, it just passes it along. Convention has
2927
environ['REMOTE_USER'] set to the authenticated user string but often more
3028
information is needed than just that.
3129

32-
The included DevAuth will set the REMOTE_USER to a comma separated list of
30+
The included Swauth will set the REMOTE_USER to a comma separated list of
3331
groups the user belongs to. The first group will be the "user's group", a group
3432
that only the user belongs to. The second group will be the "account's group",
3533
a group that includes all users for that auth account (different than the
@@ -39,7 +37,7 @@ will be omitted.
3937

4038
It is highly recommended that authentication server implementers prefix their
4139
tokens and Swift storage accounts they create with a configurable reseller
42-
prefix (`AUTH_` by default with the included DevAuth). This prefix will avoid
40+
prefix (`AUTH_` by default with the included Swauth). This prefix will avoid
4341
conflicts with other authentication servers that might be using the same
4442
Swift cluster. Otherwise, the Swift cluster will have to try all the resellers
4543
until one validates a token or all fail.
@@ -48,22 +46,20 @@ A restriction with group names is that no group name should begin with a period
4846
'.' as that is reserved for internal Swift use (such as the .r for referrer
4947
designations as you'll see later).
5048

51-
Example Authentication with DevAuth:
49+
Example Authentication with Swauth:
5250

53-
* Token AUTH_tkabcd is given to the DevAuth middleware in a request's
51+
* Token AUTH_tkabcd is given to the Swauth middleware in a request's
5452
X-Auth-Token header.
55-
* The DevAuth middleware makes a validate token AUTH_tkabcd call to the
56-
external DevAuth server.
57-
* The external DevAuth server validates the token AUTH_tkabcd and discovers
53+
* The Swauth middleware validates the token AUTH_tkabcd and discovers
5854
it matches the "tester" user within the "test" account for the storage
5955
account "AUTH_storage_xyz".
60-
* The external DevAuth server responds with "X-Auth-Groups:
61-
test:tester,test,AUTH_storage_xyz"
56+
* The Swauth server sets the REMOTE_USER to
57+
"test:tester,test,AUTH_storage_xyz"
6258
* Now this user will have full access (via authorization procedures later)
6359
to the AUTH_storage_xyz Swift storage account and access to containers in
6460
other storage accounts, provided the storage account begins with the same
6561
`AUTH_` reseller prefix and the container has an ACL specifying at least
66-
one of those three groups returned.
62+
one of those three groups.
6763

6864
Authorization is performed through callbacks by the Swift Proxy server to the
6965
WSGI environment's swift.authorize value, if one is set. The swift.authorize
@@ -283,11 +279,9 @@ sometimes that's less important than meeting certain ACL requirements.
283279
Integrating With repoze.what
284280
----------------------------
285281

286-
Here's an example of integration with repoze.what, though honestly it just does
287-
what the default swift/common/middleware/auth.py does in a slightly different
288-
way. I'm no repoze.what expert by any stretch; this is just included here to
289-
hopefully give folks a start on their own code if they want to use
290-
repoze.what::
282+
Here's an example of integration with repoze.what, though honestly I'm no
283+
repoze.what expert by any stretch; this is just included here to hopefully give
284+
folks a start on their own code if they want to use repoze.what::
291285

292286
from time import time
293287

0 commit comments

Comments
 (0)