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

Nick Maslov azpekt at gmail.com
Wed Aug 21 04:04:27 UTC 2013


On 08/20, Lorin Hochstein wrote:
Hi Lorin,

Sure, here it is:

mbp:~ nik$ curl -d '{"auth":{"passwordCredentials":{"username": "nik", "password": "password"}}}' -H "Content-type: application/json" http://IP:35357/v2.0/tokens
{"access": {"token": {"issued_at": "2013-08-21T04:02:48.009766", "expires": "2013-08-22T04:02:48Z", "id": "MIICagYJKoZIhvcNAQcCoIICWzCCAlcCAQExCTAHBgUrDgMCGjCCAUMGCSqGSIb3DQEHAaCCATQEggEweyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0wOC0yMVQwNDowMjo0OC4wMDk3NjYiLCAiZXhwaXJlcyI6ICIyMDEzLTA4LTIyVDA0OjAyOjQ4WiIsICJpZCI6ICJwbGFjZWhvbGRlciJ9LCAic2VydmljZUNhdGFsb2ciOiBbXSwgInVzZXIiOiB7InVzZXJuYW1lIjogIm5payIsICJyb2xlc19saW5rcyI6IFtdLCAiaWQiOiAiYjMzYjQxNjMyMDcyNDJjOGEwOGNmOTE4MTNjYzRmNTYiLCAicm9sZXMiOiBbXSwgIm5hbWUiOiAibmlrIn0sICJtZXRhZGF0YSI6IHsiaXNfYWRtaW4iOiAwLCAicm9sZXMiOiBbXX19fTGB-zCB-AIBATBcMFcxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIEwVVbnNldDEOMAwGA1UEBxMFVW5zZXQxDjAMBgNVBAoTBVVuc2V0MRgwFgYDVQQDEw93d3cuZXhhbXBsZS5jb20CAQEwBwYFKw4DAhowDQYJKoZIhvcNAQEBBQAEgYAaHnBd6dUSKfoRTrX543Eb9d7CFhk0Xpp0hBlBf2QJ+J+5qCWaV6NobIA+DrbqLSbutB6Kca9-oVSFUsX6e8cBZmcofNVY35gKcK63IUUiB77xc9xicLIYbhEMP4YEtsmZvvCgr51vTGY-B9TmhX1+QYVoX+Ni3g0tXcwQlqRxsg=="}, "serviceCatalog": [], "user": {"username": "nik", "roles_links": [], "id": "b33b4163207242c8a08cf91813cc4f56", "roles": [], "name": "nik"}, "metadata": {"is_admin": 0, "roles": []}}}mbp:~ nik$

Hope that helps,
NM


> Nick:
> 
> Can you paste the output you get from curl so we can see it (e.g., put it
> in a github gist)?
> 
> Lorin
> 
> 
> 
> On Tue, Aug 20, 2013 at 10:35 AM, Nick Maslov <azpekt at gmail.com> wrote:
> 
> > Hi guys,
> >
> > I was playing around with API, something is not right for me.
> >
> > 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 believe it is something trivial I`m missing, but can someone pls point
> > me to the issue?
> >
> > Additionally - what`s the purpose of having token from curl, if it doesn`t
> > work? :)
> >
> > Cheers,
> > NM
> >
> >
> >
> > _______________________________________________
> > OpenStack-operators mailing list
> > OpenStack-operators at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
> >
> 
> 
> 
> -- 
> Lorin Hochstein
> Lead Architect - Cloud Services
> Nimbis Services, Inc.
> www.nimbisservices.com



More information about the OpenStack-operators mailing list