Ask Your Question
0

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' http://192.168.224.248:5000/v2.0 * About to connect() to 192.168.224.248 port 5000 (#0) * Trying 192.168.224.248... connected * Connected to 192.168.224.248 (192.168.224.248) 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/3.13.6.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Host: 192.168.224.248:5000 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 192.168.224.248 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": "http://192.168.224.248:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/content/", "type": "text/html", "rel": "describedby"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf", "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
0

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" http://192.168.224.248:35357/v2.0/tokens

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-04-02 10:47:37 -0600

Seen: 202 times

Last updated: Apr 05 '13