Skip to content

Commit 225b53f

Browse files
committed
Fix #26402: add session fixation protection for SAML
1 parent 611cafb commit 225b53f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/eu/openanalytics/containerproxy/auth/impl/saml/SAMLConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
import org.springframework.security.web.authentication.logout.LogoutHandler;
7070
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
7171
import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler;
72+
import org.springframework.security.web.authentication.session.ChangeSessionIdAuthenticationStrategy;
7273
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
7374

7475
import javax.inject.Inject;
@@ -324,6 +325,7 @@ public SAMLProcessingFilter samlWebSSOProcessingFilter() throws Exception {
324325
samlWebSSOProcessingFilter.setAuthenticationManager(authenticationManager);
325326
samlWebSSOProcessingFilter.setAuthenticationSuccessHandler(successRedirectHandler());
326327
samlWebSSOProcessingFilter.setAuthenticationFailureHandler(authenticationFailureHandler());
328+
samlWebSSOProcessingFilter.setSessionAuthenticationStrategy(new ChangeSessionIdAuthenticationStrategy());
327329
return samlWebSSOProcessingFilter;
328330
}
329331

0 commit comments

Comments
 (0)