【发布时间】:2017-03-06 18:57:37
【问题描述】:
我有 Spring Boot REST 服务,其中已经存在基本身份验证。我将 Hystrix 集成到短路外部服务和一个仪表板来监控它。但是如何保护管理员用户的 Hystrix 仪表板?
谢谢, 阿伦。
【问题讨论】:
标签: spring-boot hystrix
我有 Spring Boot REST 服务,其中已经存在基本身份验证。我将 Hystrix 集成到短路外部服务和一个仪表板来监控它。但是如何保护管理员用户的 Hystrix 仪表板?
谢谢, 阿伦。
【问题讨论】:
标签: spring-boot hystrix
配置 Spring Security 以在 /hystrix 端点上强制执行基本身份验证。例如:
@Configuration
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(final HttpSecurity http) throws Exception {
http.httpBasic()
.and()
.authorizeRequests()
.antMatchers("/hystrix")
.authenticated();
}
}
【讨论】: