Skip to main content
A MongoDB account stores the credentials for one MongoDB user. Members connect to the database through the Infisical CLI, and Infisical records every command they run.

Prerequisites

Create the account

1
Go to Privileged Access Management > Accounts and select Add Account.
2
Select the Folder and a MongoDB Account Template, then select Next.
3
Enter a Name and the connection details:
4
Enter the Username and Password of the MongoDB user, then select Create.

Connect

To open a session, follow Connect to an account. MongoDB accounts don’t support the browser, so use the CLI. Start the local proxy:
The proxy keeps running in that terminal and prints its port. In a second terminal, connect your MongoDB client, such as mongosh, to that port:
The proxy signs in for you, so the client doesn’t need a password.

Next steps

Sessions

Review and end the connections that people and agents make to your accounts.

Access requests

Require approval before a member can use a sensitive account.