Class ActuatorSecurityConfig

java.lang.Object
springboot.bg.harisauto.common.config.monitoring.ActuatorSecurityConfig

@Configuration public class ActuatorSecurityConfig extends Object
ActuatorSecurityConfig.java - Security for the management endpoints.

The endpoints are served on management.server.port (9090), separately from the public site on 8080, and are open on that port so Prometheus can scrape without carrying credentials. That is only safe because the port is meant to stay internal - it must be firewalled and never published. If it has to be reachable from an untrusted network, replace the permitAll below with authentication.

Author:
Kristian Popov
  • Constructor Details

    • ActuatorSecurityConfig

      public ActuatorSecurityConfig()
  • Method Details

    • actuatorSecurityFilterChain

      @Bean @Order(0) public org.springframework.security.web.SecurityFilterChain actuatorSecurityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
      Filter chain for the management port.
      Throws:
      Exception