Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Jun 18 '11 at 11:24

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
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 '11 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 '11 at 11:55
    
No, secure flag is not being checked. –  panalbish Jun 29 '11 at 13:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.