JSESSION cookie SECURE,HTTPOnly flags

Hi,

We have a JIRA instance installed on AWS host, setup behind proxy server(SSL enabled).

Now for security protocols, we've configured Tomcat to enable SECURE and HTTPOnly flags. 

But from the browser end, when we load JIRA pages we are only able to see the sent JSession cookie, but not the set-cookie in response headers(hence no secure/httponly flags seen).

Could anyone please suggest how we could get the flags to show up on browser?

Thanks

1 answer

1 vote

Could you share with us your JIRAINSTALL/conf/server.xml configuration?  I'm just interested in seeing your specific connectors as to how the Tomcat site is being served up.

I suspect that if you have set the scheme parameter to http for that connector and in turn that connector is used to get SSL traffic from the load balancer, that this would actually be an incorrect setting since ultimately the site is being accessed over SSL via the load balancer.

There is some more details on why you might not be seeing these cookies in this related Bamboo KB.  From that KB:

If the HttpOnly attribute is set on a cookie, then the cookie’s value cannot be read or set by client-side JavaScript.

I realize your concern is in regards to Jira, but both Jira and Bamboo utilize a Tomcat instance in a similar way.

I suspect your connector config will need to look something like this:

  <Connector 
    port="8443"
    protocol="org.apache.coyote.http11.Http11NioProtocol"
    maxThreads="150"
    minSpareThreads="25"
    connectionTimeout="20000"
    enableLookups="false"
    maxHttpHeaderSize="8192"
    useBodyEncodingForURI="true"
    disableUploadTimeout="true"
    bindOnInit="false"
    
    secure="true"
    proxyName="jira.example.com"
    proxyPort="443"
    scheme="https"
/>

Thanks for the reply Andrew. 'scheme' in server.xml is set to https and connector configuration is similar to what you've suggested.

We were able to dig out the issue though - we are using AWS load balancer and the Cookie persistence(application cookie stickiness) was not enabled in it. Hence the missing session cookies. 

This once enabled, got the cookies and flags as expected in the browser.

Awesome, glad to hear you found a solution.  Thanks for sharing with us how you fixed it.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Sarah Schuster
Posted Mar 28, 2018 in Jira Software

Can a company’s culture make or break agile adoption?

Can a new-to-agile team survive and thrive in a non-agile culture? If so, what advice would you give to those trying to be agile in a non-agile culture? What's the key(s) to success? Share your thoug...

13,141 views 15 13
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you