-
Notifications
You must be signed in to change notification settings - Fork 187
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
Add support for kafka auth using SASL with PLAIN mechanism #412
Add support for kafka auth using SASL with PLAIN mechanism #412
Conversation
8457c2d
to
73529b7
Compare
Codecov Report
@@ Coverage Diff @@
## master #412 +/- ##
==========================================
- Coverage 81.90% 81.75% -0.16%
==========================================
Files 27 27
Lines 1603 1611 +8
==========================================
+ Hits 1313 1317 +4
- Misses 211 214 +3
- Partials 79 80 +1
Continue to review full report at Codecov.
|
73529b7
to
59a26a1
Compare
pkg/config/env.go
Outdated
RecorderKafkaUsername string `env:"FLAGR_RECORDER_KAFKA_USERNAME" envDefault:""` | ||
RecorderKafkaPassword string `env:"FLAGR_RECORDER_KAFKA_PASSWORD" envDefault:""` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can add a comment that FLAGR_RECORDER_KAFKA_USERNAME and FLAGR_RECORDER_KAFKA_PASSWORD will only work if FLAGR_RECORDER_KAFKA_SIMPLE_SSL=true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add something to the docs or the comment is enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there, according to confluent docs you can also use SASL with PLAINTEXT which does not require SSL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add something to the docs or the comment is enough?
The doc directly shows the content of this env.go file, so the comment here is good enough.
Also the naming of the env, what do you think of FLAGR_RECORDER_KAFKA_SASL_USERNAME
and FLAGR_RECORDER_KAFKA_SASL_PASSWORD
? Just to make it clear that it's using SASL
59a26a1
to
9b9cc23
Compare
I've just rebased the code to force the tests to run as one of them got cancelled. |
pkg/config/env.go
Outdated
RecorderKafkaUsername string `env:"FLAGR_RECORDER_KAFKA_USERNAME" envDefault:""` | ||
RecorderKafkaPassword string `env:"FLAGR_RECORDER_KAFKA_PASSWORD" envDefault:""` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add something to the docs or the comment is enough?
The doc directly shows the content of this env.go file, so the comment here is good enough.
Also the naming of the env, what do you think of FLAGR_RECORDER_KAFKA_SASL_USERNAME
and FLAGR_RECORDER_KAFKA_SASL_PASSWORD
? Just to make it clear that it's using SASL
@zhouzhuojie ready for review again. |
Description
This adds variables for authentication and enabling simple ssl without specifying certificates and others
Motivation and Context
This should enable to use kafka with providers like confluent which uses sasl_plain over ssl.
How Has This Been Tested?
I've tested it against our cluster which requires authentication with and ssl
Types of changes
Checklist: