Class DisableSecurityConfiguration

java.lang.Object
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
org.qubership.atp.auth.springbootstarter.config.DisableSecurityConfiguration
All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity>, org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>

@Configuration @Profile("disable-security") public class DisableSecurityConfiguration extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
    Configure HttpSecurity as disabled security and all resources are permitted.
    Allow all PolicyEnforcement, will be used if there is no need to check permissions.
    org.springframework.web.client.RestTemplate
    relayRestTemplate(org.qubership.atp.common.logging.interceptor.RestTemplateLogInterceptor restTemplateLogInterceptor)
    Return a simple RestTemplate instead of a RestTemplate that applies a user token to each request.
    org.springframework.web.reactive.function.client.WebClient
    Return a simple WebClient instead of a webclient that applies a user token to each request.
    Get User Info Provider.

    Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter

    authenticationManager, authenticationManagerBean, configure, configure, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DisableSecurityConfiguration

      public DisableSecurityConfiguration()
  • Method Details

    • entityAccessEnforcement

      @Bean("entityAccess") public PolicyEnforcement entityAccessEnforcement()
      Allow all PolicyEnforcement, will be used if there is no need to check permissions.
      Returns:
      PolicyEnforcement bean.
    • relayRestTemplate

      @Bean("relayRestTemplate") public org.springframework.web.client.RestTemplate relayRestTemplate(org.qubership.atp.common.logging.interceptor.RestTemplateLogInterceptor restTemplateLogInterceptor)
      Return a simple RestTemplate instead of a RestTemplate that applies a user token to each request.
      Parameters:
      restTemplateLogInterceptor - RestTemplateLogInterceptor object
      Returns:
      RestTemplate with SimpleClientHttpRequestFactory and the interceptor added.
    • relayWebClient

      @Bean("relayWebClient") public org.springframework.web.reactive.function.client.WebClient relayWebClient()
      Return a simple WebClient instead of a webclient that applies a user token to each request.
      Returns:
      simple WebClient.
    • userInfoProvider

      @Bean("userInfoProvider") public Provider<UserInfo> userInfoProvider()
      Get User Info Provider.
      Returns:
      new DisableSecurityUserProvider instance.
    • configure

      protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
      Configure HttpSecurity as disabled security and all resources are permitted.
      Overrides:
      configure in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
      Parameters:
      http - HttpSecurity object to be configured
      Throws:
      Exception - in case various configuration exceptions.