We want to know what connection string parameter should be updated in the application server to enable ssl

When trying to connect from our node.js web application server to mongodb, we use a single line connection string. Which looks like below:

“mongodb://{userid}:{password}@mongodb1:27017,mongodb2:27017,mongodb3:27017/xxx-tenant-master?replicaSet=mongors&authSource=admin”

This does not connect from the application but have no issues connecting from mongo-cli terminal

Above line can be used to connect to mongo replicaset with mongo-cli. and you will run it as below in terminal:

mongo mongodb://{userid}:{password}@mongodb1:27017,mongodb2:27017,mongodb3:27017/xxx-tenant-master?replicaSet=mongors&authSource=admin

Hello @Rekha_Jadala ,

Can I confirm that you’re trying to enable TLS/SSL in your deployment?
It should be enabled on the server side and is not activated through a connection string.

I would recommend you to go through below documentation for more clarification:

Also, to create some test certificates, please check below links:

Note these certificates are for testing purpose only and for production deployments it’s best to obtain them from a reputable vendor.

Regards,
Tarun

1 Like