Bug 1348728

Summary: [RFE] 404 authentication errors should indicate the failed url
Product: Red Hat OpenStack Reporter: Chris Plock <chrisplo>
Component: openstack-keystoneAssignee: John Dennis <jdennis>
Status: CLOSED ERRATA QA Contact: Prasanth Anbalagan <panbalag>
Severity: low Docs Contact:
Priority: low    
Version: 8.0 (Liberty)CC: apevec, jdennis, jdonohue, jruzicka, jschluet, kbasil, lhh, nkinder, panbalag, rcritten, rduartes, sclewis, sgordon, srevivo
Target Milestone: Upstream M2Keywords: FutureFeature, Triaged
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-keystone-11.0.1-0.20170403212501.1de8b9d.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-13 20:44:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1194008, 1295530, 1442136    

Description Chris Plock 2016-06-21 21:54:20 UTC
Description of problem:
There is a catchall handler that doesn't provide helpful output when there is a configuration problem, catching HttpError specifically and providing the url would clarify many problems quickly.

Version-Release number of selected component (if applicable):
Any since icehouse

How reproducible:
Always

Steps to Reproduce:
from keystoneclient.v2_0 import client as client_v2
auth_url='http://127.0.0.1:5000/v2.0'
client = client_v2.Client(username='admin', password='secrete', tenant_name='admin', auth_url=auth_url)
token = client.tokens.authenticate(username='admin', password='secrete', tenant_name='admin').token['id']
user_id = next(u.id for u in client.users.list() if u.username=='admin')
client = client_v2.Client(user_id=user_id, token=token, auth_url=auth_url)
print(client.tenants.list())
auth_url='http://127.0.0.1:5000/WHATTHA'
client = client_v2.Client(user_id=user_id, token=token, auth_url=auth_url)

Actual results:
keystoneauth1.exceptions.auth.AuthorizationFailure: Authorization Failed: The resource could not be found. (HTTP 404)

Expected results:
keystoneauth1.exceptions.auth.AuthorizationFailure: Authorization Failed (http://127.0.0.1:5000/WHATTHA/tokens): The resource could not be found. (HTTP 404)

Additional info:

Comment 2 Adam Young 2016-07-08 17:46:43 UTC
We will investigate, but the request seems sound.

Comment 5 Rob Crittenden 2017-04-25 15:15:02 UTC
Moving to POST, merged upstream on March 22.

Comment 10 errata-xmlrpc 2017-12-13 20:44:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3462