Activity log for bug #1201251

Date Who What changed Old value New value Message
2013-07-15 03:13:24 Lijun Jiang bug added bug
2013-07-15 03:30:08 Brad Figg linux (Ubuntu): status New Incomplete
2013-07-15 06:09:07 Lijun Jiang affects linux (Ubuntu) keystone
2013-07-15 06:18:02 Dolph Mathews keystone: importance Undecided Low
2013-07-15 06:18:02 Dolph Mathews keystone: status Incomplete Triaged
2013-07-15 06:19:48 Lijun Jiang description We found two problems related to updating user via keystone. (1) Via, the instruction of updating user on, http://docs.openstack.org/api/openstack-identity-service/2.0/content/POST_updateUser_v2.0_users__userId__.html It is required POST action to update the existing user email, name, or description. Via my verification, POST to update existing user caused { "error": { "message": "The resource could not be found.", "code": 404, "title": "Not Found" } } The detailed detail for this test is, [root@lijunj ~]# curl -i http://localhost:35357/v3/users/fee07a4ebc014744b31564835b715aa1 -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ADMIN" --data ' > { > "user": { > "id": "fee07a4ebc014744b31564835b715aa1", > "description": "v3 keystone user test", > "email": "none@", > "enabled": true > } > }' HTTP/1.1 404 Not Found Vary: X-Auth-Token Content-Type: application/json Content-Length: 93 Date: Mon, 15 Jul 2013 02:23:44 GMT {"error": {"message": "The resource could not be found.", "code": 404, "title": "Not Found"}} I ensure the id fee07a4ebc014744b31564835b715aa1 user which is exisitng already in environment. Below is the output of listing v3/users/fee07a4ebc014744b31564835b715aa1 [root@lijunj ~]# curl -i http://localhost:35357/v3/users/fee07a4ebc014744b31564835b715aa1 -X GET -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ADMIN" HTTP/1.1 200 OK Vary: X-Auth-Token Content-Type: application/json Content-Length: 349 Date: Mon, 15 Jul 2013 02:24:51 GMT {"user": {"aa": "144442", "name": "test", "bb": "23", "debug-wrongattribute": "12345", "cc": "45", "enabled": true, "links": {"self": "http://localhost:5000/v3/users/fee07a4ebc014744b31564835b715aa1"}, "id": "fee07a4ebc014744b31564835b715aa1", "email": "lijunjbj@cn.ibm.com", "debug_wrongattribute": "12345", "domain_id": "default", "tenantId": ""}} The user fee07a4ebc014744b31564835b715aa1 was created for testing. We may discuss this document correction-ability. And, POST can not be done for updating user, but PUT action can be done. (2) Document in http://docs.openstack.org/ does not mention, updating user can support to refresh a user tenant id/ project id. And "keystone user-update" command does not allow to have any parameter to refresh tenant-id / project-id of a user. But REST API keeps silent for any clients attempting to change a existing user tenant id or project id. From my test verification, in spite of changing tenant/project id for a existing user, the user still belongs to the original tenant / project. That means, updating tenant / project id for a user is invalid. --Create user curl -i http://localhost:35357/v2.0/users/ -X POST -H "Content-Type: application/json" -H "X-Auth-Token: ADMIN" --data ' { "user": { "name": "li-03", "description": "v2.0 keystone user test", "email": "none@", "tenantId": "ccaf7621482a41ce91d3ee824ff7c959", "password": "passw0rd", "enabled": true } }' Response: {"user": {"description": "v2.0 keystone user test", "name": "li-03", "enabled": true, "email": "none@", "id": "00027b03821f4b7590a1a94f865a61ff", "tenantId": "ccaf7621482a41ce91d3ee824ff7c959"}} -- List the tenant users. curl -i http://localhost:35357/v2.0/tenants/ccaf7621482a41ce91d3ee824ff7c959/users -X GET -H "Content-Type: application/json" -H "X-Auth-Token: ADMIN" {"users": [{"name": "sceagent", "id": "07d544b772ce4ab18592d165cea9b8da", "tenantId": ....//The content is not important. li-03 is in tenant ccaf7621482a41ce91d3ee824ff7c959 already. {"name": "li-03", "description": "v2.0 keystone user test", "enabled": true, "email": "none@", "id": "00027b03821f4b7590a1a94f865a61ff", "tenantId": "ccaf7621482a41ce91d3ee824ff7c959"}]} --Update user. Used anther tenant id inside, and rest api does not throw exception. curl -i http://localhost:35357/v2.0/users/00027b03821f4b7590a1a94f865a61ff -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: ADMIN" --data ' { "user": { "name": "li-03", "description": "v2.0 keystone user test 01", "email": "none@", "tenantId": "e0cdb35aa15d45f998c308eb78407513", "password": "passw0rd", "enabled": true } }' Response: {"user": {"description": "v2.0 keystone user test 01", "name": "li-03", "extra": {"tenantId": "e0cdb35aa15d45f998c308eb78407513", "description": "v2.0 keystone user test 01", "email": "none@"}, "enabled": true, "email": "none@", "id": "00027b03821f4b7590a1a94f865a61ff", "tenantId": "e0cdb35aa15d45f998c308eb78407513"}} --List tenant e0cdb35aa15d45f998c308eb78407513 user curl -i http://localhost:35357/v2.0/tenants/e0cdb35aa15d45f998c308eb78407513/users -X GET -H "Content-Type: application/json" -H "X-Auth-Token: ADMIN" Response: {"users": []} The user was not updated to add into e0cdb35aa15d45f998c308eb78407513. From above, we can not upate user to change a existing user tenant/project. Is it good way we add the tight 'assert'/judgement for any attemption of updating user tenantId property? We found two problems related to updating user via keystone. (1) Via, the instruction of updating user on, http://docs.openstack.org/api/openstack-identity-service/2.0/content/POST_updateUser_v2.0_users__userId__.html It is required POST action to update the existing user email, name, or description. Via my verification, POST to update existing user caused {     "error": {         "message": "The resource could not be found.",         "code": 404,         "title": "Not Found"     } } The detailed for this test is, [root@lijunj ~]# curl -i http://localhost:35357/v3/users/fee07a4ebc014744b31564835b715aa1 -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ADMIN" --data ' > { > "user": { > "id": "fee07a4ebc014744b31564835b715aa1", > "description": "v3 keystone user test", > "email": "none@", > "enabled": true > } > }' HTTP/1.1 404 Not Found Vary: X-Auth-Token Content-Type: application/json Content-Length: 93 Date: Mon, 15 Jul 2013 02:23:44 GMT {"error": {"message": "The resource could not be found.", "code": 404, "title": "Not Found"}} I ensure the id fee07a4ebc014744b31564835b715aa1 user which is exisitng already in environment. Below is the output of listing v3/users/fee07a4ebc014744b31564835b715aa1 --List user [root@lijunj ~]# curl -i http://localhost:35357/v3/users/fee07a4ebc014744b31564835b715aa1 -X GET -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ADMIN" HTTP/1.1 200 OK Vary: X-Auth-Token Content-Type: application/json Content-Length: 349 Date: Mon, 15 Jul 2013 02:24:51 GMT {"user": {"aa": "144442", "name": "test", "bb": "23", "debug-wrongattribute": "12345", "cc": "45", "enabled": true, "links": {"self": "http://localhost:5000/v3/users/fee07a4ebc014744b31564835b715aa1"}, "id": "fee07a4ebc014744b31564835b715aa1", "email": "lijunjbj@cn.ibm.com", "debug_wrongattribute": "12345", "domain_id": "default", "tenantId": ""}} The user fee07a4ebc014744b31564835b715aa1 was created for testing. We may discuss this document correction-ability. And, POST can not be used for updating user, but PUT action can. (2) Document in http://docs.openstack.org/ does mention, updating user can not support to refresh a user tenant id/ project id. And "keystone user-update" command is designed not to allow to have any parameter to refresh tenant-id / project-id of a user. But REST API keeps silent for any clients attempt to change a existing user tenant id or project id. From my test verification, in spite of changing successfully tenant/project id for a existing user, the user still belongs to the original tenant / project. That means, updating tenant / project id for a user is invalid. --Create user curl -i http://localhost:35357/v2.0/users/ -X POST -H "Content-Type: application/json" -H "X-Auth-Token: ADMIN" --data ' {     "user": {         "name": "li-03",         "description": "v2.0 keystone user test",         "email": "none@",         "tenantId": "ccaf7621482a41ce91d3ee824ff7c959",         "password": "passw0rd",         "enabled": true     } }' Response: {"user": {"description": "v2.0 keystone user test", "name": "li-03", "enabled": true, "email": "none@", "id": "00027b03821f4b7590a1a94f865a61ff", "tenantId": "ccaf7621482a41ce91d3ee824ff7c959"}} -- List the tenant users. curl -i http://localhost:35357/v2.0/tenants/ccaf7621482a41ce91d3ee824ff7c959/users -X GET -H "Content-Type: application/json" -H "X-Auth-Token: ADMIN" {"users": [{"name": "sceagent", "id": "07d544b772ce4ab18592d165cea9b8da", "tenantId": ....//The content is not important. li-03 is in tenant ccaf7621482a41ce91d3ee824ff7c959 already.  {"name": "li-03", "description": "v2.0 keystone user test", "enabled": true, "email": "none@", "id": "00027b03821f4b7590a1a94f865a61ff", "tenantId": "ccaf7621482a41ce91d3ee824ff7c959"}]} --Update user. Used anther tenant id inside, and rest api does not throw exception. curl -i http://localhost:35357/v2.0/users/00027b03821f4b7590a1a94f865a61ff -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: ADMIN" --data ' {     "user": {         "name": "li-03",         "description": "v2.0 keystone user test 01",         "email": "none@",         "tenantId": "e0cdb35aa15d45f998c308eb78407513",         "password": "passw0rd",         "enabled": true     } }' Response: {"user": {"description": "v2.0 keystone user test 01", "name": "li-03", "extra": {"tenantId": "e0cdb35aa15d45f998c308eb78407513", "description": "v2.0 keystone user test 01", "email": "none@"}, "enabled": true, "email": "none@", "id": "00027b03821f4b7590a1a94f865a61ff", "tenantId": "e0cdb35aa15d45f998c308eb78407513"}} --List tenant e0cdb35aa15d45f998c308eb78407513 user curl -i http://localhost:35357/v2.0/tenants/e0cdb35aa15d45f998c308eb78407513/users -X GET -H "Content-Type: application/json" -H "X-Auth-Token: ADMIN" Response: {"users": []} The user was not updated to add into e0cdb35aa15d45f998c308eb78407513. From above, we can not upate user to change a existing user tenant/project. Is it good way we add the tight 'assert'/judgement for any attemption of updating user tenantId property?
2013-07-15 06:20:06 Lijun Jiang keystone: status Triaged New
2013-07-17 16:47:17 Dolph Mathews keystone: status New Triaged
2013-08-08 08:37:02 kaitian521 tags update
2013-08-08 08:38:39 kaitian521 keystone: status Triaged Confirmed
2013-08-12 06:13:49 Dazhao Yu keystone: assignee Dazhao Yu (dzyu)
2013-08-12 06:14:03 OpenStack Infra keystone: status Confirmed In Progress
2013-08-26 10:20:51 OpenStack Infra keystone: assignee Dazhao Yu (dzyu) Ya Hong Du (yahongdu)
2013-09-04 15:04:31 Dolph Mathews keystone: importance Low Medium
2013-09-10 09:18:26 Haw Loeung bug added subscriber Haw Loeung
2013-09-17 21:35:29 OpenStack Infra keystone: assignee Ya Hong Du (yahongdu) Morgan Fainberg (mdrnstm)
2013-09-18 06:58:06 OpenStack Infra keystone: assignee Morgan Fainberg (mdrnstm) Ya Hong Du (yahongdu)
2013-09-18 08:09:32 OpenStack Infra keystone: assignee Ya Hong Du (yahongdu) Morgan Fainberg (mdrnstm)
2013-09-21 00:16:23 OpenStack Infra keystone: assignee Morgan Fainberg (mdrnstm) Ya Hong Du (yahongdu)
2013-09-22 19:58:41 OpenStack Infra keystone: assignee Ya Hong Du (yahongdu) Morgan Fainberg (mdrnstm)
2013-09-24 03:11:24 OpenStack Infra keystone: assignee Morgan Fainberg (mdrnstm) Ya Hong Du (yahongdu)
2013-09-24 12:07:23 OpenStack Infra keystone: assignee Ya Hong Du (yahongdu) Dolph Mathews (dolph)
2013-09-24 14:34:19 Dolph Mathews keystone: assignee Dolph Mathews (dolph) Ya Hong Du (yahongdu)
2013-09-24 23:29:14 OpenStack Infra keystone: status In Progress Fix Committed
2013-10-02 11:29:59 Thierry Carrez keystone: status Fix Committed Fix Released
2013-10-02 11:29:59 Thierry Carrez keystone: milestone havana-rc1
2013-10-17 12:41:58 Thierry Carrez keystone: milestone havana-rc1 2013.2