MongoDB
Available when using an authoring Data Collector version 4.1.0 or later.
To create a MongoDB connection, one of the MongoDB stage libraries,
streamsets-datacollector-mongodb_<version>-lib
, must be
installed on the selected authoring Data Collector.
For a description of the MongoDB connection properties, see MongoDB Connection Properties.
Engine | Stages |
---|---|
Data Collector 4.1.0 or later |
|
Credentials
Based on the authentication used by the MongoDB server, configure the origin to use no authentication, username/password authentication, or LDAP authentication. When using username/password authentication, you can also use delegated authentication. When using LDAP authentication, you can use server-driven authentication or plain authentication.
By default, the connection uses no authentication.
- Connection string
- Enter credentials in the connection string on the MongoDB tab.
- Credentials tab
- Select either the Username/Password or LDAP authentication type on the Credentials tab. When using LDAP authentication, you also choose between server-driven or plain authentication.
Enabling SSL/TLS
- On the Advanced tab for the stage, select the SSL Enabled property.
-
If the MongoDB certificate is signed by a private CA or not
trusted by the default Java truststore, create a custom truststore file or
modify a copy of the default Java truststore file to add the CA to the file.
Then configure Data Collector
to use the modified truststore file.
By default, Data Collector uses the Java truststore file located in $JAVA_HOME/jre/lib/security/cacerts. If your certificate is signed by a CA that is included in the default Java truststore file, you do not need to create a truststore file and can skip this step.
In these steps, we show how to modify the default truststore file to add an additional CA to the list of trusted CAs. If you prefer to create a custom truststore file, see the keytool documentation.
MongoDB Connection Properties
MongoDB Property | Description |
---|---|
Connection | Connection string for the MongoDB
instance. Use the following
format: If the MongoDB server uses
username/password or LDAP authentication, you can include
the credentials in the connection string, as described
in
Credentials. When
connecting to a cluster, enter additional node information to
ensure a connection. |
Authentication Property | Description |
---|---|
Authentication Type | Authentication used by the MongoDB server: Username/Password or LDAP. |
Authentication Mechanism | LDAP authentication method: server-driven or plain authentication. |
Username | MongoDB or LDAP user name. |
Password | MongoDB or LDAP password. Tip: To secure sensitive
information, you can use credential stores or runtime resources.
|
Authentication Source | An optional alternate database name to perform delegated
authentication. Available for the Username/Password option. |
Advanced Property | Description |
---|---|
SSL Enabled | Enables SSL/TLS. If the MongoDB certificate is signed by a private CA or not trusted by the default Java truststore, you also must define the truststore file and password in Java configuration options in the deployment, as described in Enabling SSL/TLS. |
SSL Invalid Host Name Allowed | Specifies whether invalid host names are allowed in SSL/TLS certificates. |