Class LadybugSecurityChainConfigurer

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

@Configuration @EnableWebSecurity @EnableMethodSecurity(jsr250Enabled=true, prePostEnabled=false) @Order(-2147483648) public class LadybugSecurityChainConfigurer extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.context.EnvironmentAware
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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.web.SecurityFilterChain
    createLadybugSecurityChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http, IAuthenticator ladybugAuthenticator)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.context.ApplicationContextAware

    setApplicationContext

    Methods inherited from interface org.springframework.context.EnvironmentAware

    setEnvironment
  • 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