I'm writing a NodeJS Kafka producer with KafkaJS and having trouble understanding how to get the required SSL certificates in order to connect to the Kafka using the SASL-SSL connection. In the KafkaJS documentation there is this configuration for SSL:
ssl: {
rejectUnauthorized: false,
ca: [fs.readFileSync('/my/custom/ca.crt', 'utf-8')],
key: fs.readFileSync('/my/custom/client-key.pem', 'utf-8'),
cert: fs.readFileSync('/my/custom/client-cert.pem', 'utf-8')
},
With which I have problem because I don't know how/what certificates I should provide to it.
Do I need to provide all three props (ca, key and cert) ?? If so how to obtain them? We have Kafka cluster configured like so Confluent Security Tutorial Do I have to decode keystore or something in order to obtain proper certs for my KafkaJS producer? I have a bare understanding of all of this.