← Back to team overview

openstack team mailing list archive

Re: curl with swift

 

On Mon, 10 Jun 2013 11:28:01 -0700
Remo Mattei <remo@xxxxxxxxxx> wrote:

> I am using this command now but I get not auth to get this object. 

> curl -X GET \
> -H "X-Auth-Token: 813c6eef9f474e7f860ef42dcaeeb53b" \
> http://192.168.235.113:8080/v1/AUTH_9ffeae726f33436b9e0796d31f85f730/remo.pen > Remo.pem

The command looks ok.

A "naked" token usually means Keystone. You're using Keystone, don't you?
If so, make sure that you're using the token ID and not user ID, which
Keystone also returns in the same reply.

Example:

[root@node_k1 ~]# curl -X POST http://127.0.0.1:5000/v2.0/tokens -d '{"auth": {"tenantName":"tsa17", "passwordCredentials":{"username":"spare17", "password":"secret"}}}' -H 'Content-Type: application/json'
{"access": {"token": {"expires": "2013-01-30T18:50:37Z", "id": "b2eeb6503bb94a1f8c792c9968947172"}, "serviceCatalog": {}, "user": {"username": "spare17", "roles_links": [], "id": "87c6174170ad471ca141630200f90b9b", "roles": [], "name": "spare17"}}}

Other than that, check the logs. I presume you didn't try to snip the
uuid part of a prefixed token that other authentication systems return.

-- Pete


References