About question 2)
If your Spring boot application secured by http basic auth. like this,
@Configuration
@Order(1)
@ConditionalOnProperty(name="spring.boot.admin.client.enabled", havingValue="true", matchIfMissing=false)
public class ActuatorConfig extends WebSecurityConfigurerAdapter {
@Value("${spring.boot.admin.client.instance.metadata.user.name:actuator}")
private String actuatorName;
@Value("${spring.boot.admin.client.instance.metadata.user.password:secret}")
private String actuatorPassword;
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication().withUser(actuatorName).password("{noop}"+actuatorPassword).authorities("ACTUATOR");
}
@Override
public void configure(HttpSecurity http) throws Exception {
http
.antMatcher("/actuator/**")
.authorizeRequests()
.anyRequest().hasAuthority("ACTUATOR")
.and()
.httpBasic();
}
}
the user name & password of actuator end point are defined by application.properties or application.yml in spring boot application (not spring boot admin server) like this,
spring.boot.admin.client.instance.metadata.user.name=actuator
spring.boot.admin.client.instance.metadata.user.password=secret
Your spring boot appicaitions will connect to the spring boot admin server with those information and the spring boot admin server will use those information to connect your application's actuator endpoint back.
- confirmed with Spring boot Admin 2.1.2