Skip to content

Commit

Permalink
Merge pull request #71 from arquivei/feature/add-plaintext-authentica…
Browse files Browse the repository at this point in the history
…tion-option

Adds plaintext authentication option
  • Loading branch information
joesantos418 authored Jun 15, 2023
2 parents fa9767b + c76d83a commit 61e0b21
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pipeline/inputstreams/kafka_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ func WithKafkaSaslPlainAuthentication(username, password string) KafkaOption {
}
}

// WithKafkaPlaintextAuthentication configures kafka plaintext authentication.
func WithKafkaPlaintextAuthentication(username, password string) KafkaOption {
return func(kp *kafkaProvider) {
kp.configMap["security.protocol"] = "PLAINTEXT"
kp.configMap["sasl.mechanisms"] = "PLAIN"
kp.configMap["sasl.username"] = username
kp.configMap["sasl.password"] = password
}
}

// WithKafkaBrokers sets the kafka topics for the input stream.
func WithKafkaBrokers(brokers ...string) KafkaOption {
return func(kp *kafkaProvider) {
Expand Down

0 comments on commit 61e0b21

Please sign in to comment.