security - How to get jetty to send jsessionid-cookies with the secure-flag when using a secure channel -
I'm using tomcat in my environment and jetties (through Jetty-Maven-plugin) in my test environment I am
Tomcat set a safe-flag to a jsessionid-cookie, when it sends it to a secure channel (https), which makes me see a good idea, because this session is exposed Prevents when the user klicks on one but the jetties do not!
I want to force JT to behave like Tomcat and always want to set a safe-flag on secure jsessionid-cookies on a secure channel, otherwise, my test environment behaves very differently. So my production environment But I can not find any configuration options to get it.
I am also thinking, if this is a security bug in the Jetties. Since it is safe to not mark a jsessionid-cookie on a secure channel because the user switches back to an unsafe channel in a secure session.
I'm adding completely to the example that worked for me.
Put the following in WEB-INF / jetty-web.xml
& lt ;? XML version = "1.0" encoding = "ISO-8859-1"? & Gt; & Lt ;! Configure DOCTYPE PUBLIC "- // JETTY // Configuration // N" "http://www.eclipse.org/jetty/configure.dtd"> & Lt; Class = "org.eclipse.jetty.webapp.WebAppContext" Configure & gt; & Lt; Name = "session handler" & gt; & Lt; Get name = "sessionManager" & gt; & Lt; Set name = "secure cookies" type = "boolean" & gt; True & lt; / Set & gt; & Lt; / Receive & gt; & Lt; / Receive & gt; & Lt; / Configure & gt;
Comments
Post a Comment