Tomcat HTTP vs HTTPs

Confluence User - 07 Jul, 2017

Hi Expert,

Need networking expert's support here. 

 

I had setup my Joget on a server (IP:X.X.X.X:80), whereby I also setup the my SSL certification (abc.com.my) into my F5 Load Balancer and do the SSL offloading to the internal IP (X.X.X.X:80)

For example:

F5 Public IP:443 SSL offloading to X.X.X.X:80.

 

Problem:

When I access the https://abc.com.my (which mapped to my F5 Public IP), it was actually redirected to desktop and subsequently calling for the login page which was not in HTTPS/SSL mode. 

Is there any configuration needed to be done in my Tomcat App(server.xml or web.xml), so that it will be always in secure mode (https/ssl)? 

Note: the SSL is only installed in F5 Load Balancer, and the communication between F5 and Web server is always via port 80

 

Thanks

Regards,

Oswald

http;ssl;https;redirection

4


10 Jul, 2017
confluenceUser
confluenceUser

Hi Andrew, 

 

is there any changes needed to be applied in the TOMCAT (server.xml or web.xml), 

For example: Enable the HTTPS connector in server.xml? or Forcing the redirection of HTTP to HTTPS in web.xml?

I don't have the access to my F5 as it was administrated by some other team. The message I got from them is that we need to ensure our URL redirection is always forcing back to HTTPS.

Do advise. 

Thanks. 

14 Jul, 2017
confluenceUser
confluenceUser

Hi, 

 

After applying the changes URL HTTP redirection to HTTPS configuration into F5, the whole site seems to be under HTTPS/SSL. 

However, it cause another bigger problem whereby we can't any submit any request / perform any action on the form. 

Further dig into the log file, it seems it violate the CSRF token security check. Any alternative resolution for this besides of turning on this feature (org.owasp.csrfguard.Enabled=false)? 

 

21 Jul, 2017
confluenceUser
confluenceUser

Hi Oz,

Maybe you can modify Tomcat server.xml by adding this:

<Valve
className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="x-forwarded-for"
proxiesHeader="x-forwarded-by"
protocolHeader="x-forwarded-proto" />

if your F5 ip address is not in these subnets: 10/8, 192.168/16, 169.254/16 and 127/8, then you need to have "internalProxies" parameters. 

You can refer to this link for more info.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print