Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow SASL handshake version to be influenced from config #292

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/kaf/kaf.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func getConfig() (saramaConfig *sarama.Config) {
saramaConfig.Net.SASL.User = cluster.SASL.Username
saramaConfig.Net.SASL.Password = cluster.SASL.Password
}
saramaConfig.Net.SASL.Version = cluster.SASL.Version
}
if cluster.TLS != nil && cluster.SecurityProtocol != "SASL_SSL" {
saramaConfig.Net.TLS.Enable = true
Expand Down
9 changes: 9 additions & 0 deletions examples/sasl_v1_handshake.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
clusters:
- name: test
brokers:
- localhost:9092
SASL:
mechanism: PLAIN
username: admin
password: mypasswordisnotsosimple
version: 1
1 change: 1 addition & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type SASL struct {
ClientSecret string `yaml:"clientSecret"`
TokenURL string `yaml:"tokenURL"`
Token string `yaml:"token"`
Version int16 `yaml:"version"`
}

type TLS struct {
Expand Down
Loading