← Back to team overview

openstack team mailing list archive

Problem to getting credentials on Devstack

 

Hi to all,
i'm a newbie......i try to getting credentials by curl. I installed
Devstack on a VM and i try to retrieve a token. My action are explained
below.

curl -X POST -d '{"auth":{"tenantName":
"demo","passwordCredentials":{"username": "pippo", "password": "pippo"}}}'
-H "Content-type: application/json" http://192.168.102.21:35357/v2.0/tokens

i received this response:

{"access": {"token": {"issued_at": "2013-03-19T17:30:54.545884", "expires":
"2013-03-20T17:30:54Z", "id":
"MIIKtQYJKoZIhvcNAQcCoIIKpjCCCqICAQExCTAHBgUrDgMCGjCCCY4GCSqGSIb3DQEHAaCCCX8Eggl7eyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0wMy0xOVQxNzozMDo1NC41NDU4ODQiLCAiZXhwaXJlcyI6ICIyMDEzLTAzLTIwVDE3OjMwOjU0WiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogbnVsbCwgImVuYWJsZWQiOiB0cnVlLCAiaWQiOiAiZDRkOTk4MWJmNzZlNGY4NDkyM2Y0OGEwYzg5MDNlZTEiLCAibmFtZSI6ICJkZW1vIn19LCAic2VydmljZUNhdGFsb2ciOiBbeyJlbmRwb2ludHMiOiBbeyJhZG1pblVSTCI6ICJodHRwOi8vMTkyLjE2OC4xMDIuMjE6ODc3NC92Mi9kNGQ5OTgxYmY3NmU0Zjg0OTIzZjQ4YTBjODkwM2VlMSIsICJyZWdpb24iOiAiUmVnaW9uT25lIiwgImludGVybmFsVVJMIjogImh0dHA6Ly8xOTIuMTY4LjEwMi4yMTo4Nzc0L3YyL2Q0ZDk5ODFiZjc2ZTRmODQ5MjNmNDhhMGM4OTAzZWUxIiwgImlkIjogIjkyYzcyZDRmMWM4ZDRkZThiOWIxZTI2MjhmMTNlMGQ3IiwgInB1YmxpY1VSTCI6ICJodHRwOi8vMTkyLjE2OC4xMDIuMjE6ODc3NC92Mi9kNGQ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l0eSIsICJuYW1lIjogImtleXN0b25lIn1dLCAidXNlciI6IHsidXNlcm5hbWUiOiAicGlwcG8iLCAicm9sZXNfbGlua3MiOiBbXSwgImlkIjogImNkMjg0MjUwM2JjYTQ5ZWE5YmViNjExYTlmYWFhMmJkIiwgInJvbGVzIjogW3sibmFtZSI6ICJfbWVtYmVyXyJ9LCB7Im5hbWUiOiAiTWVtYmVyIn1dLCAibmFtZSI6ICJwaXBwbyJ9LCAibWV0YWRhdGEiOiB7ImlzX2FkbWluIjogMCwgInJvbGVzIjogWyI5ZmUyZmY5ZWU0Mzg0YjE4OTRhOTA4NzhkM2U5MmJhYiIsICJhNTM4ODBlYjVmOGI0ZWRmYjU3NjJkYTRiMGFiYmRkMiJdfX19MYH-MIH8AgEBMFwwVzELMAkGA1UEBhMCVVMxDjAMBgNVBAgTBVVuc2V0MQ4wDAYDVQQHEwVVbnNldDEOMAwGA1UEChMFVW5zZXQxGDAWBgNVBAMTD3d3dy5leGFtcGxlLmNvbQIBATAHBgUrDgMCGjANBgkqhkiG9w0BAQEFAASBgB2xrgKcUcge1LtBQqLwQ2CDX3wlLq4uc+AmHsd2JXdEUWVXUJnDn9TSQyDIAzxdwNt10jxuleb3LrNQncu9Ay75C6MUdtrMTXWU0QGXkBAE15r97DmNl3QVmeL758Fr+P4tNcrlY8gMgAISUZAtgGR2txu3qoaauNn7Au56pWbl",
"tenant": {"description": null, "enabled": true, "id":
"d4d9981bf76e4f84923f48a0c8903ee1", "name": "demo"}}, "serviceCatalog":
[{"endpoints": [{"adminURL": "
http://192.168.102.21:8774/v2/d4d9981bf76e4f84923f48a0c8903ee1";, "region":
"RegionOne", "internalURL": "
http://192.168.102.21:8774/v2/d4d9981bf76e4f84923f48a0c8903ee1";, "id":
"92c72d4f1c8d4de8b9b1e2628f13e0d7", "publicURL": "
http://192.168.102.21:8774/v2/d4d9981bf76e4f84923f48a0c8903ee1"}],
"endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints":
[{"adminURL": "http://192.168.102.21:3333";, "region": "RegionOne",
"internalURL": "http://192.168.102.21:3333";, "id":
"257226b222de461681fb83b45b6e6787", "publicURL":
"http://192.168.102.21:3333"}],
"endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints":
[{"adminURL": "http://192.168.102.21:9292";, "region": "RegionOne",
"internalURL": "http://192.168.102.21:9292";, "id":
"3ffc06538b5742e898a39d85473671f9", "publicURL":
"http://192.168.102.21:9292"}],
"endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints":
[{"adminURL": "
http://192.168.102.21:8776/v1/d4d9981bf76e4f84923f48a0c8903ee1";, "region":
"RegionOne", "internalURL": "
http://192.168.102.21:8776/v1/d4d9981bf76e4f84923f48a0c8903ee1";, "id":
"196eb65a87684d9cb9e30c9fb099b275", "publicURL": "
http://192.168.102.21:8776/v1/d4d9981bf76e4f84923f48a0c8903ee1"}],
"endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints":
[{"adminURL": "http://192.168.102.21:8773/services/Admin";, "region":
"RegionOne", "internalURL": "http://192.168.102.21:8773/services/Cloud";,
"id": "1a9aed8c3fbc4232b9f7577e90cdb5f6", "publicURL": "
http://192.168.102.21:8773/services/Cloud"}], "endpoints_links": [],
"type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "
http://192.168.102.21:35357/v2.0";, "region": "RegionOne", "internalURL": "
http://192.168.102.21:5000/v2.0";, "id": "05ee463025254a36b12f44867c565058",
"publicURL": "http://192.168.102.21:5000/v2.0"}], "endpoints_links": [],
"type": "identity", "name": "keystone"}], "user": {"username": "pippo",
"roles_links": [], "id": "cd2842503bca49ea9beb611a9faaa2bd", "roles":
[{"name": "_member_"}, {"name": "Member"}], "name": "pippo"}, "metadata":
{"is_admin": 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab",
"a53880eb5f8b4edfb5762da4b0abbdd2"]}}}


I expected to receive a short id, but if i use the token id to request the
VM list i receive a 401 code error

What is the problem??

Thanks