jsessionid

Apache Tomcat 7 Changing JSESSIONID on Every Request

雨燕双飞 提交于 2019-12-03 08:11:43
This issue is driving me insane, so maybe someone could help me understand what the issue is. I have a tomcat web application being fronted by HAProxy. HAProxy is also doing SSL offloading, and is configured to use sticky sessions. I am using Tomcat's session replication feature which seems to be working just fine. The sessions appear on both appservers. For some reason, Tomcat is generating a new JSESSIONID for every single web request, and then copying the contents of the old session into the new session. That is to say, my session contents are still there within the new session, but a new

remove jsessionid in url rewrite in spring mvc

旧城冷巷雨未停 提交于 2019-12-03 04:22:31
问题 I am using spring MVC and having a problem in jsessionid, what I found is that jsessionid is injected in the url if cookies isn't enabled in the browser producing a url like that: http://localhost/categories;jsessionid=Bsls4aQFXA5RUDcmZKV5iw?cid=13001 Actually there is no problem with browsers but when Google crawl my site, and seems Google crawlers don't have cookies :), they store urls of my site in that form and my site appears in search results having URLs like that ones containing

how to refresh JSESSIONID cookie after login

懵懂的女人 提交于 2019-12-03 02:42:59
问题 A product I work on got a tough security audit by a potential customer and they are upset that Tomcat sets a JSESSIONID cookie before authentication has happened. That is, Tomcat sets this cookie when our stateless Login Page loads, but before login. They suggest either of the following: issue a new JSESSIONID cookie after login prevent a JSESSIONID cookie from being set in the first place on the Login Page (i.e., before authentication has happened) I have been poring through everything

Tomcat 7 - JSESSIONID cookie is not accessible from JavaScript code

北城以北 提交于 2019-12-03 02:28:56
Does anyone know what changed in the configuration between Tomcat 6 and Tomcat 7 that would cause the JSESSIONID cookie to not be accessible via JavaScript? Using Tomcat 6: alert(document.cookie); // JSESSIONID=8675309ABCDEF... Using Tomcat 7: alert(document.cookie); // nothing Jeff R. Okay, I found the answer. The useHttpOnly attribute was set to false by default in Tomcat 6 , and is true in Tomcat 7 . This attribute is set for the <Context> container. <Context useHttpOnly="false" [...] /> For more information about updating from Tomcat 6 to 7: Migrating from 6.0.x to 7.0.x I'm not sure why I

remove jsessionid in url rewrite in spring mvc

∥☆過路亽.° 提交于 2019-12-02 18:40:13
I am using spring MVC and having a problem in jsessionid, what I found is that jsessionid is injected in the url if cookies isn't enabled in the browser producing a url like that: http://localhost/categories;jsessionid=Bsls4aQFXA5RUDcmZKV5iw?cid=13001 Actually there is no problem with browsers but when Google crawl my site, and seems Google crawlers don't have cookies :), they store urls of my site in that form and my site appears in search results having URLs like that ones containing jsessionid. Actually it's running without any problems, but I prefer to have URLs appear in Google search

how to refresh JSESSIONID cookie after login

不羁岁月 提交于 2019-12-02 16:17:18
A product I work on got a tough security audit by a potential customer and they are upset that Tomcat sets a JSESSIONID cookie before authentication has happened. That is, Tomcat sets this cookie when our stateless Login Page loads, but before login. They suggest either of the following: issue a new JSESSIONID cookie after login prevent a JSESSIONID cookie from being set in the first place on the Login Page (i.e., before authentication has happened) I have been poring through everything JSESSIONID-related on this site and can find no easy answer. I'm just hoping for some ideas. My best

set 'secure' flag to JSESSION id cookie

孤街浪徒 提交于 2019-12-02 02:28:54
问题 I want to set 'secure' flag to JSESSIONID cookie . Is there a configuration in tomcat 6 for this ? I tried by setting 'secure="true"' in 'Connector' (8080) element of server.xml , but it creates problems ....thats Connection is getting reset . Note that in my application , the JSESSIONID is getting created in 'http' mode ( index page ) , when the user logins , it will switch into 'https' mode. 回答1: If you are using tomcat 6 you can do the following workaround String sessionid = request

set 'secure' flag to JSESSION id cookie

强颜欢笑 提交于 2019-12-02 02:14:50
I want to set 'secure' flag to JSESSIONID cookie . Is there a configuration in tomcat 6 for this ? I tried by setting 'secure="true"' in 'Connector' (8080) element of server.xml , but it creates problems ....thats Connection is getting reset . Note that in my application , the JSESSIONID is getting created in 'http' mode ( index page ) , when the user logins , it will switch into 'https' mode. If you are using tomcat 6 you can do the following workaround String sessionid = request.getSession().getId(); response.setHeader("SET-COOKIE", "JSESSIONID=" + sessionid + "; secure ; HttpOnly"); see

Passing JSESSIONID from a SOAP response to a HTTP request in SOAP UI

ぐ巨炮叔叔 提交于 2019-12-01 10:11:38
问题 I have a test case which performs a login via a SOAP request and the response includes this header: Set-Cookie | JSESSIONID=85fc792a71f8eb1e2f0e9c63339e; Path=/somepath; HttpOnly After that I have a HTTP request to an URL which only can be accessed if login was succesful. Although I have set the 'Maintain HTTP session' to true in TestCase Options, the JSESSIONID cookie is not passed to my HTTP request. The HTTP request is performed without a JSESSIONID therefore the response is not the

Same-Site cookie in Spring Security

六月ゝ 毕业季﹏ 提交于 2019-12-01 04:23:17
问题 is it possible to set Same-site Cookie flag in Spring Security? See: https://tools.ietf.org/html/draft-west-first-party-cookies-07 And if not, is it on a roadmap to add support, please? There is already support in some browsers (i.e. Chrome). T.H. 回答1: You can always set cookie values by yourself in the Java world if you can get an instance of the HttpServletResponse . Then you can do: response.setHeader("Set-Cookie", "key=value; HttpOnly; SameSite=strict") In spring-security you can easily