Ask Your Question

Can't get an X-Storage-Url and X-Auth-Token

asked 2013-04-02 10:47:37 -0600

nizar-najmi gravatar image

Hi, Im testing a Swift environment and everything works perfectly except the "curl" command to get an X-Storage-Url and X-Auth-Token. I am using keystone in another host to authenticate. This is what i get :

[root@SWIFT-MACHINE ~]# curl -k -v -H 'X-Storage-User: admin:admin' -H 'X-Storage-Pass: cloud' * About to connect() to port 5000 (#0) * Trying connected * Connected to ( port 5000 (#0)

GET /v2.0 HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/ zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Host: Accept: / X-Storage-User: admin:admin X-Storage-Pass: cloud

< HTTP/1.1 200 OK < Vary: X-Auth-Token < Content-Type: application/json < Content-Length: 616 < Date: Tue, 02 Apr 2013 10:34:03 GMT < * Connection #0 to host left intact * Closing connection #0 {"version": {"status": "beta", "updated": "2011-11-19T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0", "links": [{"href": "", "rel": "self"}, {"href": "", "type": "text/html", "rel": "describedby"}, {"href": "", "type": "application/pdf", "rel": "describedby"}]}}

When using the "swift" commad to get stats on my accounts, objects and containers as well as to upload or dowload object, everything works smoothly.

Thanks in advance for your help.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2013-04-05 20:03:50 -0600

adriansmith gravatar image

The "X-Storage-User" and "X-Storage-Pass" headers are applicable when you're using swauth or tempauth for authentication. It appears you're using Keystone. A request to authenticate to Keystone should look something like this,

curl -d '{ "auth":{ "passwordCredentials":{ "username":"admin", "password":"cloud" }, "tenantName":"admin" }}' -H "Content-type: application/json"

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


Asked: 2013-04-02 10:47:37 -0600

Seen: 213 times

Last updated: Apr 05 '13