Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift user's authorization

everyone. I installed Swift 1.7.4 , and I want to add a new user to Swift, How could I do it? I find that in 1.4.8 version, somebody had said that I should install the swauth first and I notice that the Swift api also said that choose one authrize way, so I must install a authorization service first? I also find that there is a tempauth middleware in the proxy-server.conf file, could I use this to add user and how?

like image 877
cjmandlulu Avatar asked Feb 17 '23 09:02

cjmandlulu


1 Answers

Yes. You can choose from swauth or tempauth. The most difference of these two auth systems is where they store user information.

Swauth stores user/password information in swift cluster itself. It uses a special container and store every user's information in it. Swauth provides a set of commands for user management such as swauth-add-user, swauth-prep, etc.

In tempauth, it stores user information in proxy-server.conf, so it is very easy to use. In your proxy-server.conf, enable tempauth in pipeline and put user information in tempauth section. For example,

[pipeline:main]
pipeline = healthcheck cache tempauth proxy-server

[filter:tempauth]
use = egg:swift#tempauth
user_admin_admin = admin .admin
user_hi_hihi = testing

Then you will have two users. One is admin:admin whose password is admin. The other is hi:hihi whose password is testing.

like image 85
onemouth Avatar answered Mar 07 '23 08:03

onemouth