Spring Security - How to disable same session sharing across multiple tabs of same browser?

一世执手 提交于 2019-12-13 04:37:12

问题


As we know Spring Security is providing JSESSIONID in cookie, based session management solution,it is allowing sharing same JSESSIONID information across multiple tabs of same browser.

As per OWASP guideline, It should not share.

Is there any way to disable this sharing in spring security?


回答1:


My first idea was "It is not really possible to prevent the browser from doing so."

But then I found this

You can use HTML5 SessionStorage (window.sessionStorage). You will generate a random id and save in session Storage per Browser Tab. Then each browser tab has his own Id. https://stackoverflow.com/a/11783754/280244

I hope this helps you to find a solution.



来源:https://stackoverflow.com/questions/19065750/spring-security-how-to-disable-same-session-sharing-across-multiple-tabs-of-sa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!