-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 SASL/PLAIN authentication via SCRAM-SHA-256 or SCRAM-SHA-512 mechanism #2724
Add support for Kafka SASL/PLAIN authentication via SCRAM-SHA-256 or SCRAM-SHA-512 mechanism #2724
Conversation
…CRAM-SHA-512 mechanism Signed-off-by: WalkerWang731 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2724 +/- ##
==========================================
+ Coverage 95.73% 95.76% +0.03%
==========================================
Files 217 217
Lines 9619 9619
==========================================
+ Hits 9209 9212 +3
+ Misses 337 336 -1
+ Partials 73 71 -2
Continue to review full report at Codecov.
|
…nt on factory_test.go Signed-off-by: WalkerWang731 <[email protected]>
pkg/kafka/auth/plaintext.go
Outdated
// PlainTextConfig describes the configuration properties needed for SASL/PLAIN with kafka | ||
type PlainTextConfig struct { | ||
UserName string `mapstructure:"username"` | ||
Password string `mapstructure:"password" json:"-"` | ||
UserName string `mapstructure:"username"` |
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.
UserName string `mapstructure:"username"` | |
Username string `mapstructure:"username"` |
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.
ok, I will update later.
Signed-off-by: WalkerWang731 <[email protected]>
Signed-off-by: WalkerWang731 <[email protected]>
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.
LGTM
…SCRAM-SHA-512 mechanism (jaegertracing#2724) * add that suppot Kafka SASL/PLAIN authentication of SCRAM-SHA-256 or SCRAM-SHA-512 mechanism Signed-off-by: WalkerWang731 <[email protected]> * rename XDGSCRAMClient to scramClient and remove paramater that no point on factory_test.go Signed-off-by: WalkerWang731 <[email protected]> * add type assertion Signed-off-by: WalkerWang731 <[email protected]> * replacement UserName to Username Signed-off-by: WalkerWang731 <[email protected]>
@WalkerWang731 and all others: Thanks a lot for all about SCRAM. Linked to: |
Which problem is this PR solving?
Short description of the changes
pkg/kafka/auth/plaintext.go
,pkg/kafka/auth/options.go
andpkg/kafka/auth/config.go
, and not add any new file.mechanism
(reference from Kafka parameter name rules )plaintext
better thanscarm
, because these are both belong toSASL
, in the future, it can change tosasl
if needed. Actually, usingplaintext
is ok, it will not be confusing, because it name isSASL_PLAINTEXT
that from Kafka official security protocol parameter namemechanism
, I followed Kafka name rules (SCRAM-SHA-256
,SCRAM-SHA-512
,PLAIN
)plaintext
mechanism, and add to default. If users do not specify the mechanism, it not affect continued use. if users use the mechanism then just only add--kafka.ROLE.plaintext.mechanism
parameter then can use it.Changelog
Add that support Kafka SASL/PLAIN authentication of SCRAM-SHA-256 or SCRAM-SHA-512 mechanism
Parameter config of collector (
SPAN_STORAGE_TYPE=kafka
)Parameter config of ingester