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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigure(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.RestTemplaterelayRestTemplate(org.qubership.atp.common.logging.interceptor.RestTemplateLogInterceptor restTemplateLogInterceptor) Return a simpleRestTemplateinstead of a RestTemplate that applies a user token to each request.org.springframework.web.reactive.function.client.WebClientReturn a simpleWebClientinstead 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
-
Constructor Details
-
DisableSecurityConfiguration
public DisableSecurityConfiguration()
-
-
Method Details
-
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 simpleRestTemplateinstead 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 simpleWebClientinstead of a webclient that applies a user token to each request.- Returns:
- simple WebClient.
-
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:
configurein classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter- Parameters:
http- HttpSecurity object to be configured- Throws:
Exception- in case various configuration exceptions.
-