spring-projects / spring-projects/spring-security

SEC-3040: Session Fixation Protection cannot be disabled when using custom Session Control Strategy

Open
#3,246 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: web type: bug type: jira
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Timmy Schweer (Migrated from SEC-3040) said:

I'm using spring security for an GWT application and I upgraded from Spring Security 3.x to 4.0.1.
The authentication sessions are invalidated randomly, sometimes directly after login and sometimes never. So I wanted to deactivate SessionFixationProtectionStrategy which dropped me the following message:

BeanDefinitionParsingException: Configuration problem: session-fixation-protection attribute cannot be used in combination with session-authentication-strategy-ref

It seems like in Spring 3.x the SessionFixationProtectionStrategy was deactivated by default and is now active by default, which is fine but I don't know how to disable it in the following configuration:

<bean class="mysecurity.CustomConcurrentSessionControlStrategy"
           id="scs">
    <constructor-arg name="sessionRegistry" ref="sessionRegistry"/>
</bean>
<sec:http use-expressions="true" create-session="always">
    <sec:session-management session-authentication-strategy-ref="scs"/>
....
</sec:http>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the XML sec:session-management configuration and the custom Session Authentication Strategy shown in the issue, then trace the BeanDefinitionParsingException about session-fixation-protection and session-authentication-strategy-ref. Done means a custom session strategy can be configured while session fixation protection can also be disabled, with the configuration no longer rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.