From e93b8f01cb16788aacbef753aae1b9e4a1048788 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 8 Apr 2024 17:11:09 +0200 Subject: [PATCH] WIP --- README.sh | 10 +++++++--- docker/client.properties | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 docker/client.properties diff --git a/README.sh b/README.sh index 7d6406d..24dfb4e 100755 --- a/README.sh +++ b/README.sh @@ -16,11 +16,11 @@ docker-compose -f docker/docker-compose.yml logs setup echo echo "Hilfe-Ausgabe von kafkacat" echo -docker-compose -f docker/docker-compose.yml exec -T cli kafkacat -h +kafkacat -h echo echo "Nachrichten schreiben mit kafkacat" echo -docker-compose -f docker/docker-compose.yml exec -T cli kafkacat -P -b kafka:9092 -t test << EOF +kafkacat -P -b :9092 -Xsecurity.protocol=sasl_plaintext -Xsasl.mechanisms=PLAIN -Xsasl.username=client -Xsasl.password=client-secret -t test << EOF Hallo Welt! Nachricht #1 Nachricht #2 @@ -29,4 +29,8 @@ EOF echo echo "Nachrichten lesen mit kafkacat" echo -docker-compose -f docker/docker-compose.yml exec cli kafkacat -C -b kafka:9092 -t test -o beginning -e +kafkacat -C -b :9092 -Xsecurity.protocol=sasl_plaintext -Xsasl.mechanisms=PLAIN -Xsasl.username=client -Xsasl.password=client-secret -t test -o beginning -e + + +kafkacat -L -b :9092 -Xsecurity.protocol=sasl_plaintext -Xsasl.mechanisms=PLAIN -Xsasl.username=client -Xsasl.password=client-secret + diff --git a/docker/client.properties b/docker/client.properties new file mode 100644 index 0000000..2445124 --- /dev/null +++ b/docker/client.properties @@ -0,0 +1,17 @@ +commit 8030177a9de83e274ced1902b825e478df9355a6 +Author: Kai Moritz +Date: Wed Oct 11 18:40:55 2023 +0200 + + DOCKER und LOCALHOST erfordern Authentifizierung + +diff --git a/docker/client.properties b/docker/client.properties +new file mode 100644 +index 0000000..8a04387 +--- /dev/null ++++ b/docker/client.properties +@@ -0,0 +1,5 @@ ++sasl.mechanism=PLAIN ++security.protocol=SASL_PLAINTEXT ++sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \ ++ username="client" \ ++ password="client-secret"; -- 2.20.1