Description
I am using version 6.1.1 of Spring Security and I need to configure a single response processing endpoint for a federated IDP. I have referred to the Spring documentation which provides an example code snippet. However, I couldn't find the filterProcessingUrl
method in the Saml2LoginConfigurer
class. As a result, I'm getting a compile error stating that filterProcessingUrl
is not found.
Here is the example code mentioned the Spring documentation under SAML2 Authentication Responses section:
@Bean
SecurityFilterChain securityFilters(HttpSecurity http) throws Exception {
http
// ...
.saml2Login((saml2) -> saml2.filterProcessingUrl("/saml2/login/sso"))
// ...
return http.build();
}
And here is my code for the SAML 2.0 configuration:
SecurityFilterChain configure(HttpSecurity http) throws Exception {
OpenSaml4AuthenticationProvider authenticationProvider = new OpenSaml4AuthenticationProvider();
http.authorizeHttpRequests(requests -> requests
.requestMatchers("/saml2/service-provider-metadata/**")
.permitAll()
).addFilterAfter(authTokenSessionRestore, SecurityContextHolderFilter.class)
.saml2Login((saml2) -> saml2
.authenticationManager(new ProviderManager(authenticationProvider))
.relyingPartyRegistrationRepository(relyingPartyRegistrationRepository)
.successHandler(loginSuccessHandler)
.failureHandler(loginFailureHandler)
).saml2Logout(withDefaults());
return http.build();
}
I'm wondering why I'm unable to find the saml2.filterProcessingUrl
method in my code.
We have multiple federated idp and want single assertion url for all idp like /saml2/SSO . How do we can achieve single Assertion url for all idp not dynamic by registration Id ?