username vs. name in token["user"] dict

Bug #955563 reported by Brian Lamar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Brian Lamar

Bug Description

Unsure how else to title this issue. I just encountered a rather subtle discrepancy between the docs and code. Keystone's API docs indicate that token["user"] will have keys "id", "name", "roles", and "roles_links". However, the auth_token.py middleware checks for token["user"]["username"]. Actually, it seems that keystone returns both "user" and "username" with identical values:

http://paste.openstack.org/show/9451/

Can we standardize on "name" to match the docs?

http://docs.openstack.org/api/openstack-identity-service/2.0/content/POST_authenticate_v2.0_tokens_Service_API_Client_Operations.html

Brian Lamar (blamar)
Changed in keystone:
assignee: nobody → Brian Lamar (blamar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/5374
Committed: http://github.com/openstack/keystone/commit/ab6be05068068b0902db44b1d60f56eea4fe1215
Submitter: Jenkins
Branch: master

commit ab6be05068068b0902db44b1d60f56eea4fe1215
Author: Brian Lamar <email address hidden>
Date: Wed Mar 14 18:30:13 2012 -0400

    Update username -> name in token response.

    Tokens validation responses contain user information. The API docs
    seem to indicate token["user"]["name"] contains the username but
    currently the auth_token.py middleware checks for
    token["user"]["username"]. This updates that check and the tests.

    Fixes bug 955563

    Change-Id: Ib2fbf6fcea87f7066394cf14c18158f1e5eeaf06

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → essex-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-rc1 → 2012.1
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.