I have a python script that I will share with other persons to consume messages from a Kafka service, I dont have experience with security but I have a doubt before assume things. My kafka broker is hosted in DigitalOcean cloud, they provide few certificates and one of them is used to connect via SSL, this is a ca.crt file (self-signed CA root certificate), I have to provide my python script to other people to connect to that Kafka service to consume messages but I’m concerned if is possible to share this ca.crt certificate without any risk, I’m not familiar with security hence I’m worried about this.
As me I think that others could have this doubt and could help as reference.
If the peer needs your CA certificate (ca.crt) to verify that it connected to your server then it is safe to share the certificate, no matter if self-signed or not.
It is not safe to share the private key for the certificate though. This key is used to prove ownership of the certificate and in case of CA certificates to issue other certificates. This private key should never be shared because otherwise others would be able to prove that they own your certificate, i.e. impersonate you. And in case of CA certificates they could issue new certificates in your name.