diff --git a/backend/src/ee/services/secret-rotation-v2/mongodb-credentials/mongodb-credentials-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/mongodb-credentials/mongodb-credentials-rotation-fns.ts index 688f90473..7bf487d56 100644 --- a/backend/src/ee/services/secret-rotation-v2/mongodb-credentials/mongodb-credentials-rotation-fns.ts +++ b/backend/src/ee/services/secret-rotation-v2/mongodb-credentials/mongodb-credentials-rotation-fns.ts @@ -81,13 +81,9 @@ export const mongodbCredentialsRotationFactory: TRotationFactory< directConnection: !isSrv }; - // SSL is enabled if explicitly enabled OR if using SRV (which requires TLS) and requireTlsForSrv is true - if (connection.credentials.sslEnabled) { + if (connection.credentials.sslCertificate) { clientOptions.tls = true; - clientOptions.tlsInsecure = !connection.credentials.sslRejectUnauthorized; - if (connection.credentials.sslCertificate) { - clientOptions.ca = connection.credentials.sslCertificate; - } + clientOptions.ca = connection.credentials.sslCertificate; } const client = new MongoClient(uri, clientOptions); diff --git a/docs/docs.json b/docs/docs.json index c59ad89b7..271ef8889 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -445,9 +445,9 @@ "documentation/platform/secret-rotation/aws-iam-user-secret", "documentation/platform/secret-rotation/azure-client-secret", "documentation/platform/secret-rotation/ldap-password", + "documentation/platform/secret-rotation/mongodb-credentials", "documentation/platform/secret-rotation/mssql-credentials", "documentation/platform/secret-rotation/mysql-credentials", - "documentation/platform/secret-rotation/mongodb-credentials", "documentation/platform/secret-rotation/okta-client-secret", "documentation/platform/secret-rotation/oracledb-credentials", "documentation/platform/secret-rotation/postgres-credentials", diff --git a/docs/documentation/platform/secret-rotation/mongodb-credentials.mdx b/docs/documentation/platform/secret-rotation/mongodb-credentials.mdx index d8815c70f..fefc23784 100644 --- a/docs/documentation/platform/secret-rotation/mongodb-credentials.mdx +++ b/docs/documentation/platform/secret-rotation/mongodb-credentials.mdx @@ -133,7 +133,7 @@ description: "Learn how to automatically rotate MongoDB credentials." }, "isAutoRotationEnabled": true, "activeIndex": 0, - "folderId": ""b3257e1f-8d32-4e86-8bfd-b1f1bc1bf2c3"", + "folderId": "b3257e1f-8d32-4e86-8bfd-b1f1bc1bf2c3", "connectionId": "11c76f38-cd13-4137-b1a3-ecd6a429952c", "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z", @@ -156,7 +156,7 @@ description: "Learn how to automatically rotate MongoDB credentials." }, "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "folder": { - "id": ""b3257e1f-8d32-4e86-8bfd-b1f1bc1bf2c3"", + "id": "b3257e1f-8d32-4e86-8bfd-b1f1bc1bf2c3", "path": "/" }, "rotateAtUtc": {