OpenStack Identity (Keystone)

GET /tenants/{tenant_id}/users/{user_id}/roles returns 404

Reported by Adam Young on 2012-05-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Keystone
Undecided
Unassigned

Bug Description

Following steps from http://keystone.openstack.org/api_curl_examples.html

[ayoung@ayoungstack devstack]$ curl -H "X-Auth-Token:3fe4d4433a9d4fcf9ae717845a5f1135" http://10.16.184.54:35357/v2.0/tenants/9acef53078d84ba8b32c802d44be96b1/users
{"users": [{"name": "admin", "enabled": true, "email": "<email address hidden>", "id": "25e0a9f446ab4bc4a4bc05dc52447b96", "tenantId": null}]}[ayoung@ayoungstack devstack]$

NOTE that userID is 25e0a9f446ab4bc4a4bc05dc52447b96

[ayoung@ayoungstack devstack]$
[ayoung@ayoungstack devstack]$
[ayoung@ayoungstack devstack]$ curl -H "X-Auth-Token:3fe4d4433a9d4fcf9ae717845a5f1135" http://10.16.184.54:35357/v2.0/tenants/9acef53078d84ba8b32c802d44be96b1/users/25e0a9f446ab4bc4a4bc05dc52447b96
<html>
 <head>
  <title>404 Not Found</title>
 </head>
 <body>
  <h1>404 Not Found</h1>
  The resource could not be found.<br /><br />

 </body>
</html>

Mohammed Naser (mnaser) wrote :

I can't seem replicate this issue, can you update your DB and make sure it's sync?

stack@devstack:~/devstack$ curl -H "X-Auth-Token: tokentoken" http://127.0.0.1:35357/v2.0/tenants/610c0f27afc149fe8b1c7b32e532e4c7
{"tenant": {"enabled": true, "description": null, "name": "demo", "id": "610c0f27afc149fe8b1c7b32e532e4c7"}}

stack@devstack:~/devstack$ curl -H "X-Auth-Token: tokentoken" http://127.0.0.1:35357/v2.0/tenants/610c0f27afc149fe8b1c7b32e532e4c7/users
{"users": [{"name": "demo", "enabled": true, "email": "<email address hidden>", "id": "55673f60c551491da1e36f1740bedf75", "tenantId": null}, {"name": "admin", "enabled": true, "email": "<email address hidden>", "id": "de1acf0c441f43089497565d0106820a", "tenantId": null}]}

stack@devstack:~/devstack$ curl -H "X-Auth-Token: tokentoken" http://127.0.0.1:35357/v2.0/tenants/610c0f27afc149fe8b1c7b32e532e4c7/users/55673f60c551491da1e36f1740bedf75/roles
{"roles": [{"id": "44da439b62474d929d52e13baa7ba6b4", "name": "Member"}, {"id": "11afd28c8742453084040f12753e8a25", "name": "anotherrole"}]}

It looks like your CURL call is missing the /roles at the end :)

Changed in keystone:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers