From b6c1442d13681ea264aef4199cec0f23b73d61db Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 27 Apr 2025 14:10:19 +0200 Subject: [PATCH] WIP:sasl-client--broker-angepasst--so-funzts MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * Für das Setup werden noch weitere Schalter benötigt! ** Das Warten auf den Cluster schlägt fehl, da die Zugriffsrechte fehlen! ** Außerdem: Die `client.properties` enthalten hier erst mal die Broker-Rechte! Umbenennen! Und/Oder einen expliziten Nutzer admin einühren... ** Außerdem: Die Listener-Interfaces `BROKER` und `DOCKER` sind so eigentlich doppelt ** ENTWEDER: BROKER ohne Authentifizierung mit `User:ANONYMOUS`, wie bei den alten Vorführ-Setups, ODER: Nur ein Interface. * Außerdem: Das Skript enthält noch Fehler --- client.properties | 2 +- docker-compose.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client.properties b/client.properties index 356f041..b040250 100644 --- a/client.properties +++ b/client.properties @@ -1,5 +1,5 @@ sasl.mechanism=PLAIN security.protocol=SASL_PLAINTEXT sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \ - username="client" \ + username="broker" \ password="geheim"; diff --git a/docker-compose.yml b/docker-compose.yml index da3e6c7..e74d367 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,12 +30,14 @@ services: user_client="geheim" \ username="broker" \ password="geheim"; \ + KAFKA_LISTENER_NAME_DOCKER_SASL_ENABLED_MECHANISMS: PLAIN KAFKA_LISTENER_NAME_DOCKER_PLAIN_SASL_JAAS_CONFIG: | org.apache.kafka.common.security.plain.PlainLoginModule required \ user_broker="geheim" \ user_client="geheim" \ username="broker" \ password="geheim"; \ + KAFKA_LISTENER_NAME_LOCALHOST_SASL_ENABLED_MECHANISMS: PLAIN KAFKA_LISTENER_NAME_LOCALHOST_PLAIN_SASL_JAAS_CONFIG: | org.apache.kafka.common.security.plain.PlainLoginModule required \ user_broker="geheim" \ @@ -75,12 +77,14 @@ services: user_client="geheim" \ username="broker" \ password="geheim"; \ + KAFKA_LISTENER_NAME_DOCKER_SASL_ENABLED_MECHANISMS: PLAIN KAFKA_LISTENER_NAME_DOCKER_PLAIN_SASL_JAAS_CONFIG: | org.apache.kafka.common.security.plain.PlainLoginModule required \ user_broker="geheim" \ user_client="geheim" \ username="broker" \ password="geheim"; \ + KAFKA_LISTENER_NAME_LOCALHOST_SASL_ENABLED_MECHANISMS: PLAIN KAFKA_LISTENER_NAME_LOCALHOST_PLAIN_SASL_JAAS_CONFIG: | org.apache.kafka.common.security.plain.PlainLoginModule required \ user_broker="geheim" \ @@ -125,12 +129,14 @@ services: user_client="geheim" \ username="broker" \ password="geheim"; \ + KAFKA_LISTENER_NAME_DOCKER_SASL_ENABLED_MECHANISMS: PLAIN KAFKA_LISTENER_NAME_DOCKER_PLAIN_SASL_JAAS_CONFIG: | org.apache.kafka.common.security.plain.PlainLoginModule required \ user_broker="geheim" \ user_client="geheim" \ username="broker" \ password="geheim"; \ + KAFKA_LISTENER_NAME_LOCALHOST_SASL_ENABLED_MECHANISMS: PLAIN KAFKA_LISTENER_NAME_LOCALHOST_PLAIN_SASL_JAAS_CONFIG: | org.apache.kafka.common.security.plain.PlainLoginModule required \ user_broker="geheim" \ -- 2.20.1