HTTP 404 creating trust with role that you don't have

Bug #1724685 reported by Matthew Edmonds
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Confirmed
Low
Vishakha Agarwal

Bug Description

keystone returns HTTP 404 if you try to create a trust with a role that you don't have. This is not an appropriate error code for that case. It should be HTTP 400 (Bad Request).

Found in Pike

Revision history for this message
Matthew Edmonds (edmondsw) wrote :

Probably can't fix this until we've added microversion support, since API guidelines say you can't change return codes without a microversion.

tags: added: fix-requires-microversion
Changed in keystone:
importance: Undecided → Low
status: New → Confirmed
Changed in keystone:
assignee: nobody → Vishakha Agarwal (vishakha.agarwal)
Revision history for this message
Adam Young (ayoung) wrote :

404 means not found. The role assignment you requested was not found. I don't think this is a stretch.

Bad request often means the request is improperly formatted. In this case, it is a proper request, just one of the requested resources does not exist.

I'd recommend closing as "Not a bug"

Revision history for this message
Matthew Edmonds (edmondsw) wrote :

404 doesn't mean something/anything was not found. It specifically means that the requested resource (from the URI) was not found. In this case, that would be trust, which is obviously nonsensical when you're creating a trust.

400 would be a much more typical response for something like this. As is often the case with REST, there is no HTTP status code that is a perfect fit, but it comes the closest. That said... I'm sure I had a reason for opening this way back when, but I don't remember what issue this was causing anymore, so... low priority.

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.