V2 to V3 token intermix for unscoped token is broken

Bug #1156913 reported by Guang Yee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Guang Yee

Bug Description

To reproduce the problem.

1) obtain an unscoped token using V2 API
2) try to validate the token with V3 API and Keystone produces the following stacktrace

Traceback (most recent call last):
  File "/home/gyee/projects/openstack/keystone/keystone/common/wsgi.py", line 236, in __call__
    result = method(context, **params)
  File "/home/gyee/projects/openstack/keystone/keystone/common/controller.py", line 104, in wrapper
    return f(self, context, **kwargs)
  File "/home/gyee/projects/openstack/keystone/keystone/auth/controllers.py", line 401, in validate_token
    token_ref.get('tenant'))
  File "/home/gyee/projects/openstack/keystone/keystone/auth/token_factory.py", line 231, in recreate_token_data
    project_id = project_ref['id']
TypeError: 'NoneType' object has no attribute '__getitem__'

Looks like we are making an assumption that project_ref is always valid.

Guang Yee (guang-yee)
Changed in keystone:
milestone: none → grizzly-rc1
assignee: nobody → Guang Yee (guang-yee)
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/24729

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

Reviewed: https://review.openstack.org/24729
Committed: http://github.com/openstack/keystone/commit/75637be4bc160f25b130690e6d31ee3a66522ce6
Submitter: Jenkins
Branch: master

commit 75637be4bc160f25b130690e6d31ee3a66522ce6
Author: Guang Yee <email address hidden>
Date: Mon Mar 18 17:18:22 2013 -0700

    V2, V3 token intermix for unscoped tokens (bug 1156913)

    Make sure we check for tenant_ref before referencing it.

    Change-Id: If7918c0a9b2e99f8555e902e89166c6542105209

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