blob: 3a207c31d497ced99056b59e9ef062aaf856737f [file]
package build.bazel.dashboard.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;
import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;
@Configuration
@EnableWebFluxSecurity
public class SecurityConfig {
@Bean
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
return http.authorizeExchange()
.pathMatchers("/internal/**")
.authenticated()
.pathMatchers("/**")
.permitAll()
.and()
.httpBasic()
.and()
.csrf()
.disable()
.build();
}
}