Replica Set Account

Overview

Use the Replica Set Account to connect to MongoDB replica sets for operations.

For more information on replication in MongoDB, see the Replication page in MongoDB documentation.

Note: To add an account for MongoDB Atlas, you must configure an account as either Replica Set or Replica Set Dynamic Account because MongoDB Atlas starts with a replica set of 3 nodes. Read more on connecting MongoDB Atlas via drivers.

Account Settings

Field Description
Label

Required. User provided label for the account instance.

Default value: [None]

Replica Set Configuration Use this field set to configure the replica set connection.
Hostname

Required. The MongoDB Hostname.

Default value: [None]

Port

Required. The MongoDB port.

Default value: [None]

Database name

Required. The database that the MongoDB account is defined in. This is also the default database used for queries.

Note: To validate a MongoDB Atlas account, enter the name as admin. Alternatively, to override the actual database name in the Database name property at the Snap settings level.

Default value: None

Username

Required. MongoDB Username.

Default value: [None]

Password

Required. The password associated with the MongoDB Username.

Default value: [None]

Authentication type

Required. The authentication type that you want to use with this account. The options available are:

  • Default: No authentication

    Note: To validate a MongoDB Atlas account, select Default.
  • LDAP: Username/password retrieved from the configured LDAP server. LDAP Proxy Authentication

    Note: You must configure the MongoDB server to access the LDAP authentication mechanism. Click here to know more about configuring the service.
  • Plain: The username and password combination provided by your administrator.
  • X.509 (Digital Certificates): Issued by a certificate authority; or self-signed. See Using X.509 Digital Certificates.

Default value: Default

Encryption type

Required. The encryption type for connecting Mongo instance. The options available are None, TLS/SSL and SSL certs.

  • If None is selected, data is not encrypted.
  • If TLS/SSL is selected, data is encrypted without certificate validation.
  • If SSL certs is Selected, the data is encrypted ensuring the certificate validation.
Note: To validate a MongoDB Atlas account, select TLS/SSL.

Default value: None

SSL certs properties Use this field set to configure the SSL certificate properties.
Truststore filepath

Conditional. The location of the trust store file in PKCS#12 format, can be in SLDB or any other unauthenticated endpoint such as https://...

Example: shared/cacert_keystore.p12

Default value: [None]

Truststore password

Truststore password to access the truststore file of the server.

Keystore filepath

The location of the key store file in PKCS#12 format, can be in SLDB or any other unauthenticated endpoint such as https://...

Example: shared/client_keystore.p12

Default value: [None]

Keystore file password

Keystore password to access the keystore file of the client.

Connection properties Use this field set to confiugre connection properties.
Connection timeout (seconds)

The number of seconds the Mongo driver waits before aborting a new connection attempt.

For example, if you set the Connection timeout limit to 30 seconds, and the Snap fails to establish a connection in 30 seconds, the pipeline logs a timeout exception and aborts execution.

Note: A value of 0 seconds specifies an infinite timeout.

Default value: 10

Server Selection timeout (seconds)

The number of seconds the Mongo driver waits to select a server for an operation before aborting the selection.

For example, if you set the Server Selection timeout to 30 seconds, and the Snap fails to find a server until 30 seconds, the pipeline logs an error and aborts execution.

Note: A value of 0 seconds specifies an infinite timeout.

Default value: 30

MongoDB cursor properties Use this field set to configure the MongoDB cursor properties.
Use cursor timeout

Select this checkbox to set a timeout for idle cursors, which means, it enables the server to close a cursor automatically after a period of inactivity.

This option allows you to connect to Atlas Free Tier database and Shared Clusters using the MongoDB accounts. Refer to Atlas Free Tier limitations for more information.

Note: For all the existing Mongo DB accounts, the Use Cursor Timeout check box is deselected by default.

Default value: Not Selected

Read preference

Choose an option to define read preference options when querying data. Available options are:

  • Primary
  • Primary preferred
  • Secondary
  • Secondary preferred
  • Nearest

Default value: Primary