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 6e25a7afd85..d2b645f075d 100644 --- a/libbeat/outputs/kafka/config.go +++ b/libbeat/outputs/kafka/config.go @@ -218,6 +218,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,