Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top