HTTP 405 code is not handled as exception

Bug #1116559 reported by Lin Hua Cheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Fix Released
Medium
Lin Hua Cheng

Bug Description

Keystone publicURL expose a subset of Keystone APIs, and internalURL exposed the Admin REST API.

If the user misconfigured the endpoint and sends a Admin REST call to the publicURL it would returned a 405 error since the API is not supported.

Currently, keystoneclient does not recognized 405 error and treats it as success.

Keystone-client should treat all HTTP code above 400 as error instead of selecting of picking the error code to handle

Related code in client.py:

    if resp.status_code in (400, 401, 403, 404, 408, 409, 413, 500, 501):

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/21238

Changed in python-keystoneclient:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/21239

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

"Keystone publicURL expose a subset of Keystone APIs, and internalURL exposed the Admin REST API."

The "public" and "internal" endpoints are both intended to fulfill the public API.

The "admin" endpoint is intended to be "non-public" and is implied to also be "internal."

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

Just to confirm my understanding, only "admin" endpoint is expected to contain the private APIs?

If yes, so "internal" endpoint is not expected that to support private API?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/21239
Committed: http://github.com/openstack/python-keystoneclient/commit/382441a9f18c583c071bf69d25cd44f5ec3555bb
Submitter: Jenkins
Branch: master

commit 382441a9f18c583c071bf69d25cd44f5ec3555bb
Author: Lin Hua Cheng <email address hidden>
Date: Tue Feb 5 11:17:53 2013 -0800

    Treat HTTP code 400 and above as error.

    Fixes bug 1116559.

    Change-Id: I4b12176599686f7e545b63c8e54cf9da6a1f963e

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in python-keystoneclient:
importance: Undecided → Medium
status: Fix Committed → Fix Released
milestone: none → 0.2.3
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.