-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add how multiple SecurityFilterChain are created in documentation #9451
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
Comments
Thanks for bringing this up @gourav. One thing that might help make this clearer is configuring the I also see room for improvement in the Multiple HttpSecurity section of the reference docs. |
To be frank, I don't quite understand that |
I have discovered how to configure @Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
// Add authentication provider
http.authenticationProvider(...);
http.userDetailsService(...);
// Accessing full set of AuthenticationManagerBuilder methods
http.getSharedObject(AuthenticationManagerBuilder.class)
return http.build();
} Accessing to full set of AuthenticationManagerBuilder methods is quite inconvenient. There is a method To configure global authentication manager, you can use |
@p-daniil If you are using Spring Security 5.6 you can configure the
If you want the
|
This issue was fixed as part of #10003 |
Hello.
Thank you the wonderful project.
As I can gather from the documentation currently available here, multiple
SecurityFilterChain
can be configured inFilterChainProxy
.However, I am having a very time in figuring out how exactly do we end up with multiple
SecurityFilterChain
s because I think there is lack in clarity in documenation stating when aSecurityFilterChain
ends and another begins.Lets take an example of code I saw in another issue.
Does a new
SecurityFilterChain
is created wheneverHttpSecurity#and
is invoked or all theantMatchers
call end up being a newSecurityFilterChain
?I find it confusing as I think this is not explained in enough detail and can be written a bit better to explain this concept.
Thank you.
The text was updated successfully, but these errors were encountered: