I am running 3 node kafka cluster which is secured through SSl encryption. Now I am trying to use kafka-connect to build a data pipeline to connect to any source DB (mongoDB, Cassandra). As part of this process, first I tried to integrate kafka connect to kafka broker using below configurations for connect-distributed.properties file-
bootstrap.servers=167.67.45.142:30056
group.id=connect-cluster
key.converter=org.apache.kafka.connect.json.JsonConverter
value.converter=org.apache.kafka.connect.json.JsonConverter
key.converter.schemas.enable=true
value.converter.schemas.enable=true
offset.storage.topic=connect-offsets
offset.storage.replication.factor=3
offset.storage.partitions=3
config.storage.topic=connect-configs
config.storage.replication.factor=3
config.storage.partitions=3
status.storage.topic=connect-statuses
status.storage.replication.factor=3
status.storage.partitions=3
offset.flush.interval.ms=10000
rest.host.name=connectcluster-0
rest.port=8083
security.protocol=ssl
ssl.trustore.location=/tmp/kafka.truststore.jks
ssl.truststore.password=password
producer.security.protocol=SSL
producer.ssl.truststore.location=/tmp/kafka.truststore.jks
producer.ssl.truststore.password=password
consumer.security.protocol=SSL
comumer.ssl.truststore.location=/tmp/kafka.truststore.jks
consumer.ssl.truststore.password=password
ssl.endpoint.identification.algorithm=
plugin.path=/var/lib/plugin-connectors/
With above configurations parameters, I started connect service and it is working fine.
As part of the next step to secure connect cluster with SSL, have add further configuration changes in connect-distributed.properties file, given below:-
listeners=https://connectcluster-0:8443
rest.advertised.listener=https
rest.advertised.host.name=connectcluster-0
rest.advertised.port=8083
ssl.keystore.location=/tmp/kafka.keystore.jks
ssl.keystore.password=password
ssl.key.password=password
I was following this confluent blog for kafka connect in section - Encryption with SSL.
https://www.docs.confluent.io/platform/current/kafka/encryption#encryption-ssl-connect
After, then when I have started kafka connect process, it started successfully.
When I am trying to acess connect rest service through - curl https://connectcluster-0:8443/
I am getting curl: (60) SSL certificate problem: self signed certificate in certificate chain...
Also tried to pass certs in curl - curl --cacert client.cer.pem https://connectcluster-0:8443/
Getting curl: (50) SSL: no alternative certificate subject name matches target hostname 'connectcluster-0'
Please let me know if I am missing something here in required kafka-connect configuration parameter
How I can secure my kafka-connect endpoint so that it can be accessible only from https:// protocols?