grepplabs / kafka-proxy

Proxy connections to Kafka cluster. Connect through SOCKS Proxy, HTTP Proxy or to cluster running in Kubernetes.
Apache License 2.0
488 stars 83 forks source link

Unable to connect with Kafka Cluster while kafka-topics.sh can using security.protocol=SSL #98

Closed fr33m0nk closed 2 years ago

fr33m0nk commented 2 years ago

Hi,

I was trying to use Kafka-proxy for AWS MSK. I was running Kafka-proxy from a EC2 deployed in the same VPC as that of AWS MSK. AWS MSK has Unauthenticated access enabled and following auth schemes disabled:

I can connect to AWS MSK via kafka-topics.sh using security.protocol=SSL from EC2. AWS MSK has Kafka brokers that can be connected only on port 9094. I have tried --tls-enable and --tls-insecure-skip-verify but it didn't work. It would be great if a little guidance is provided.

fr33m0nk commented 2 years ago

I managed to get around and solve this. For a AWS MSK configuration like below, a self signed certificate needs to be generated: AWS MSK has Unauthenticated access enabled and following auth schemes disabled:

Using the self signed certificate, Kafka-proxy started blazing :)

Huge shoutout to the contributors for the amazing work!!