diff --git a/filebeat/input/kafka/config.go b/filebeat/input/kafka/config.go index 2637db1a1ea..b132a843055 100644 --- a/filebeat/input/kafka/config.go +++ b/filebeat/input/kafka/config.go @@ -182,6 +182,9 @@ func newSaramaConfig(config kafkaInputConfig) (*sarama.Config, error) { if config.Kerberos != nil { cfgwarn.Beta("Kerberos authentication for Kafka is beta.") + + k.Net.SASL.Enable = true + k.Net.SASL.Mechanism = sarama.SASLTypeGSSAPI k.Net.SASL.GSSAPI = sarama.GSSAPIConfig{ AuthType: int(config.Kerberos.AuthType), KeyTabPath: config.Kerberos.KeyTabPath, diff --git a/libbeat/outputs/kafka/config.go b/libbeat/outputs/kafka/config.go index 22f55ebc718..1290b8fa297 100644 --- a/libbeat/outputs/kafka/config.go +++ b/libbeat/outputs/kafka/config.go @@ -176,6 +176,9 @@ func newSaramaConfig(log *logp.Logger, config *kafkaConfig) (*sarama.Config, err if config.Kerberos != nil { cfgwarn.Beta("Kerberos authentication for Kafka is beta.") + + k.Net.SASL.Enable = true + k.Net.SASL.Mechanism = sarama.SASLTypeGSSAPI k.Net.SASL.GSSAPI = sarama.GSSAPIConfig{ AuthType: int(config.Kerberos.AuthType), KeyTabPath: config.Kerberos.KeyTabPath,