[Openstack-operators] Different tokens from "keystone token-get" and curl to port 35357

Ahmed RAHAL arahal at iweb.com
Tue Aug 20 18:26:31 UTC 2013


Hi Nick

Le 2013-08-20 10:35, Nick Maslov a écrit :
[...]

> Tokens I got from "keystone token-get" and one I got from curl -d '{"auth":{"passwordCredentials":{"username": "nik", "password": "password"}}}' -H "Content-type: application/json" http://IP:35357/v2.0/tokens are different. First one is much bigger (3,8Kb) than one from curl (800b).
>
> One I got from "keystone token-get" works with API calls, second one doesnt.
>

I also got surprised by this as it gets you a token in both cases.
You need to add the tenantname in your request:
curl -d '{"auth":{"tenantName": "tenantname", 
"passwordCredentials":{"username": "nik", "password": "password"}}}' -H 
"Content-type: application/json" http://IP:35357/v2.0/tokens


This mainly gets you the endpoints that you need to call other APIs.

Hope this helps, as it worked for me.


--
=================================================
Ahmed Rahal <arahal at iweb.com> / iWeb Technologies
Spécialiste de l'Architecture TI
/ IT Architecture Specialist
=================================================



More information about the OpenStack-operators mailing list