nats-io / nats-kafka

NATS to Kafka Bridging
Apache License 2.0
131 stars 32 forks source link

Fix TLS config for SASL #27

Closed variadico closed 3 years ago

variadico commented 3 years ago

Currently, we don't honor the InsecureSkipVerify parameter. This causes connection problems when connecting to Azure.

This change adds TLS config for InsecureSkipVerify when using SASL.

Resolves #26

variadico commented 3 years ago

I tested on Azure with this config.

connect: [
  {
    id: "test"
    type: "NATSToKafka"

    subject: "test"

    brokers: ["test.servicebus.windows.net:9093"]
    topic: "test"
    sasl: {
      user: "$ConnectionString"
      password: "Endpoint=testtesttest"
      insecureskipverify: true
    }
  }
]

nats-kafka -c my.conf

Everything seemed to work now. I also verified that it didn't work before.