Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

Connecting Over SSL

Luke Lovett edited this page Dec 3, 2015 · 2 revisions

This page covers how to configure the MongoDB Hadoop Connector to connect to MongoDB over SSL.

Turning SSL On

To turn on SSL, just set the ssl option in the connection string. This will be set in mongo.input.uri/mongo.auth.uri like this:

mongodb://hostname:port/database.collection?ssl=true

Validating Certificates

To validate the server's certificate, you may need to configure a few JVM system properties. Instructions for how to con figure the JVM can be found in the MongoDB Java Driver Reference. These options should be passed in the HADOOP_OPTS environment variable on each node where the connector is running. Additionally, each node in the cluster will need to have a trust store, as mentioned in the driver reference:

$ export HADOOP_OPTS='-Djavax.net.ssl.trustStore=/path/to/trust/store -Djavax.net.ssl.trustStorePassword=password'
$ # start/restart Hadoop service
Clone this wiki locally