| Summary: | Implement support for CSRF prevention | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Jan Bartel <janb> |
| Component: | server | Assignee: | Jan Bartel <janb> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jetty-inbox |
| Version: | 7.6.0 | ||
| Target Milestone: | 7.5.x | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Jan Bartel
This code is already in place in jetty, and has been for some time. CSRF protection is in fact enabled by default. To turn it off, call SecurityHandler.setSessionRenewedOnAuthentication(false); I will leave this issue open, as we are working on changing the mechanism in anticipation of Servlet Spec 3.1 incorporating formal support for CSRF. As part of the changes, we will replace the code that changes the session id by destroying and creating a new session and copying its data over, to code which merely replaces the sessionid on the existing session. See new renewSessionId branch in git for work on new mechanism. Servlet 3.1 Request.changeSessionId() implemented some time ago in jetty-9.1 and impl changed to only change session id, not session object. Jan |