Class ActuatorSecurityAutoConfiguration

  • All Implemented Interfaces:
    org.springframework.core.Ordered, 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>

    @ConditionalOnWebApplication(type=SERVLET)
    @Conditional(ActuatorAutoSecurityCondition.class)
    @ConditionalOnClass({org.springframework.security.config.annotation.web.builders.HttpSecurity.class,PasswordFlowProperties.class,org.springframework.boot.actuate.info.Info.class})
    @EnableConfigurationProperties({org.springframework.boot.autoconfigure.security.SecurityProperties.class,AuthProperties.class,ActuatorAuthProperties.class})
    @Configuration
    public class ActuatorSecurityAutoConfiguration
    extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
    implements org.springframework.core.Ordered
    The actuator security auto configuration.
    Author:
    Christian Bremer
    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Constructor Summary

      Constructors 
      Constructor Description
      ActuatorSecurityAutoConfiguration​(org.springframework.boot.autoconfigure.security.SecurityProperties securityProperties, AuthProperties authProperties, ActuatorAuthProperties actuatorAuthProperties, org.springframework.beans.factory.ObjectProvider<JsonPathJwtConverter> jsonPathJwtConverterProvider, org.springframework.beans.factory.ObjectProvider<RestTemplateAccessTokenRetriever> tokenRetrieverProvider, org.springframework.beans.factory.ObjectProvider<org.springframework.security.crypto.password.PasswordEncoder> passwordEncoderProvider)
      Instantiates a new actuator security auto configuration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void configure​(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)  
      int getOrder()  
      void init()
      Init.
      org.springframework.security.core.userdetails.UserDetailsService userDetailsServiceBean()  
      • 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
    • Constructor Detail

      • ActuatorSecurityAutoConfiguration

        public ActuatorSecurityAutoConfiguration​(org.springframework.boot.autoconfigure.security.SecurityProperties securityProperties,
                                                 AuthProperties authProperties,
                                                 ActuatorAuthProperties actuatorAuthProperties,
                                                 org.springframework.beans.factory.ObjectProvider<JsonPathJwtConverter> jsonPathJwtConverterProvider,
                                                 org.springframework.beans.factory.ObjectProvider<RestTemplateAccessTokenRetriever> tokenRetrieverProvider,
                                                 org.springframework.beans.factory.ObjectProvider<org.springframework.security.crypto.password.PasswordEncoder> passwordEncoderProvider)
        Instantiates a new actuator security auto configuration.
        Parameters:
        securityProperties - the security properties
        authProperties - the security properties
        actuatorAuthProperties - the actuator security properties
        jsonPathJwtConverterProvider - the json path jwt converter provider
        tokenRetrieverProvider - the token retriever provider
        passwordEncoderProvider - the password encoder provider
    • Method Detail

      • init

        @EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class)
        public void init()
        Init.
      • getOrder

        public int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered
      • configure

        protected void configure​(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
                          throws Exception
        Overrides:
        configure in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
        Throws:
        Exception
      • userDetailsServiceBean

        @ConditionalOnExpression("\'${bremersee.actuator.auth.jwk-set-uri:}\'.empty")
        @ConditionalOnMissingBean
        @Bean
        public org.springframework.security.core.userdetails.UserDetailsService userDetailsServiceBean()
        Overrides:
        userDetailsServiceBean in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter