status 401 Not Authorized is not valid

Bug #1153718 reported by Brant Knudson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Sahdev Zala

Bug Description

Keystone responds to some requests with a response status string like "HTTP/1.1 401 Not Authorized". The "reason-phrase" for the 401 status code is "Unauthorized", not "Not Authorized", so the response is not valid HTTP.

See http://tools.ietf.org/html/rfc2616#section-10.4.2 .

For an example,

$ curl -i http://localhost:5000/v3/projects ; echo
HTTP/1.1 401 Not Authorized
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 116
Date: Mon, 11 Mar 2013 18:35:57 GMT

{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Not Authorized"}}

The response should be:

$ curl -i http://localhost:5000/v3/projects ; echo
HTTP/1.1 401 Unauthorized
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 116
Date: Mon, 11 Mar 2013 18:35:57 GMT

{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Not Authorized"}}

Sahdev Zala (spzala)
Changed in keystone:
assignee: nobody → Sahdev Zala (spzala)
Dolph Mathews (dolph)
Changed in keystone:
status: New → Triaged
importance: Undecided → Low
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/26237

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

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

commit b033538ec7a35161809766b262e34029a84893e1
Author: Sahdev Zala <email address hidden>
Date: Fri Apr 5 11:23:44 2013 -0500

    Fix 401 status response

    Fixes Bug1153718

    Change-Id: I18adefdc9cf6cadee6006e9352e872dfb4de7e1d

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