get_endpoint returns URL where it should return None

Bug #1616720 reported by Jamie Lennox
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystoneauth
Fix Released
High
Jamie Lennox

Bug Description

When you call get_endpoint on an auth plugin and no endpoint is available it is supposed to return None. With the patch [1] we do a urljoin() to allow for relative endpoints to be joined with the url that the discovery request was made to. This concept is fine but if you urljoin the expected None return value with the url urljoin returns the original url.

eg urljoin('http://example.com', None) == 'http://example.com'

Because we always urljoin when doing version discovery this means that a URL is always being returned ever when one shouldn't be. This is breaking keystonemiddleware and anything else doing proper version discovery.

[1] https://review.openstack.org/#/c/356808/

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

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

Changed in keystoneauth:
assignee: nobody → Jamie Lennox (jamielennox)
status: New → In Progress
Changed in keystoneauth:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystoneauth (master)

Reviewed: https://review.openstack.org/360209
Committed: https://git.openstack.org/cgit/openstack/keystoneauth/commit/?id=b7b887c5192f2940073d038360a64041fc4f38cc
Submitter: Jenkins
Branch: master

commit b7b887c5192f2940073d038360a64041fc4f38cc
Author: Jamie Lennox <email address hidden>
Date: Thu Aug 25 13:49:35 2016 +1000

    get_endpoint should return None when no version found

    After patch Ia08538ccf00c9063dc0d284c5ece9a969c15500a the urljoin would
    ensure that a URL was always returned from the get_endpoint method even
    when the version was not available. This breaks plugin discovery and a
    number of other areas.

    Change-Id: I04014b6e770c2e9708c5f9c81c3160d51603ad0c
    Closes-Bug: #1616720

Changed in keystoneauth:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/keystoneauth 2.12.1

This issue was fixed in the openstack/keystoneauth 2.12.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/keystoneauth 2.12.1 release.

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.