mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-09 15:38:03 -05:00
refactor(mongodb-credentials): streamline SSL configuration and update documentation references
This commit is contained in:
@@ -81,13 +81,9 @@ export const mongodbCredentialsRotationFactory: TRotationFactory<
|
|||||||
directConnection: !isSrv
|
directConnection: !isSrv
|
||||||
};
|
};
|
||||||
|
|
||||||
// SSL is enabled if explicitly enabled OR if using SRV (which requires TLS) and requireTlsForSrv is true
|
if (connection.credentials.sslCertificate) {
|
||||||
if (connection.credentials.sslEnabled) {
|
|
||||||
clientOptions.tls = true;
|
clientOptions.tls = true;
|
||||||
clientOptions.tlsInsecure = !connection.credentials.sslRejectUnauthorized;
|
clientOptions.ca = connection.credentials.sslCertificate;
|
||||||
if (connection.credentials.sslCertificate) {
|
|
||||||
clientOptions.ca = connection.credentials.sslCertificate;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const client = new MongoClient(uri, clientOptions);
|
const client = new MongoClient(uri, clientOptions);
|
||||||
|
|||||||
@@ -445,9 +445,9 @@
|
|||||||
"documentation/platform/secret-rotation/aws-iam-user-secret",
|
"documentation/platform/secret-rotation/aws-iam-user-secret",
|
||||||
"documentation/platform/secret-rotation/azure-client-secret",
|
"documentation/platform/secret-rotation/azure-client-secret",
|
||||||
"documentation/platform/secret-rotation/ldap-password",
|
"documentation/platform/secret-rotation/ldap-password",
|
||||||
|
"documentation/platform/secret-rotation/mongodb-credentials",
|
||||||
"documentation/platform/secret-rotation/mssql-credentials",
|
"documentation/platform/secret-rotation/mssql-credentials",
|
||||||
"documentation/platform/secret-rotation/mysql-credentials",
|
"documentation/platform/secret-rotation/mysql-credentials",
|
||||||
"documentation/platform/secret-rotation/mongodb-credentials",
|
|
||||||
"documentation/platform/secret-rotation/okta-client-secret",
|
"documentation/platform/secret-rotation/okta-client-secret",
|
||||||
"documentation/platform/secret-rotation/oracledb-credentials",
|
"documentation/platform/secret-rotation/oracledb-credentials",
|
||||||
"documentation/platform/secret-rotation/postgres-credentials",
|
"documentation/platform/secret-rotation/postgres-credentials",
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ description: "Learn how to automatically rotate MongoDB credentials."
|
|||||||
},
|
},
|
||||||
"isAutoRotationEnabled": true,
|
"isAutoRotationEnabled": true,
|
||||||
"activeIndex": 0,
|
"activeIndex": 0,
|
||||||
"folderId": ""b3257e1f-8d32-4e86-8bfd-b1f1bc1bf2c3"",
|
"folderId": "b3257e1f-8d32-4e86-8bfd-b1f1bc1bf2c3",
|
||||||
"connectionId": "11c76f38-cd13-4137-b1a3-ecd6a429952c",
|
"connectionId": "11c76f38-cd13-4137-b1a3-ecd6a429952c",
|
||||||
"createdAt": "2023-11-07T05:31:56Z",
|
"createdAt": "2023-11-07T05:31:56Z",
|
||||||
"updatedAt": "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",
|
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||||
"folder": {
|
"folder": {
|
||||||
"id": ""b3257e1f-8d32-4e86-8bfd-b1f1bc1bf2c3"",
|
"id": "b3257e1f-8d32-4e86-8bfd-b1f1bc1bf2c3",
|
||||||
"path": "/"
|
"path": "/"
|
||||||
},
|
},
|
||||||
"rotateAtUtc": {
|
"rotateAtUtc": {
|
||||||
|
|||||||
Reference in New Issue
Block a user