Connecting to your MongoDB instance with a client certificate¶
Connect your MongoDB instance with a client certificate¶
Complete the following steps to securely connect to your MongoDB instance with a client certificate:
Create a database.
Create a user without a password.
Generate a Certificate Signing Request (CSR).
Locate your Connection string.
Download your Certificate Authority (CA) file.
Connect with MongoDB.
Create a database¶
Use the following steps to create a database.
Log in to Mission Control.
Select your instance.
Select View more details
Select the Database tab from the instance Details screen.
Enter a name for your database and select the checkmark.
Create a user¶
Use the following steps to create a new user.
Log in to Mission Control.
Select your instance.
Select View more details
Select the Users tab from the instance Details screen.
Enter a name and role for your new user. Leave the password field blank. You can also grant the user access to a database.
Note
Create a database before creating a user.
Select the checkmark.
Generate a Certificate Signing Request (CSR)¶
Use an SSL utility such as openssl to generate a CSR.
Review the ObjectRocket API documents for more information on generating a CSR.
Locate your connection string and download your CA file¶
Each new ObjectRocket instance has a unique hostname and port combination.
To access your Connection string:
Log in to Mission Control.
Select your instance.
Select View more details
Select the Connect tab of the instance Details screen.
View and copy your connection string.
Download the CA file for your instance.
Connect with MongoDB¶
Use the following steps to connect with your MongoDB instance.
Change the DBName in the connection string to the database with which you want to connect.
Connect to your MongoDB instance by using the certificate files.
Note
SSL use is deprecated in MongoDB. TLS is preferred.
Note
The MongoDB client for Mac does not allow connection because of the length of the connection string.
Note
Users without a password are authorized with the $external database and with the MONGODB-X509 mechanism, so you have to add the following flags to the connection command:
–authenticationDatabase ‘$external’ –authenticationMechanism MONGODB-X509
Contact the Support team if you have any questions or need additional assistance.