I have a Spring Boot service which is configured using Oath security like this:
@Configuration
@EnableResourceServer
public class SecurityConfig extends ResourceServerConfigurerAdapter {
@Override
public void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/actuator/**").permitAll()
.anyRequest().authenticated()
}
}
The actuator
endpoint was excluded from authentification, but now I need to secure it, but not with Oath as the other endpoints, but with Basic Auth with user/password. How can I achieve this? I'm using Spring-Boot version 2.0.2.RELEASE
.