awslabs / kinesis-kafka-connector

kinesis-kafka-connector is connector based on Kafka Connect to publish messages to Amazon Kinesis streams or Amazon Kinesis Firehose.
Apache License 2.0
153 stars 91 forks source link

SSL connection to broker #51

Open atulrenapurkar opened 3 years ago

atulrenapurkar commented 3 years ago

Hi

I am trying to connect the Kafka broker by using ssl. I added the below properties in worker-connect-distributed.properties

security.providers=SSL security.protocol=SSL ssl.truststore.location=path/to/truststore.jks ssl.truststore.password=truststore.password ssl.keystore.location=path/to/keystore.jks ssl.keystore.password=keystore.password ssl.key.password=key.password

ssl.client.auth=required security.inter.broker.protocol=SSL ssl.endpoint.identification.algorithm= ssl.enabled.protocols=TLSv1.2,TLSv1.1,TLSv1 ssl.keystore.type=JKS ssl.truststore.type=JKS ssl.secure.random.implementation=SHA1PRNG

When I am checking logs in Kafka broker, below is an INFO

[2020-12-11 07:57:41,960] INFO [SocketServer brokerId=1001] Failed authentication with /kafka-connect-ip (SSL handshake failed) (org.apache.kafka.common.network.Selector)

Below Warning in connect [2020-12-11 08:02:27,890] WARN [Consumer clientId=name-Put-0, groupId=connect-name-Put] Bootstrap broker kafka-broker:9093 (id: -2 rack: null) disconnected (org.apache.kafka.clients.NetworkClient:1033)

Unfortunately, messages are not reaching AWS. On another hand when I am sending messages without SSL, messages are flowing.

Certs are correct, as I am able to connect the Kafka broker by using the spring-boot application from connect server using the same certs.