mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
refactor(mongodb-credentials): remove TLS requirement from MongoDB client options and update documentation formatting
This commit is contained in:
@@ -47,7 +47,7 @@ export const mongodbCredentialsRotationFactory: TRotationFactory<
|
|||||||
// Helper function to create MongoDB client with given credentials
|
// Helper function to create MongoDB client with given credentials
|
||||||
const $createMongoClient = async (
|
const $createMongoClient = async (
|
||||||
authCredentials: { username: string; password: string },
|
authCredentials: { username: string; password: string },
|
||||||
options?: { validateConnection?: boolean; requireTlsForSrv?: boolean }
|
options?: { validateConnection?: boolean }
|
||||||
): Promise<MongoClient> => {
|
): Promise<MongoClient> => {
|
||||||
let normalizedHost = connection.credentials.host.trim();
|
let normalizedHost = connection.credentials.host.trim();
|
||||||
const srvRegex = new RE2("^mongodb\\+srv:\\/\\/");
|
const srvRegex = new RE2("^mongodb\\+srv:\\/\\/");
|
||||||
@@ -120,7 +120,7 @@ export const mongodbCredentialsRotationFactory: TRotationFactory<
|
|||||||
username: credentials.username,
|
username: credentials.username,
|
||||||
password: credentials.password
|
password: credentials.password
|
||||||
},
|
},
|
||||||
{ validateConnection: true, requireTlsForSrv: true }
|
{ validateConnection: true }
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(redactPasswords(error, [credentials]));
|
throw new Error(redactPasswords(error, [credentials]));
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ description: "Learn how to automatically rotate MongoDB credentials."
|
|||||||
"lastRotatedAt": "2023-11-07T05:31:56Z",
|
"lastRotatedAt": "2023-11-07T05:31:56Z",
|
||||||
"lastRotationJobId": null,
|
"lastRotationJobId": null,
|
||||||
"nextRotationAt": "2023-11-07T05:31:56Z",
|
"nextRotationAt": "2023-11-07T05:31:56Z",
|
||||||
"isLastRotationManual":true
|
"isLastRotationManual": true,
|
||||||
"connection": {
|
"connection": {
|
||||||
"app": "mongodb",
|
"app": "mongodb",
|
||||||
"name": "my-mongodb-connection",
|
"name": "my-mongodb-connection",
|
||||||
@@ -152,7 +152,7 @@ description: "Learn how to automatically rotate MongoDB credentials."
|
|||||||
"environment": {
|
"environment": {
|
||||||
"slug": "dev",
|
"slug": "dev",
|
||||||
"name": "Development",
|
"name": "Development",
|
||||||
"id": ""170a40f1-1b48-4cc7-addf-e563aa9fbe37"
|
"id": "170a40f1-1b48-4cc7-addf-e563aa9fbe37"
|
||||||
},
|
},
|
||||||
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||||
"folder": {
|
"folder": {
|
||||||
|
|||||||
Reference in New Issue
Block a user