plainblack.com
Username Password
search
Bookmark and Share
Make WebGUI respect the X_FORWARDED_PROTO https header  (#10672)
Issue

When using WebGUI in the recommended WRE configuration where a mod_proxy Apache instance sits on the front-end and forwards requests for non-static data back to a separate mod_perl Apache instance that runs WebGUI. However, it needs to tell WebGUI when the original connection was secure (i.e. https) so it can determine whether to allow access to a secure page or redirect the user's browser to the https URL.

We have been using the SSLPROXY "1" request header to do this. So the SSL vhost on the front-end adds this request header before proxying back to WebGUI and when WebGUI sees this header in the request, it treats it as a secure connection.

However, a de facto standard has begun to emerge around this practice that involves setting the X_FORWARDED_PROTO "https" header. WebGUI should treat this new header the same as SSLPROXY as it makes it easier to integrate into other systems that assume this is the header they should set. For example, Rightscale front-end load balancers set this header in their default SSL vhosts.

This can be easily accomplished by adding this to the default modperl config files in the WRE:

SetEnvIf X_FORWARDED_PROTO "https" SSLPROXY

That can go right alongside the same line that does this for the SSLPROXY header. Obviously this can also put into any existing modperl Apache conf files. And that's it, mission accomplished.

Solution Summary
Comments
JT
0
7/27/2009 9:58 am
approved
Graham
0
8/19/2009 2:36 pm
This was added along with some cleanup to the SSL detection.  The SetEnvIf SSLPROXY "1" SSLPROXY line in the modperl config is no longer required and WebGUI will respect the X-Forwarded-Proto header.  Sending the X-Forwarded-Proto header has been added to the default WRE configs in addition to SSLPROXY.
Details
Ticket Status Resolved  
Rating0.0 
Submitted By cap10morgan  
Date Submitted2009-07-20 
Assigned To unassigned  
Date Assigned 2012-02-09  
Assigned By  
What to improve? WRE  
URLrfe/request-for-enhancement/10672
Karma
Difficulty 1  
Karma So Far0
Karma Rank0.00
Keywords
Ticket History
8/19/2009
2:36 PM
Resolved Graham
7/20/2009
12:19 PM
Ticket created cap10morgan
© 2012 Plain Black Corporation | All Rights Reserved