-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Feature: mongodb secret rotation #4889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Introduced MongoDB connection router and schemas. - Updated app connection enums and maps to include MongoDB. - Implemented validation and connection functions for MongoDB. - Enhanced app connection service to handle MongoDB credentials.
- Implemented MongoDB connection form with validation and credential handling. - Updated enums and maps to include MongoDB support across backend and frontend. - Enhanced app connection schemas to accommodate MongoDB connection options. - Integrated MongoDB connection handling in relevant components and hooks.
- Enhanced MongoDB connection handling in backend with improved host validation. - Updated documentation to include MongoDB connection options and API references. - Added new images for MongoDB connection forms and processes. - Implemented MongoDB connection form in the frontend with necessary adjustments.
- Introduced MongoDB credentials rotation router and schemas. - Updated backend services to handle MongoDB credentials rotation logic. - Enhanced frontend components to support MongoDB credentials management. - Integrated MongoDB credentials rotation into existing secret rotation options and forms.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Greptile Summary
Confidence Score: 3/5
Important Files Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
50 files reviewed, 2 comments
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
backend/src/services/app-connection/mongodb/mongodb-connection-fns.ts
Outdated
Show resolved
Hide resolved
...d/src/ee/services/secret-rotation-v2/mongodb-credentials/mongodb-credentials-rotation-fns.ts
Outdated
Show resolved
Hide resolved
- Replaced string methods with RE2 regex for improved host validation in MongoDB connection functions. - Updated the `mongodbCredentialsRotationFactory` and `validateMongoDBConnectionCredentials` to utilize regex for parsing connection strings. - Enhanced code readability and maintainability by consolidating host normalization logic.
- Created comprehensive documentation for MongoDB credentials rotation, detailing setup and usage. - Added new images to illustrate the MongoDB credentials rotation process in the UI. - Updated existing documentation to include MongoDB in the secret rotation options and API references.
scott-ray-wilson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good overall! few nits and comments
| "documentation/platform/secret-rotation/ldap-password", | ||
| "documentation/platform/secret-rotation/mssql-credentials", | ||
| "documentation/platform/secret-rotation/mysql-credentials", | ||
| "documentation/platform/secret-rotation/mongodb-credentials", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: bump above mysql for alpha sorting
| "environment": { | ||
| "slug": "dev", | ||
| "name": "Development", | ||
| "id": ""170a40f1-1b48-4cc7-addf-e563aa9fbe37" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: double quotes in front of uuid ""170...
| }, | ||
| "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", | ||
| "folder": { | ||
| "id": ""b3257e1f-8d32-4e86-8bfd-b1f1bc1bf2c3"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here double wrapped quotes
|
|
||
| let client: MongoClient | null = null; | ||
| try { | ||
| client = await $getClient(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for both issue and revoke I think we want to use a mongodb session (transaction) - that way if either command fails neither commits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Description 📣
Add Mongodb app connection and secret rotation to Infisical with their respective documentation.
Type ✨
Tests 🛠️