Listing roleRefs (Role assignments) for non existent user returns an incorrect status code

Bug #999209 reported by Rohit Karajgi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Dolph Mathews

Bug Description

A GET on list roleRefs

say, http://10.2.3.123:35357/v2.0/users/<non_existent_user_id>/roleRefs

returns HTTP 200 and a blank list response body. {"roles": [ ]}

It should ideally return a 404 NotFound error.

Joseph Heck (heckj)
Changed in keystone:
status: New → Triaged
importance: Undecided → Low
Dolph Mathews (dolph)
Changed in keystone:
assignee: nobody → Dolph Mathews (dolph)
Revision history for this message
Dolph Mathews (dolph) wrote :

This is fixed by the patch already in review for bug 968519.

Revision history for this message
Dolph Mathews (dolph) wrote :

After applying patch referenced above:

    $ curl -H 'X-Auth-Token: ADMIN' http://localhost:35357/v2.0/users/asdf/roleRefs | python -mjson.tool
    {
        "error": {
            "code": 404,
            "message": "Could not find user: asdf",
            "title": "Not Found"
        }
    }

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

Reviewed: https://review.openstack.org/6875
Committed: http://github.com/openstack/keystone/commit/23ca656927947dada40591bdd1badd5a531c2983
Submitter: Jenkins
Branch: master

commit 23ca656927947dada40591bdd1badd5a531c2983
Author: Dolph Mathews <email address hidden>
Date: Wed Mar 28 10:37:16 2012 -0700

    Refactor 404's into managers & drivers (bug 968519)

    The goal is to move the responsibility of reference checks away from
    controllers and into the underlying managers & drivers, which can
    handle the task with equal or greater efficiency.

    - Tenant references from create_user/update_user are NOT tested
      due to inconsistencies between backends
    - Additional test coverage improvements

    Also fixes bug 999209, bug 999608, bug 1006029, bug 1006055, bug 1006287,
    bug 1006334, and bug 1006344.

    Change-Id: I7de592e7dd4518038436b9a9fdaab559b00a0537

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