Bug 1268132 - SAML plugin doesn't work with mod_auth_mellon - 303 redirect ignored
SAML plugin doesn't work with mod_auth_mellon - 303 redirect ignored
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-keystoneclient (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
unspecified Severity unspecified
: beta
: 8.0 (Liberty)
Assigned To: Nathan Kinder
Rodrigo Duarte
: TestOnly
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-01 17:34 EDT by Jamie Lennox
Modified: 2016-04-26 14:52 EDT (History)
7 users (show)

See Also:
Fixed In Version: python-keystoneclient-1.7.2-1.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-07 17:10:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1501918 None None None Never
OpenStack gerrit 230151 None None None Never

  None (edit)
Description Jamie Lennox 2015-10-01 17:34:50 EDT
The SAML plugin hooks the http redirect code as ECP doesn't correctly follow the HTTP spec in this regard. Currently the plugin specifically looks for a 302 redirection and handles it however it should also handle the 303 redirect code as this is ambiguous in the specification and what mod_auth_mellon uses.
Comment 3 Nathan Kinder 2015-12-10 18:15:09 EST
This is fixed upstream in python-keystoneclient 1.8.0, and it was also backported to the 1.7.2 release on the stable/liberty branch here:

  https://review.openstack.org/230231

RHEL OSP 8 is currently including python-keystoneclient-1.7.2-1.el7ost, which includes this fix.
Comment 4 Rodrigo Duarte 2016-02-12 08:07:03 EST
Verified for python-keystoneclient-1.7.2-1.el7ost.

Federation setup with:

VM 1: OpenStack + mod_mellon (openstack.rduartes.unknown.test)
VM 2: Ipsilon backed by FreeIPA (ipa.rduartes.unknown.test)

In order to test if it is working we may try to get an unscoped token via Federation and using a python-keystoneclient plugin:

from keystoneclient.contrib.auth.v3 import saml2
from keystoneclient import session
from keystoneclient.v3 import client

# Try to authenticate in the IdP and than use the credentials in the SP
saml2_auth = saml2.Saml2UnscopedToken(auth_url='https://openstack.rduartes.unknown.test:5000/v3',
                                      identity_provider='ipsilon',
                                      identity_provider_url='https://ipa.rduartes.unknown.test/idp/saml2/SSO/SOAP',
                                      username='rduartes',
                                      password='rduartes')

# This bug is similar to bug #1256995, the failure would occur during the Session creation (it will receive the 303 redirect)
sess = session.Session(auth=saml2_auth)

# Try to actually use the federated credentials
ks = client.Client(session=sess)

print('Try to list projects:')
print(ks.federation.projects.list())
Comment 7 errata-xmlrpc 2016-04-07 17:10:38 EDT
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://rhn.redhat.com/errata/RHEA-2016-0603.html

Note You need to log in before you can comment on or make changes to this bug.