How to prevent tomcat session hijacking?

后端 未结 3 695
既然无缘
既然无缘 2021-01-31 21:00

In my web.xml I\'ve defined a user-data-constraint for some resources:


    
        

        
3条回答
  •  [愿得一人]
    2021-01-31 21:31

    I think it works like this by design. You can't base your access control on session. You need to use other parameters. You need to add authentication and use role-based control.

    In Tomcat, there is protection but exactly opposite. If you get a session in secure area, that session is not transfered to unprotected area. Tomcat achieves this by setting "secure" flag on the cookie so the cookie is not sent to the HTTP connections.

提交回复
热议问题