Ask Your Question
1

Not getting Keystone token via http but am getting it thru keystone client

asked 2013-07-15 15:06:38 -0600

kam gravatar image

updated 2013-07-15 15:41:03 -0600

smaffulli gravatar image

Kinda of new to this so it is probably easy but....

I send this

curl -k -X 'POST' -v http://192.168.9.201:5000/v2.0/tokens
-d '{"auth":{"passwordCredentials":{"username": "admin", "password":"admin_pass"}, "tenantId":""}}' -H 'Content-type: application/json'

and get:

{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Not Authorized"}}

but I download the keystone client on the same machine. Run this:

keystone --os-username=admin --os-password=admin_pass --os-auth-url=http://192.168.9.201:5000/v2.0 token-get

and get (the box-lines and spaces are omitted here):

   |    id    | MIICbgYJKoZIhvcNAQcCoIICXzCCAlsCAQExCTAHBgUrDgMCGjCCAUcGCSqGSIb3DQEHAaCCATgEggE0eyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0wNy0xNVQxNjo0NjowNi43NzAxNDkiLCAiZXhwaXJlcyI6ICIyMDEzLTA3LTE2VDE2OjQ2OjA2WiIsICJpZCI6ICJwbGFjZWhvbGRlciJ9LCAic2VydmljZUNhdGFsb2ciOiBbXSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICJjODQxMGI1NmNjOTI0MGUzYWVkYTNmNjM3NmMzYTA4ZSIsICJyb2xlcyI6IFtdLCAibmFtZSI6ICJhZG1pbiJ9LCAibWV0YWRhdGEiOiB7ImlzX2FkbWluIjogMCwgInJvbGVzIjogW119fX0xgf8wgfwCAQEwXDBXMQswCQYDVQQGEwJVUzEOMAwGA1UECBMFVW5zZXQxDjAMBgNVBAcTBVVuc2V0MQ4wDAYDVQQKEwVVbnNldDEYMBYGA1UEAxMPd3d3LmV4YW1wbGUuY29tAgEBMAcGBSsOAwIaMA0GCSqGSIb3DQEBAQUABIGAc4VydhUBP4pRhY3kWXYFnO4Tc2hO9wfOKK+Svn3DOfgObLAVDAHEwf0B7u8pXCjtGyT4Lk4UsaqP7A0OQNPEoKHvcqeqBIkDJlW2eRiuGtz6zuWeOT7oJSLNjSQm1Zdz7Flb9x9Ah2pzSXuM2xmr6MhKx7ohH6mmMV4UpiKD8mw= |

Same URL, same ID same pass. Why doesn't the HTTP version work? Kevin

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-13 09:09:40 -0600

Rakesh Patnaik gravatar image

updated 2014-06-13 09:10:07 -0600

I guess its the "tenantId":"" in the json payload that is making the REST API look for a user "admin" under tenant "" which does not exist. I tried the same and got a similar error as yours. Remove it and it works:

curl -k -X 'POST' -v http://192.168.9.201:5000/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "admin", "password":"admin_pass"}}}' -H 'Content-type: application/json'

without the "tenantName" or "tenantId" keystone API returns an empty serviceCatalog.

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

Stats

Asked: 2013-07-15 15:06:38 -0600

Seen: 911 times

Last updated: Jun 13 '14