Class LadybugSecurityChainConfigurer

java.lang.Object
org.frankframework.ladybug.config.LadybugSecurityChainConfigurer
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Configuration @EnableWebSecurity @EnableMethodSecurity(jsr250Enabled=true, prePostEnabled=false) @Order(-2147483648) public class LadybugSecurityChainConfigurer extends Object implements org.springframework.context.ApplicationContextAware
Enables WebSecurity, still depends on the existence of the AbstractSecurityWebApplicationInitializer.DEFAULT_FILTER_NAME. Spring Boot's auto creation of the Filter has been disabled (see springIbisTestTool.xml) because the Filter may not exist twice. When running standalone this Filter will need to be added manually, by either a bean definition or by using the AbstractSecurityWebApplicationInitializer.

 public FilterRegistrationBean<DelegatingFilterProxy> securityFilterChainRegistration() {
 	   DelegatingFilterProxy delegatingFilterProxy = new DelegatingFilterProxy();
 	   delegatingFilterProxy.setTargetBeanName(AbstractSecurityWebApplicationInitializer.DEFAULT_FILTER_NAME);
 	   FilterRegistrationBean<DelegatingFilterProxy> registrationBean = new FilterRegistrationBean<>(delegatingFilterProxy);
 	   registrationBean.addUrlPatterns("/*");

 	   return registrationBean;
 }
 

NB: This configuration has the highest order so the SecurityFilterChain is used before any other.

  • Constructor Details

    • LadybugSecurityChainConfigurer

      public LadybugSecurityChainConfigurer()
  • Method Details

    • createLadybugSecurityChain

      @Bean public org.springframework.security.web.SecurityFilterChain createLadybugSecurityChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http, IAuthenticator ladybugAuthenticator) throws Exception
      Throws:
      Exception