Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump strimzi-test-container version from 0.107.0 to 0.109.1 #45607

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<kafka3.version>3.7.2</kafka3.version>
<lz4.version>1.8.0</lz4.version> <!-- dependency of the kafka-clients that could be overridden by other imported BOMs in the platform -->
<snappy.version>1.1.10.5</snappy.version>
<strimzi-test-container.version>0.107.0</strimzi-test-container.version>
<strimzi-test-container.version>0.109.1</strimzi-test-container.version>
<!-- Scala is used by Kafka so we need to choose a compatible version -->
<scala.version>2.13.16</scala.version>
<aws-lambda-java.version>1.2.3</aws-lambda-java.version>
Expand Down Expand Up @@ -4496,6 +4496,10 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
6 changes: 5 additions & 1 deletion bom/test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<jaxb-api.version>2.3.1</jaxb-api.version>

<rxjava1.version>1.3.8</rxjava1.version>
<strimzi-test-container.version>0.107.0</strimzi-test-container.version>
<strimzi-test-container.version>0.109.1</strimzi-test-container.version>

<opentelemetry-proto.version>1.0.0-alpha</opentelemetry-proto.version>
</properties>
Expand Down Expand Up @@ -67,6 +67,10 @@
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package io.quarkus.it.kafka;

import static io.strimzi.test.container.StrimziKafkaContainer.KAFKA_PORT;
import static java.util.Map.entry;

import java.util.HashMap;
import java.util.Map;

import org.testcontainers.utility.MountableFile;

import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
import io.quarkus.test.keycloak.client.KeycloakTestClient;
import io.quarkus.test.keycloak.server.KeycloakContainer;
Expand All @@ -31,14 +30,24 @@ public Map<String, String> start() {
//Start kafka container
this.kafka = new StrimziKafkaContainer("quay.io/strimzi/kafka:latest-kafka-3.7.0")
.withBrokerId(1)
.withKafkaConfigurationMap(Map.of("listener.security.protocol.map",
"JWT:SASL_PLAINTEXT,BROKER1:PLAINTEXT",
"listener.name.jwt.oauthbearer.sasl.jaas.config",
getOauthSaslJaasConfig(keycloak.getInternalUrl(), keycloak.getServerUrl()),
"listener.name.jwt.plain.sasl.jaas.config",
getPlainSaslJaasConfig(keycloak.getInternalUrl(), keycloak.getServerUrl())))
.withKafkaConfigurationMap(Map.ofEntries(
entry("listener.security.protocol.map", "JWT:SASL_PLAINTEXT,BROKER1:PLAINTEXT"),
entry("listener.name.jwt.oauthbearer.sasl.jaas.config",
getOauthSaslJaasConfig(keycloak.getInternalUrl(), keycloak.getServerUrl())),
entry("listener.name.jwt.plain.sasl.jaas.config",
getPlainSaslJaasConfig(keycloak.getInternalUrl(), keycloak.getServerUrl())),
entry("sasl.enabled.mechanisms", "OAUTHBEARER"),
entry("sasl.mechanism.inter.broker.protocol", "OAUTHBEARER"),
entry("oauth.username.claim", "preferred_username"),
entry("principal.builder.class", "io.strimzi.kafka.oauth.server.OAuthKafkaPrincipalBuilder"),
entry("listener.name.jwt.sasl.enabled.mechanisms", "OAUTHBEARER,PLAIN"),
entry("listener.name.jwt.oauthbearer.sasl.server.callback.handler.class",
"io.strimzi.kafka.oauth.server.JaasServerOauthValidatorCallbackHandler"),
entry("listener.name.jwt.oauthbearer.sasl.login.callback.handler.class",
"io.strimzi.kafka.oauth.client.JaasClientOauthLoginCallbackHandler"),
entry("listener.name.jwt.plain.sasl.server.callback.handler.class",
"io.strimzi.kafka.oauth.server.plain.JaasServerOauthOverPlainValidatorCallbackHandler")))
.withNetworkAliases("kafka")
.withServerProperties(MountableFile.forClasspathResource("kafkaServer.properties"))
.withBootstrapServers(
c -> String.format("JWT://%s:%s", c.getHost(), c.getMappedPort(KAFKA_PORT)));
this.kafka.start();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.quarkus.it.kafka;

import static io.strimzi.test.container.StrimziKafkaContainer.KAFKA_PORT;
import static java.util.Map.entry;

import java.util.HashMap;
import java.util.Map;
Expand Down Expand Up @@ -34,10 +35,23 @@ public Map<String, String> start() {

//Start kafka container
kafka = new StrimziKafkaContainer()
.withBrokerId(0)
.withBootstrapServers(
c -> String.format("SASL_PLAINTEXT://%s:%s", c.getHost(), c.getMappedPort(KAFKA_PORT)))
.withKafkaConfigurationMap(Map.ofEntries(
entry("listener.security.protocol.map", "SASL_PLAINTEXT:SASL_PLAINTEXT,BROKER1:PLAINTEXT"),
entry("inter.broker.listener.name", "SASL_PLAINTEXT"),
entry("sasl.enabled.mechanisms", "GSSAPI"),
entry("sasl.mechanism.inter.broker.protocol", "GSSAPI"),
entry("listener.name.sasl_plaintext.gssapi.sasl.jaas.config",
"com.sun.security.auth.module.Krb5LoginModule required " +
"useKeyTab=true storeKey=true debug=true serviceName=\"kafka\" " +
"keyTab=\"/opt/kafka/config/kafkabroker.keytab\" " +
"principal=\"kafka/localhost@EXAMPLE.COM\";"),
entry("sasl.kerberos.service.name", "kafka"),
entry("ssl.endpoint.identification.algorithm", "https"),
entry("ssl.client.auth", "none")))
.withPort(KAFKA_PORT)
.withServerProperties(MountableFile.forClasspathResource("kafkaServer.properties"))
.withCopyFileToContainer(MountableFile.forClasspathResource("krb5KafkaBroker.conf"),
"/etc/krb5.conf")
.withCopyFileToContainer(MountableFile.forHostPath("target/kafkabroker.keytab"),
Expand Down
Loading
Loading