Needs to handle http header 'X-Forwarded-Proto'

Bug #1359516 reported by James Li
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Solum
Fix Released
Undecided
Unassigned

Bug Description

Imagine we have a load balancer accepting *https* connections only and talking to solum-api via *http*. The LB typically talks to solum-api using 'Host' and 'X-Forwarded-Proto' headers as following:

$ curl -H "x-auth-token: `cat ~/local_token`" -H "host: load.balancer.com" -H "X-Forwarded-Proto: https" -i http://10.0.2.15:9777/v1/
HTTP/1.0 200 OK
Date: Thu, 21 Aug 2014 03:33:21 GMT
Server: WSGIServer/0.1 Python/2.7.3
Content-Length: 513
Content-Type: application/json; charset=UTF-8

{"name": "solum", "services_uri": "http://load.balancer.com/v1/services", "components_uri": "http://load.balancer.com/v1/components", "uri": "http://load.balancer.com/v1", "language_packs_uri": "http://load.balancer.com/v1/language_packs", "extensions_uri": "http://load.balancer.com/v1/extensions", "implementation_version": "2014.1.0", "assemblies_uri": "http://load.balancer.com/v1/assemblies", "type": "platform", "plans_uri": "http://load.balancer.com/v1/plans", "description": "solum native implementation"}

So solum handles "Host" header correctly but ignores "X-Forwarded-Proto", so we only see *http* in the response body above, but we expect *https* in this case, i.e. "https://load.balancer.com/v1/services" for services endpoint.

Paul Czarkowski (paulcz)
Changed in solum:
status: New → Confirmed
James Li (james-li-3)
description: updated
James Li (james-li-3)
description: updated
Revision history for this message
James Li (james-li-3) wrote :

For reference, Heat has fixed a similar issue:

https://review.openstack.org/#/c/64142/

Revision history for this message
Devdatta Kulkarni (devdatta-kulkarni) wrote :

James,

Just to confirm my understanding, you are saying that all the URLs in the response need to respect the X-Forwarded-Proto header right?

Dev

Revision history for this message
James Li (james-li-3) wrote :

Yes, Devdatta.

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

Reviewed: https://review.openstack.org/140162
Committed: https://git.openstack.org/cgit/stackforge/solum/commit/?id=9d7e5d728556cb8294f1b89b5df254496ded91ee
Submitter: Jenkins
Branch: master

commit 9d7e5d728556cb8294f1b89b5df254496ded91ee
Author: Ed Cranford <email address hidden>
Date: Fri Dec 5 13:51:45 2014 -0600

    Correct trigger_uri if X-Forwarded-Proto is https

    Closes-Bug: #1359516

    Change-Id: I5e5ade4976b27806037f99da7a8d72ed7e16811e

Changed in solum:
status: Confirmed → Fix Committed
Adrian Otto (aotto)
Changed in solum:
status: Fix Committed → Fix Released
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.