Keystone/identity: POST "Add user" Response Parameters missing the "username" parameter

Bug #1391532 reported by Danny Choi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Medium
Danny Choi

Bug Description

http://developer.openstack.org/api-ref-identity-v2.html

/v2.0/users

POST "Add user" Response Parameters missing the "username" parameter.

ubuntu@trusty1:~/devstack$ keystone --debug user-create --name tester
DEBUG:keystoneclient.auth.identity.v2:Making authentication request to http://192.168.0.47:5000/v2.0/tokens
INFO:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.0.47
DEBUG:urllib3.connectionpool:Setting read timeout to 600.0
DEBUG:urllib3.connectionpool:"POST /v2.0/tokens HTTP/1.1" 200 4222
DEBUG:keystoneclient.session:REQ: curl -i -X POST http://192.168.0.47:35357/v2.0/users -H "User-Agent: python-keystoneclient" -H "Content-Type: application/json" -H "X-Auth-Token: {SHA1}57614497db5d257dcff966339ac881634b17b4ee" -d '{"user": {"email": null, "password": null, "enabled": true, "name": "tester", "tenantId": null}}'
INFO:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.0.47
DEBUG:urllib3.connectionpool:Setting read timeout to 600.0
DEBUG:urllib3.connectionpool:"POST /v2.0/users HTTP/1.1" 200 124
DEBUG:keystoneclient.session:RESP: [200] date: Tue, 11 Nov 2014 14:03:31 GMT content-type: application/json content-length: 124 vary: X-Auth-Token server: Apache/2.4.7 (Ubuntu)
RESP BODY: {"user": {"username" <<<<< : "tester", "name": "tester", "enabled": true, "email": null, "id": "883ddbc6c88448c982f50a7fb931bd4b"}}

+----------+----------------------------------+
| Property | Value |
+----------+----------------------------------+
| email | |
| enabled | True |
| id | 883ddbc6c88448c982f50a7fb931bd4b |
| name | tester |
| username | tester | <<<<<<
+----------+----------------------------------+
ubuntu@trusty1:~/devstack$

Revision history for this message
Anne Gentle (annegentle) wrote :

To fix, add (or replace) the JSON in the api-site repo with the RESP BODY above.

Changed in openstack-api-site:
status: New → Confirmed
importance: Undecided → Medium
status: Confirmed → Triaged
Danny Choi (dannchoi)
Changed in openstack-api-site:
assignee: nobody → Danny Choi (dannchoi)
Revision history for this message
Danny Choi (dannchoi) wrote :

After investigation, this is not just simply to add (or replace) the JSON with the RESP BODY shown because:

1. JSON Request is different from JSON Response. The former does not have the "username" and "id" parameters.
2. Fix also needs to add the "username" parameter in the Response parameters table.

 REQ: {"user": {"email": null, "password": null, "enabled": true, "name": "tester", "tenantId": null}}

RESP BODY: {"user": {"username" <<<<< : "tester", "name": "tester", "enabled": true, "email": null, "id": "883ddbc6c88448c982f50a7fb931bd4b"}}

Changed in openstack-api-site:
assignee: Danny Choi (dannchoi) → nobody
Danny Choi (dannchoi)
Changed in openstack-api-site:
assignee: nobody → Danny Choi (dannchoi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to api-site (master)

Fix proposed to branch: master
Review: https://review.openstack.org/208087

Changed in openstack-api-site:
status: Triaged → In Progress
Changed in openstack-api-site:
milestone: none → liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/208087
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=6108350bb035e726fbca337201059f03d52e361a
Submitter: Jenkins
Branch: master

commit 6108350bb035e726fbca337201059f03d52e361a
Author: Danny Choi <email address hidden>
Date: Fri Jul 31 18:38:42 2015 -0400

    Replace the create user REQ and RESP JSON files

    Create new REQ and RESP JSON files to incldue "tenantId" in
    the REQ JSON body, and "username" in the RESP JSON body.

    Also add the "username" in the RESP parameters table.

    Change-Id: I47f9b89cd28f9a7ebe8b7d5b52919249705351ef
    Closes-Bug: 1391532

Changed in openstack-api-site:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.