Ask Your Question
0

problem in setting up Tempauth authentication & authorization with swift

asked 2013-08-26 01:42:53 -0500

pragya jain gravatar image

updated 2013-08-26 03:16:44 -0500

rahmu gravatar image

I am installing and configuring swift on my PC.

I have to configure proxy server. For this, I have to edit /etc/swift/swift.conf and change the swift_hash_path_suffix to something secret and then, start the proxy server process

for this, I use the following commands: root@arun-Aspire-5742:~# vi /etc/swift/swift.conf

make following changes (highlighted) in the file: swift_hash_path_suffix =pragya swift_hash_path_prefix =jain

save and exit. then, I run the command: root@arun-Aspire-5742:~# sudo swift-init proxy start Starting proxy-server...(/etc/swift/proxy-server.conf)

Now, I have to set up Tempauth authentication & authorization with Swift for this, I run the following command: root@arun-Aspire-5742:~# vi /etc/swift/proxy-server.conf

make following changes (highlighted) in the file: allow_account_management =true ... [filter:tempauth] use = egg:swift#tempauth ... user_admin_admin = admin .admin .reseller_admin user_test_tester = testing .admin user_test2_tester2 = testing2 .admin user_test_tester3 = testing3 user_prag2648_pragya = pj2648.admin.reseller_admin ...

save and exit Then, run following commands: root@arun-Aspire-5742:~# sudo swift-init account start Starting account-server...(/etc/swift/account-server.conf) root@arun-Aspire-5742:~# sudo swift-init proxy restart Signal proxy-server pid: 2476 signal: 15 proxy-server (2476) appears to have stopped Starting proxy-server...(/etc/swift/proxy-server.conf) root@arun-Aspire-5742:~# curl -v -H 'X-Auth-User:prag2648:pragya' -H 'X-Auth-Key:pj2648' http://localhost/auth/v1.0/ * About to connect() to localhost port 80 (#0) * Trying 127.0.0.1... Connection refused * couldn't connect to host * Closing connection #0 curl: (7) couldn't connect to host

But, there is an error in establising a connection.

if, I run the command to start proxy server, then it shows that proxy server is already started. root@arun-Aspire-5742:~# sudo swift-init proxy start proxy-server running (2935 - /etc/swift/proxy-server.conf) proxy-server already started...

Please help me in this regard.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-09-04 00:40:52 -0500

Edward Zhang gravatar image

The default bind port of Swift proxy server is 8080, not 80. you should check it in /etc/swift/proxy-server.conf. make sure your are connecting the correct port and it has been bound by swift-proxy-server. After it has been successfully started, you can use this command to verify tempauth authentication. swift -A http://localhost:8080/auth/v1.0/ -U test:tester -K testing stat Don't forget disable keystone authentication in proxy config file if you want to use tempauth.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-08-26 01:42:53 -0500

Seen: 693 times

Last updated: Sep 04 '13