Skip to content

how to use PLAIN authentication to connect the kafka cluster in confluent.cloud ? #908

Answered by xiaoronglv
xiaoronglv asked this question in Q&A
Discussion options

You must be logged in to vote

update: I have checked their source code of cli tool. the solution is quiet simple.

https://github.com/confluentinc/examples/blob/66d7507d39fd64031a49cec97dac82a45a895c61/clients/cloud/ruby/c_cloud.rb#L41

kafka = Kafka.new(
  ["kafka1:9092"],
  ssl_ca_certs_from_system: true, # this is the key line.
  sasl_plain_username: 'username',
  sasl_plain_password: 'password'
  # ...
)

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by xiaoronglv
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants