Skip to content

Commit 9f7403c

Browse files
authored
Support SASL mechanisms with SASL_PLAINTEXT
Allow using SASL mechanisms other than PLAIN with SASL_PLAINTEXT security protocol
1 parent f78fe1e commit 9f7403c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/kaf/kaf.go

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ func getConfig() (saramaConfig *sarama.Config) {
9999
} else {
100100
saramaConfig.Net.TLS.Config = &tls.Config{InsecureSkipVerify: false}
101101
}
102+
}
103+
if cluster.SecurityProtocol == "SASL_SSL" || cluster.SecurityProtocol == "SASL_PLAINTEXT" {
102104
if cluster.SASL.Mechanism == "SCRAM-SHA-512" {
103105
saramaConfig.Net.SASL.SCRAMClientGeneratorFunc = func() sarama.SCRAMClient { return &XDGSCRAMClient{HashGeneratorFcn: SHA512} }
104106
saramaConfig.Net.SASL.Mechanism = sarama.SASLMechanism(sarama.SASLTypeSCRAMSHA512)

0 commit comments

Comments
 (0)