2

I am trying to use stunnel infront of Haproxy for SSL support. SSL certificates are located according to stunnel configuration. I am also able to get the https connection, but every time I use https, session get lost. I am not using tomcat 8443 port to get the secure content. Is is possible to get the https connection only using stunnel and haproxy? And my requirement is to have https connection once user get logged in.

1 Answer 1

1

The application session is typically stored as a cookie. There are a number of important components in a cookie but the relevant one in this case is the secure flag in the cookie.

It is possible for the cookie to get lost when you move from https to http because if the secure flag is set then the cookie will not be sent under a non-https connection.

You need to check to see what is happening to the cookies. You can do this easily by using suitable browser tools and extensions to inspect the cookies.

3
  • Yeah, I already checked out that cookie was not passing when going to HTTPS from HTTP since every time I check the cookie and response from server it's not same as HTTP, and session get lost in the middle. I am still looking for some answer as I see its possible to have HTTPS using HAProxy and Stunnel itself without using SSL in Tomcat or Apache.
    – panalbish
    Jun 29, 2011 at 9:23
  • Use a browser tool to inspect the cookies and see if the "secure" flag is set on the cookie.
    – sybreon
    Jun 29, 2011 at 11:55
  • No, secure flag is not being checked.
    – panalbish
    Jun 29, 2011 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .