MongoDB V2 Connector > Connections for MongoDB V2 > Connect to MongoDB
  

Connect to MongoDB

Let's configure the MongoDB V2 connection properties to connect to MongoDB.

Before you begin

Before you get started, you'll need to get the relevant configuration details from your MongoDB account based on the authentication type that you want to configure.
Check out Prepare for authentication to learn more about the authentication prerequisites.

Connection details

The following table describes the basic connection properties:
Property
Description
Connection Name
Name of the connection.
Each connection name must be unique within the organization. Connection names can contain alphanumeric characters, spaces, and the following special characters: _ . + -,
Maximum length is 255 characters.
Description
Description of the connection. Maximum length is 4000 characters.
Use Secret Vault
Stores sensitive credentials for this connection in the secrets manager that is configured for your organization.
This property appears only if secrets manager is set up for your organization.
When you enable the secret vault in the connection, you can select the credentials that the Secure Agent retrieves from the secrets manager. If you don't enable this option, the credentials are stored in the repository or on a local Secure Agent, depending on how your organization is configured.
Note:
If you’re using this connection to apply data access policies through pushdown or proxy services, you cannot use the Secret Vault configuration option.
For information about how to configure and use a secrets manager, see Secrets manager configuration.
Runtime Environment
The name of the runtime environment where you want to run tasks.
Select a Secure Agent, serverless, or elastic runtime environment.
For more information about runtime environments, see Runtime environments.
Host
Node name or IP address of the primary shard in the MongoDB cluster.
If you use a serverless runtime environment with AWS PrivateLink, enter the direct node address.
For more information, see Private links to access MongoDB.
Service Record Lookup Enabled
Enables the connector to query the DNS and discover the available MongoDB servers in the MongoDB cluster. You can enable this option when the host name is associated with a DNS SRV record.
If you enable this option, the Secure Agent uses the required connection details from the DNS SRV record instead of the port number. Retain the default port number, 27017, to save the connection.
If you don't enable this option, manually specify the host name and port number of the MongoDB server.
Port
MongoDB server port number.
Default is 27017.

Authentication types

You can configure username and password, X.509 standard, and LDAP authentication types to access MongoDB.
Select the required authentication type and then configure the authentication-specific parameters.

Advanced settings

The following table describes the advanced connection properties:
Property
Description
Additional Properties
Optional properties that you can configure to read data from or write data to MongoDB.
For information about the additional properties that you can configure, see Additional connection properties.
To specify more than one property, separate the key-value pairs with an ampersand.
You can specify the properties in the following format:
propertyName1=<value1>&propertyName2=<value2>

Related links