Bug 1250711
Summary: | Keystone cannot cope with being behind an SSL terminator for version list | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Jack Waterworth <jwaterwo> |
Component: | openstack-keystone | Assignee: | Adam Young <ayoung> |
Status: | CLOSED ERRATA | QA Contact: | Rodrigo Duarte <rduartes> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.0 (Juno) | CC: | akaris, ayoung, dmaley, jschluet, jwaterwo, nkinder, nlevinki, srevivo |
Target Milestone: | async | Keywords: | ZStream |
Target Release: | 6.0 (Juno) | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | openstack-keystone-2014.2.3-3.el7ost | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-06-01 12:29:12 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: |
Description
Jack Waterworth
2015-08-05 19:34:44 UTC
upstream bug: https://bugs.launchpad.net/keystone/+bug/1370022 customer has patched their own enviornment with the following patch diff --git a/keystone/common/config.py b/keystone/common/config.py index cc59f9d..aa19ac4 100644 --- a/keystone/common/config.py +++ b/keystone/common/config.py @@ -140,7 +140,12 @@ 'exceeds the maximum length, the operation will fail ' 'with an HTTP 403 Forbidden error. If set to false, ' 'passwords are automatically truncated to the ' - 'maximum length.')], + 'maximum length.'), + cfg.StrOpt('secure_proxy_ssl_header', + help='The HTTP header used to determine the scheme for the ' + 'original request, even if it was removed by an SSL ' + 'terminating proxy. Typical value is ' + '"HTTP_X_FORWARDED_PROTO".'),], 'identity': [ cfg.StrOpt('default_domain_id', default='default', help='This references the domain to use for all ' diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py index 7d1d06d..60f21bf 100644 --- a/keystone/common/wsgi.py +++ b/keystone/common/wsgi.py @@ -196,6 +196,16 @@ def __call__(self, req): context['headers'] = dict(six.iteritems(req.headers)) context['path'] = req.environ['PATH_INFO'] context['host_url'] = req.host_url + scheme = (None if not CONF.secure_proxy_ssl_header + else req.headers.get(CONF.secure_proxy_ssl_header)) + if scheme: + # NOTE(andrey-mp): "wsgi.url_scheme" contains the protocol used + # before the proxy removed it ('https' usually). So if + # the webob.Request instance is modified in order to use this + # scheme instead of the one defined by API, the call to + # webob.Request.relative_url() will return a URL with the correct + # scheme. + req.environ['wsgi.url_scheme'] = scheme params = req.environ.get(PARAMS_ENV, {}) # authentication and authorization attributes are set as environment # values by the container and processed by the pipeline. the complete 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/RHBA-2016:1195 *** Bug 1340527 has been marked as a duplicate of this bug. *** |