Hi - We are trying to connect to a MongoDB database that is hosted on DigitalOcean. DigitalOcean requires an SSL certificate to connect to the DB. How do we include an SSL in our request?
Hey @The_Leading_Practice ,
Welcome to the community
I took a quick look at the MongoDB node, and it looks like it doesn’t support passing SSL certificates at the moment. @RicardoE105 , is there another approach to achieve this?
I do not think there is a way around that. It seems like we need to expose the parameter tlsCAFile
in the credentials.
* @see https://docs.mongodb.com/manual/reference/connection-string
*/
export interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeConnectionOptions {
/** Specifies the name of the replica set, if the mongod is a member of a replica set. */
replicaSet?: string;
/** Enables or disables TLS/SSL for the connection. */
tls?: boolean;
/** A boolean to enable or disables TLS/SSL for the connection. (The ssl option is equivalent to the tls option.) */
ssl?: boolean;
/** Specifies the location of a local TLS Certificate */
tlsCertificateFile?: string;
/** Specifies the location of a local .pem file that contains either the client’s TLS/SSL certificate or the client’s TLS/SSL certificate and key. */
tlsCertificateKeyFile?: string;
/** Specifies the password to de-crypt the tlsCertificateKeyFile. */
tlsCertificateKeyFilePassword?: string;
/** Specifies the location of a local .pem file that contains the root certificate chain from the Certificate Authority. This file is used to validate the certificate presented by the mongod/mongos instance. */
tlsCAFile?: string;
/** Bypasses validation of the certificates presented by the mongod/mongos instance */
tlsAllowInvalidCertificates?: boolean;
/** Disables hostname validation of the certificate presented by the mongod/mongos instance. */
tlsAllowInvalidHostnames?: boolean;