I have a three nodes replicaSet configured with tls encryption
I configured my PBM_MONGODB_URI as follow:
PBM_MONGODB_URI="mongodb://pbmuser:PASSWORD@mongodb1:27017,mongodb2:27017,mongodb3:27017/?replicaSet=rs0&tls=true&tlsCertificateKeyFile=/certificate/client.pem&tlsCAFile=/certificate/mongoca.pem&tlsAllowInvalidCertificates=true&tlsAllowInvalidHostnames=true"
As soon as I try to configure the PBM I receive an error
connection rejected"},"remote":"10.0.0.4:52344","connectionId":217}}
{"t":{"$date":"2021-02-17T13:13:49.393+00:00"},"s":"I", "c":"NETWORK", "id":22944, "ctx":"conn217","msg":"Connection ended","attr":{"remote":"10.0.0.4:52344","connectionId":217,"connectionCount":12}}
{"t":{"$date":"2021-02-17T13:13:49.893+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"Connection accepted","attr":{"remote":"10.0.0.4:52350","connectionId":218,"connectionCount":13}}
{"t":{"$date":"2021-02-17T13:13:49.901+00:00"},"s":"E", "c":"NETWORK", "id":23255, "ctx":"conn218","msg":"No SSL certificate provided by peer; connection rejected"}
{"t":{"$date":"2021-02-17T13:13:49.901+00:00"},"s":"I", "c":"NETWORK", "id":22988, "ctx":"conn218","msg":"Error receiving request from client. Ending connection from remote","attr":{"error":{"code":141,"codeName":"SSLHandshakeFailed","errmsg":"no SSL certificate provided by peer; connection rejected"},"remote":"10.0.0.4:52350","connectionId":218}}
If I try to connect to the DB with the client the following uri is working:
mongo "mongodb://mongodb1:27017,mongodb2:27017,mongodb3:27017/?replicaSet=rs0" --tls --tlsCAFile /certificate/mongoca.pem --tlsCertificateKeyFile /certificate/client.pem --username "pbmuser" -p
and
mongo "mongodb://mongodb1:27017,mongodb2:27017,mongodb3:27017/?replicaSet=rs0&tls=true&tlsCertificateKeyFile=/certificate/client.pem&tlsCAFile=/certificate/mongoca.pem&tlsAllowInvalidCertificates=true&tlsAllowInvalidHostnames=true" -u pbmuser -p
has the same issue as the pbm command.
Any Idea?