Skip to content

Commit

Permalink
fix(common.kafka): Correctly set gssapi username/password (#14522)
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj authored Jan 5, 2024
1 parent d7a5bf6 commit 12095b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/common/kafka/sasl.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ func (k *SASLAuth) SetSASLConfig(cfg *sarama.Config) error {
return fmt.Errorf("getting username failed: %w", err)
}
cfg.Net.SASL.User = username.String()
username.Destroy()
defer username.Destroy()
password, err := k.SASLPassword.Get()
if err != nil {
return fmt.Errorf("getting password failed: %w", err)
}
cfg.Net.SASL.Password = password.String()
password.Destroy()
defer password.Destroy()

if k.SASLMechanism != "" {
cfg.Net.SASL.Mechanism = sarama.SASLMechanism(k.SASLMechanism)
Expand Down

0 comments on commit 12095b2

Please sign in to comment.