Skip to content

RememberMeAuthenticationFilter does not use SecurityContextRepository configured in HttpSecurity #13104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kzwang opened this issue Apr 26, 2023 · 0 comments
Assignees
Labels
in: config An issue in spring-security-config type: bug A general bug
Milestone

Comments

@kzwang
Copy link

kzwang commented Apr 26, 2023

We are configuring HttpSecurity to use a different SecurityContextRepository via http.securityContext().securityContextRepository(new NullSecurityContextRepository());. However, RememberMeAuthenticationFilter would still use HttpSessionSecurityContextRepository instead of the NullSecurityContextRepository we configured.

It seems the SecurityContextRepository set in HttpSecurity is not been propagated to RememberMeAuthenticationFilter in https://github.com/spring-projects/spring-security/blob/main/config/src/main/java/org/springframework/security/config/annotation/web/configurers/RememberMeConfigurer.java#L291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config type: bug A general bug
Projects
Status: Done
Development

No branches or pull requests

2 participants