package com.provectus.kafka.ui.config; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; 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 @ConditionalOnProperty(value = "auth.enabled", havingValue = "false") public class SecurityConfig { @Bean public SecurityWebFilterChain configure(ServerHttpSecurity http) { return http.authorizeExchange() .anyExchange().permitAll() .and() .csrf().disable() .build(); } }