3

I have a reverse proxy that routes traffic to my app server..

I have login feature on my public website that is served through HTTPS. The SSL certificates are installed in the reverse proxy server only. My app server doesn't have SSL certificate. SSL Offloading is enabled in the reverse proxy server.

This works perfectly so far, I can access the login page and the member area via HTTPS. But, I notice that my session cookie is not secure...

I'm using .NET Membership Provider for authentication and this will generate ASPXAUTH session cookie as you all know. I tried to enable the httponly and secure flag for this cookie by:

  1. adding requiressl=true for the forms authentication variable in the web.config
  2. adding httpcookie variable with httponly and requiressl=true.

The first setting always gave me 502 error when I tried to login. 502 - Web server received an invalid response while acting as a gateway or proxy server.

The second setting gave me the httponly flag but not the secure flag (I disabled the first setting when testing this).

How to solve this..some questions:

  1. Do I need to install SSL in all servers, including my app server?
  2. Is there any workaround for this?

Please advise.

P.S.

I'm using IIS 7.5 (Reverse Proxy)

Application Request Routing (Reverse Proxy)

IIS UrlRewrite Module (Reverse Proxy)

IIS 8 (app server)

1 Answer 1

3

Some applications are programmed to detect whether or not you are using HTTPS and since the actual web server is handling an HTTP request with your offloading enabled, it will think the request is not secure and often end up in a redirect loop.

You can fix this by setting up a single wildcard certificate on each content server and disable ssl offloading.

[ARR01 - ssl certificate] - [ARR02 - ssl certificate] <-- Visitors will see this SSL Certificate in their browser
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
[Content01 - wildcard ssl certificate] - [Content02 - wildcard ssl certificate] <-- This certificate remains hidden and thus can be a shared single wildcard cert.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes correct, I can confirm this. Application and proxy servers must have SSL and SSL offloading must be disabled.
Does this mean you have to have the SSL certificate on the ARR server to? I have to create a binding to make it respons to HTTPS. But when SSL offloading is disabled I get 502 requests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.