From dd43774263a5e271fc31858b16b00b7748517a93 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Thu, 25 Jul 2019 16:19:09 -0700 Subject: [PATCH] Allow unconfigured SASL --- internal/kafka/sasl.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/kafka/sasl.go b/internal/kafka/sasl.go index 92e02207..cec5acf5 100644 --- a/internal/kafka/sasl.go +++ b/internal/kafka/sasl.go @@ -27,6 +27,9 @@ type SaramaSASL struct { func (c *SASLConfig) SetSaramaSASLConfig(config *sarama.Config) error { sasl := config.Net.SASL switch c.SASLMechanism { + case "": + // SASL is not enabled + return nil case "PLAIN": sasl.Mechanism = sarama.SASLTypePlaintext case "SCRAM-SHA-256":