MongoDB Dynamic Account
Overview
The Dynamic Account allows you to pass account details dynamically as pipeline parameters. This enables you to use the same Snap within a pipeline to connect to different database instances.
Account Settings
| Field | Description |
|---|---|
| Label |
Required. User provided label for the account instance. Default value: [None] |
| Use SRV hostname |
Select this checkbox to enable SRV connection via the hostname. Default state: Deselected |
| Hostname |
Required. Specify the MongoDB hostname. Default value: [None] Example: ac-xyz80-shared-00-03.abc82h8.mongodb.net |
| Port |
Required. Specify the MongoDB port. Note: Port number is optional if you select the Use SRV hostname checkbox.
Default value: [None] Example: 27017 |
| MongoDB JARs | Use this field set to configure the MongoDB JARs. |
| MongoDB JARs |
Specify or upload the MongoDB JAR file. Default value: [None] Example: mongodb-driver-sync-4.11.0.jar |
| Database name |
The database that the MongoDB account is defined in. This is also the default database used for queries. Note: Ensure to provide the database name when selecting the TLS/SSL option in the Encryption type property.
Default value: [None] |
| Username |
Required. MongoDB Username. Enable the expression property to use a pipeline parameter. Default value: [None] |
| Password |
Required. The password associated with the MongoDB Username. Enable the expression property to use a pipeline parameter. Default value: [None] |
| Authentication type |
Required. The authentication type that you want to use with this account. The options available are:
Default value: Default |
| Encryption type |
Required. The encryption type for connecting Mongo instance. The options available are None, TLS/SSL and SSL certs.
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 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 |
Account Encryption
| Encryption Type | Description |
|---|---|
| Standard Encryption | If you are using Standard Encryption, the High sensitivity settings under Enhanced Encryption are followed. |
| Enhanced Encryption |
If you have the Enhanced Account Encryption feature, the following describes which fields are encrypted for each sensitivity level selected per each account. Account:
|
Troubleshooting
| Error | Reason | Resolution |
|---|---|---|
| Failed to validate account: "cannot connect", "timeout", or "connection refused". | Invalid hostname. | Provide a valid host name. |
| Failed to validate account: Port is required for hostname creation. | The port name is required to connect to the host. | Provide a port number to use the service hostname. |
| Password is incorrect. | Invalid password. | Provide a valid password. |