Skip to content

Commit

Permalink
Enable GSSAPI authentication when Kerberos is configured (elastic#17470)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5ca0e4c)
  • Loading branch information
kvch committed Apr 3, 2020
1 parent df96f62 commit 110be53
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 @@ -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,
Expand Down

0 comments on commit 110be53

Please sign in to comment.