Skip to content

Commit

Permalink
Enable GSSAPI authentication when Kerberos is configured (#17470)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch authored Apr 3, 2020
1 parent dcb8d8b commit 5ca0e4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions filebeat/input/kafka/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions libbeat/outputs/kafka/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5ca0e4c

Please sign in to comment.