Roles controller 'add_role_to_user' API conflict

Bug #925496 reported by Rafael Durán Castañeda
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Undecided
Dolph Mathews

Bug Description

Hi,

I've noticed that 'add_role_to_user' method from RolesController conflicts Keystone API. This method is returning just the status code and no body while others API methods updating resources returns the status code and the updated resource as body. Thus, this conflict can produce errors on some clients expecting an updated resource at body response, as it does python-keystoneclient.

Bye

Dolph Mathews (dolph)
Changed in keystone:
assignee: nobody → Dolph Mathews (dolph)
Revision history for this message
Dolph Mathews (dolph) wrote :

This behavior is by design.

The HTTP spec makes no assertions that a successful PUT operation MUST return a response body, and our specification takes advantage of that (see quotations below).

From our OS-KSADM API specification:

    2.1.1.6. Add Global roles to a user:
    "This operation does not require a request body and does not return a response body."

    2.1.2.7. Add roles to a user on a tenant:
    "This operation does not require a request body and does not return a response body."

In this specific case, the presence of a response body would be more likely attributed with a failure condition (error message).

Clients should NOT expect a response body; additionally, this behavior has recently changed in python-keystoneclient (see https://github.com/openstack/python-keystoneclient/commit/2914c2b1d1e36aa12ba5bd9b4c2ee9b594f1a79c ).

Changed in keystone:
status: New → Invalid
Revision history for this message
Rafael Durán Castañeda (rafadurancastaneda) wrote :

Ok, thank you for your fast response Dolph, I missed checking OS-KSADM API specification before posting and I feel like this conflicts other API parts returning a body on similar situations; but no problem knowing it in advance.

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.