Skip to content

Commit efe5f24

Browse files
authored
Merge pull request #45607 from ozangunalp/bump_strimzi_test_container
Bump strimzi-test-container version from 0.107.0 to 0.109.1
2 parents 1e499cf + 0057f06 commit efe5f24

File tree

12 files changed

+88
-821
lines changed

12 files changed

+88
-821
lines changed

bom/application/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
<kafka3.version>3.7.2</kafka3.version>
142142
<lz4.version>1.8.0</lz4.version> <!-- dependency of the kafka-clients that could be overridden by other imported BOMs in the platform -->
143143
<snappy.version>1.1.10.5</snappy.version>
144-
<strimzi-test-container.version>0.107.0</strimzi-test-container.version>
144+
<strimzi-test-container.version>0.109.1</strimzi-test-container.version>
145145
<!-- Scala is used by Kafka so we need to choose a compatible version -->
146146
<scala.version>2.13.16</scala.version>
147147
<aws-lambda-java.version>1.2.3</aws-lambda-java.version>
@@ -4501,6 +4501,10 @@
45014501
<groupId>junit</groupId>
45024502
<artifactId>junit</artifactId>
45034503
</exclusion>
4504+
<exclusion>
4505+
<groupId>org.apache.logging.log4j</groupId>
4506+
<artifactId>log4j-slf4j-impl</artifactId>
4507+
</exclusion>
45044508
</exclusions>
45054509
</dependency>
45064510
<dependency>

bom/test/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<jaxb-api.version>2.3.1</jaxb-api.version>
2121

2222
<rxjava1.version>1.3.8</rxjava1.version>
23-
<strimzi-test-container.version>0.107.0</strimzi-test-container.version>
23+
<strimzi-test-container.version>0.109.1</strimzi-test-container.version>
2424

2525
<opentelemetry-proto.version>1.0.0-alpha</opentelemetry-proto.version>
2626
</properties>
@@ -67,6 +67,10 @@
6767
<groupId>com.github.docker-java</groupId>
6868
<artifactId>docker-java-api</artifactId>
6969
</exclusion>
70+
<exclusion>
71+
<groupId>org.apache.logging.log4j</groupId>
72+
<artifactId>log4j-slf4j-impl</artifactId>
73+
</exclusion>
7074
</exclusions>
7175
</dependency>
7276

integration-tests/kafka-oauth-keycloak/src/test/java/io/quarkus/it/kafka/KafkaKeycloakTestResource.java

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
package io.quarkus.it.kafka;
22

33
import static io.strimzi.test.container.StrimziKafkaContainer.KAFKA_PORT;
4+
import static java.util.Map.entry;
45

56
import java.util.HashMap;
67
import java.util.Map;
78

8-
import org.testcontainers.utility.MountableFile;
9-
109
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
1110
import io.quarkus.test.keycloak.client.KeycloakTestClient;
1211
import io.quarkus.test.keycloak.server.KeycloakContainer;
@@ -31,14 +30,24 @@ public Map<String, String> start() {
3130
//Start kafka container
3231
this.kafka = new StrimziKafkaContainer("quay.io/strimzi/kafka:latest-kafka-3.7.0")
3332
.withBrokerId(1)
34-
.withKafkaConfigurationMap(Map.of("listener.security.protocol.map",
35-
"JWT:SASL_PLAINTEXT,BROKER1:PLAINTEXT",
36-
"listener.name.jwt.oauthbearer.sasl.jaas.config",
37-
getOauthSaslJaasConfig(keycloak.getInternalUrl(), keycloak.getServerUrl()),
38-
"listener.name.jwt.plain.sasl.jaas.config",
39-
getPlainSaslJaasConfig(keycloak.getInternalUrl(), keycloak.getServerUrl())))
33+
.withKafkaConfigurationMap(Map.ofEntries(
34+
entry("listener.security.protocol.map", "JWT:SASL_PLAINTEXT,BROKER1:PLAINTEXT"),
35+
entry("listener.name.jwt.oauthbearer.sasl.jaas.config",
36+
getOauthSaslJaasConfig(keycloak.getInternalUrl(), keycloak.getServerUrl())),
37+
entry("listener.name.jwt.plain.sasl.jaas.config",
38+
getPlainSaslJaasConfig(keycloak.getInternalUrl(), keycloak.getServerUrl())),
39+
entry("sasl.enabled.mechanisms", "OAUTHBEARER"),
40+
entry("sasl.mechanism.inter.broker.protocol", "OAUTHBEARER"),
41+
entry("oauth.username.claim", "preferred_username"),
42+
entry("principal.builder.class", "io.strimzi.kafka.oauth.server.OAuthKafkaPrincipalBuilder"),
43+
entry("listener.name.jwt.sasl.enabled.mechanisms", "OAUTHBEARER,PLAIN"),
44+
entry("listener.name.jwt.oauthbearer.sasl.server.callback.handler.class",
45+
"io.strimzi.kafka.oauth.server.JaasServerOauthValidatorCallbackHandler"),
46+
entry("listener.name.jwt.oauthbearer.sasl.login.callback.handler.class",
47+
"io.strimzi.kafka.oauth.client.JaasClientOauthLoginCallbackHandler"),
48+
entry("listener.name.jwt.plain.sasl.server.callback.handler.class",
49+
"io.strimzi.kafka.oauth.server.plain.JaasServerOauthOverPlainValidatorCallbackHandler")))
4050
.withNetworkAliases("kafka")
41-
.withServerProperties(MountableFile.forClasspathResource("kafkaServer.properties"))
4251
.withBootstrapServers(
4352
c -> String.format("JWT://%s:%s", c.getHost(), c.getMappedPort(KAFKA_PORT)));
4453
this.kafka.start();

integration-tests/kafka-oauth-keycloak/src/test/resources/kafkaServer.properties

Lines changed: 0 additions & 164 deletions
This file was deleted.

integration-tests/kafka-sasl-elytron/src/test/java/io/quarkus/it/kafka/KafkaSaslTestResource.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.quarkus.it.kafka;
22

33
import static io.strimzi.test.container.StrimziKafkaContainer.KAFKA_PORT;
4+
import static java.util.Map.entry;
45

56
import java.util.HashMap;
67
import java.util.Map;
@@ -34,10 +35,23 @@ public Map<String, String> start() {
3435

3536
//Start kafka container
3637
kafka = new StrimziKafkaContainer()
38+
.withBrokerId(0)
3739
.withBootstrapServers(
3840
c -> String.format("SASL_PLAINTEXT://%s:%s", c.getHost(), c.getMappedPort(KAFKA_PORT)))
41+
.withKafkaConfigurationMap(Map.ofEntries(
42+
entry("listener.security.protocol.map", "SASL_PLAINTEXT:SASL_PLAINTEXT,BROKER1:PLAINTEXT"),
43+
entry("inter.broker.listener.name", "SASL_PLAINTEXT"),
44+
entry("sasl.enabled.mechanisms", "GSSAPI"),
45+
entry("sasl.mechanism.inter.broker.protocol", "GSSAPI"),
46+
entry("listener.name.sasl_plaintext.gssapi.sasl.jaas.config",
47+
"com.sun.security.auth.module.Krb5LoginModule required " +
48+
"useKeyTab=true storeKey=true debug=true serviceName=\"kafka\" " +
49+
"keyTab=\"/opt/kafka/config/kafkabroker.keytab\" " +
50+
"principal=\"kafka/[email protected]\";"),
51+
entry("sasl.kerberos.service.name", "kafka"),
52+
entry("ssl.endpoint.identification.algorithm", "https"),
53+
entry("ssl.client.auth", "none")))
3954
.withPort(KAFKA_PORT)
40-
.withServerProperties(MountableFile.forClasspathResource("kafkaServer.properties"))
4155
.withCopyFileToContainer(MountableFile.forClasspathResource("krb5KafkaBroker.conf"),
4256
"/etc/krb5.conf")
4357
.withCopyFileToContainer(MountableFile.forHostPath("target/kafkabroker.keytab"),

0 commit comments

Comments
 (0)