Skip to content

Commit 846006c

Browse files
committed
BAEL-315 really lock down the discovery server
1 parent b7ec6f3 commit 846006c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • spring-cloud/spring-cloud-bootstrap/discovery/src/main/java/com/baeldung/spring/cloud/bootstrap/discovery

‎spring-cloud/spring-cloud-bootstrap/discovery/src/main/java/com/baeldung/spring/cloud/bootstrap/discovery/SecurityConfig.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception{
4040
protected void configure(HttpSecurity http) throws Exception {
4141
http
4242
.authorizeRequests()
43+
.antMatchers("/eureka/js/**","/eureka/css/**","/eureka/images/**","/eureka/fonts/**").authenticated()
44+
.antMatchers("/eureka/**").hasRole("SYSTEM")
4345
.antMatchers(HttpMethod.GET, "/").hasRole("ADMIN")
4446
.anyRequest().authenticated()
4547
.and()

0 commit comments

Comments
 (0)