From a8c1303466aa5032727c9323e6fc3d191b7c4e45 Mon Sep 17 00:00:00 2001 From: Jason Hernandez <7144515+jasonhernandez@users.noreply.github.com> Date: Tue, 7 Jul 2026 00:06:53 -0700 Subject: [PATCH] ci: re-enable the Kafka auth test suite The suite was disabled entirely in #36405 after unexplained PEM flakes (SS-115). While it was dark, the Confluent Platform 7.9.4 -> 8.2.0 bump (#36683) broke its setup in two ways that nothing caught: - CP 8.x ships Jetty 12, which moved the JAAS login modules from org.eclipse.jetty.jaas.spi to org.eclipse.jetty.security.jaas.spi. The schema registry basic-auth realm silently failed to load its login module and returned 401 for every request, correct credentials included. Point the jaas.config at the new class path. - CP 8.x brokers negotiate TLS 1.3, where a missing or untrusted client certificate fails with different alert text (certificate required, alert 116) than TLS 1.2 (bad certificate, alert 42). The kafka mssl tests asserted the exact TLS 1.2 wording. Assert only that the broker rejected the connection with a TLS alert, since the exact text varies with TLS version and OpenSSL build. This is the third exact-text loosening in this suite (#30501, #36232). With both fixes the full suite passes locally against current main images. The original SS-115 PEM flake did not reproduce in local runs on either reqwest 0.12 (main) or the 0.13.4 branch. Co-Authored-By: Claude Fable 5 --- ci/test/pipeline.template.yml | 1 - test/kafka-auth/schema-registry.jaas.config | 4 +++- test/kafka-auth/test-kafka-mssl.td | 8 ++++++-- test/kafka-auth/test-kafka-sasl-mssl.td | 8 ++++++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ci/test/pipeline.template.yml b/ci/test/pipeline.template.yml index 9781a635e904c..fd5a650571c6c 100644 --- a/ci/test/pipeline.template.yml +++ b/ci/test/pipeline.template.yml @@ -444,7 +444,6 @@ steps: composition: kafka-auth agents: queue: hetzner-aarch64-8cpu-16gb - skip: "https://linear.app/materializeinc/issue/SS-115" - id: kafka-exactly-once label: Kafka exactly-once diff --git a/test/kafka-auth/schema-registry.jaas.config b/test/kafka-auth/schema-registry.jaas.config index ec6d1c9657a6d..a728453758247 100644 --- a/test/kafka-auth/schema-registry.jaas.config +++ b/test/kafka-auth/schema-registry.jaas.config @@ -7,6 +7,8 @@ // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0. +// NOTE: Jetty 12 (Confluent Platform 8.x) moved the JAAS login modules from +// org.eclipse.jetty.jaas.spi to org.eclipse.jetty.security.jaas.spi. SchemaRegistry { - org.eclipse.jetty.jaas.spi.PropertyFileLoginModule required file="/etc/schema-registry/user.properties"; + org.eclipse.jetty.security.jaas.spi.PropertyFileLoginModule required file="/etc/schema-registry/user.properties"; }; diff --git a/test/kafka-auth/test-kafka-mssl.td b/test/kafka-auth/test-kafka-mssl.td index 7d7f930676f1d..32150768d62e9 100644 --- a/test/kafka-auth/test-kafka-mssl.td +++ b/test/kafka-auth/test-kafka-mssl.td @@ -29,7 +29,11 @@ banana BROKER 'kafka:9094', SSL CERTIFICATE AUTHORITY = '${ca-crt}' ) -contains:ssl/tls alert bad certificate +# NOTE: the exact alert text varies with the negotiated TLS version and +# OpenSSL build (TLS 1.2: "ssl/tls alert bad certificate", TLS 1.3: +# "tlsv13 alert certificate required"), so assert only that the broker +# rejected the connection with a TLS alert. +contains:alert ! CREATE CONNECTION kafka_invalid TO KAFKA ( BROKER 'kafka:9094', @@ -37,7 +41,7 @@ contains:ssl/tls alert bad certificate SSL KEY SECRET kafka1_key, SSL CERTIFICATE AUTHORITY '${ca-crt}' ) -contains:ssl/tls alert certificate unknown +contains:alert ! CREATE CONNECTION kafka_invalid TO KAFKA ( BROKER 'kafka:9094', diff --git a/test/kafka-auth/test-kafka-sasl-mssl.td b/test/kafka-auth/test-kafka-sasl-mssl.td index e7199e11ef952..beeb039a9b010 100644 --- a/test/kafka-auth/test-kafka-sasl-mssl.td +++ b/test/kafka-auth/test-kafka-sasl-mssl.td @@ -33,7 +33,11 @@ banana SASL PASSWORD SECRET password, SSL CERTIFICATE AUTHORITY = '${ca-crt}' ) -contains:ssl/tls alert bad certificate +# NOTE: the exact alert text varies with the negotiated TLS version and +# OpenSSL build (TLS 1.2: "ssl/tls alert bad certificate", TLS 1.3: +# "tlsv13 alert certificate required"), so assert only that the broker +# rejected the connection with a TLS alert. +contains:alert ! CREATE CONNECTION kafka_invalid TO KAFKA ( BROKER 'kafka:9097', @@ -44,7 +48,7 @@ contains:ssl/tls alert bad certificate SSL KEY SECRET kafka1_key, SSL CERTIFICATE AUTHORITY '${ca-crt}' ) -contains:ssl/tls alert certificate unknown +contains:alert ! CREATE CONNECTION kafka_invalid TO KAFKA ( BROKER 'kafka:9097',