MongoDB V2 Connector > Connections for MongoDB V2 > Prepare for authentication
  

Prepare for authentication

You can configure username and password, X.509, and LDAP authentication types to access MongoDB.
Before you configure the connection properties, ensure that you have a MongoDB user account with admin privileges. You also need to copy the host name of the primary node in MongoDB and keep the authentication details handy based on the authentication type that you want to use.

Username and password

To connect to MongoDB using username and password authentication, you need the MongoDB account user name, password, and database name.
Get the required details from your MongoDB account to which you want to connect.
For more information about username and password authentication in MongoDB, see Authenticate a user with self-managed deployments.

X.509

To connect to MongoDB using X.509 authentication, you need the SSL keystore file, SSL keystore file password, and database name.
Get the required details from your MongoDB account to which you want to connect.
For more information about X.509 authentication in MongoDB, see X.509 certificate.

LDAP

To connect to MongoDB using LDAP authentication, you need the MongoDB account user name, password, and database name.
Before you use LDAP authentication, complete the following tasks:
  1. 1Log in to your MongoDB Atlas account.
  2. 2Configure the LDAP server that you want to use.
  3. 3Create the LDAP integration with the authentication domain, server URL and credentials.
For more information about LDAP authentication in MongoDB, see LDAP authorization on self-managed deployments.
Note: You can't use connections configured with the LDAP authentication in mappings configured in advanced mode.