Skip to content

Commit cf819d9

Browse files
Merge branch 'main' into issues/300-regex-for-rbac
2 parents 736cc4f + 1682872 commit cf819d9

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Versatile, fast and lightweight web UI for managing Apache Kafka® clusters.
1818
<a href="https://ui.docs.kafbat.io/quick-start/demo-run">Quick Start</a> •
1919
<a href="https://discord.gg/4DWzD7pGE5">Community</a>
2020
<br/>
21+
<a href="https://aws.amazon.com/marketplace/pp/prodview-6tdqqzzjwmejq">AWS Marketplace</a> •
2122
<a href="https://www.producthunt.com/products/ui-for-apache-kafka/reviews/new">ProductHunt</a>
2223
</p>
2324

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package io.kafbat.ui.config;
2+
3+
import org.springframework.context.annotation.Bean;
4+
import org.springframework.context.annotation.Configuration;
5+
import org.springframework.security.web.server.firewall.StrictServerWebExchangeFirewall;
6+
7+
@Configuration
8+
public class GeneralSecurityConfig {
9+
10+
@Bean
11+
public StrictServerWebExchangeFirewall strictServerWebExchangeFirewall() {
12+
StrictServerWebExchangeFirewall firewall = new StrictServerWebExchangeFirewall();
13+
firewall.setAllowUrlEncodedSlash(true);
14+
return firewall;
15+
}
16+
17+
}

api/src/main/java/io/kafbat/ui/service/AdminClientServiceImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.util.Map;
99
import java.util.Optional;
1010
import java.util.Properties;
11+
import java.util.concurrent.CompletableFuture;
1112
import java.util.concurrent.ConcurrentHashMap;
1213
import java.util.concurrent.atomic.AtomicLong;
1314
import lombok.extern.slf4j.Slf4j;
@@ -40,7 +41,7 @@ public Mono<ReactiveAdminClient> get(KafkaCluster cluster) {
4041
}
4142

4243
private Mono<ReactiveAdminClient> createAdminClient(KafkaCluster cluster) {
43-
return Mono.fromSupplier(() -> {
44+
return Mono.fromFuture(CompletableFuture.supplyAsync(() -> {
4445
Properties properties = new Properties();
4546
KafkaClientSslPropertiesUtil.addKafkaSslProperties(cluster.getOriginalProperties().getSsl(), properties);
4647
properties.putAll(cluster.getProperties());
@@ -51,7 +52,7 @@ private Mono<ReactiveAdminClient> createAdminClient(KafkaCluster cluster) {
5152
"kafbat-ui-admin-" + Instant.now().getEpochSecond() + "-" + CLIENT_ID_SEQ.incrementAndGet()
5253
);
5354
return AdminClient.create(properties);
54-
}).flatMap(ac -> ReactiveAdminClient.create(ac).doOnError(th -> ac.close()))
55+
})).flatMap(ac -> ReactiveAdminClient.create(ac).doOnError(th -> ac.close()))
5556
.onErrorMap(th -> new IllegalStateException(
5657
"Error while creating AdminClient for the cluster " + cluster.getName(), th));
5758
}

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@
143143
<artifactId>cel</artifactId>
144144
<version>${dev.cel.version}</version>
145145
</dependency>
146+
<dependency>
147+
<groupId>net.minidev</groupId>
148+
<artifactId>json-smart</artifactId>
149+
<version>2.5.2</version>
150+
</dependency>
146151
<dependency>
147152
<groupId>com.google.guava</groupId>
148153
<artifactId>guava</artifactId>

0 commit comments

Comments
 (0)