File tree Expand file tree Collapse file tree 4 files changed +45
-1
lines changed
java/com/provectus/kafka/ui/cluster/config Expand file tree Collapse file tree 4 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 3434 </exclusion >
3535 </exclusions >
3636 </dependency >
37+ <dependency >
38+ <groupId >org.springframework.boot</groupId >
39+ <artifactId >spring-boot-starter-security</artifactId >
40+ </dependency >
41+ <dependency >
42+ <groupId >org.springframework.security</groupId >
43+ <artifactId >spring-security-oauth2-client</artifactId >
44+ </dependency >
3745 <dependency >
3846 <groupId >com.provectus</groupId >
3947 <artifactId >kafka-ui-contract</artifactId >
Original file line number Diff line number Diff line change 1+ package com .provectus .kafka .ui .cluster .config ;
2+
3+ import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
4+ import org .springframework .context .annotation .Bean ;
5+ import org .springframework .context .annotation .Configuration ;
6+ import org .springframework .security .config .annotation .web .reactive .EnableWebFluxSecurity ;
7+ import org .springframework .security .config .web .server .ServerHttpSecurity ;
8+ import org .springframework .security .web .server .SecurityWebFilterChain ;
9+
10+ @ Configuration
11+ @ EnableWebFluxSecurity
12+ @ ConditionalOnProperty (value = "auth.enabled" , havingValue = "false" )
13+ public class SecurityConfig {
14+
15+ @ Bean
16+ public SecurityWebFilterChain configure (ServerHttpSecurity http ) {
17+ return http .authorizeExchange ()
18+ .anyExchange ().permitAll ()
19+ .and ()
20+ .csrf ().disable ()
21+ .build ();
22+ }
23+
24+ }
Original file line number Diff line number Diff line change 1+ auth :
2+ enabled : true
3+ spring :
4+ security :
5+ oauth2 :
6+ client :
7+ registration :
8+ google :
9+ client-id : [put your client id here]
10+ client-secret : [put your client secret here]
Original file line number Diff line number Diff line change @@ -22,4 +22,6 @@ zookeeper:
2222 connection-timeout : 1000
2323spring :
2424 jmx :
25- enabled : true
25+ enabled : true
26+ auth :
27+ enabled : false
You can’t perform that action at this time.
0 commit comments