Navigation
  • Security >
  • Configure the Connections to the Application Database

Configure the Connections to the Application Database

If your Ops Manager Application Database uses authentication or TLS, update the connection settings from Ops Manager to the Ops Manager Application database in the conf-mms.properties file

No Support for SCRAM-SHA-256 Auth for Ops Manager Backing Databases

Although MongoDB 4.0 supports the SCRAM-SHA-256 authentication mechanism, Ops Manager does not support this authentication mechanism for its backing databases.

Prerequisites

This tutorial assumes you deployed the Ops Manager Application Database and configured it to use authentication, TLS, or both.

Note

To learn how to deploy MongoDB with access control or to use TLS, see Security Concepts in the MongoDB manual.

Configure Ops Manager to Authenticate with Application Databases

Ops Manager can authenticate with the Application Databases using one of the following methods:

Using MongoDB Community

  • Username and Password (MONGODB-CR/SCRAM-SHA-1)
  • LDAP

Using MongoDB Enterprise

  • Username and Password (MONGODB-CR/SCRAM-SHA-1)
  • LDAP
  • Kerberos
  • X.509 Client Certificates

If your Ops Manager Application database uses authentication, you must configure Ops Manager to be able to connect to the database.

1

Open the conf-mms.properties file with elevated privileges.

Open the conf-mms.properties file in your preferred text editor with root (Linux) or Administrator (Windows) privileges.

This file configures Ops Manager’s connection to the Ops Manager Application Database.

2

Configure Ops Manager to connect to the Ops Manager Application Database.

mongo.mongoUri contains the connection string used to access the Ops Manager Application Database. The connection string must include the following when applicable:

  • All members of the replica set, if the Ops Manager Application database is a replica set.
  • Authentication credentials for the authentication mechanism used on the Ops Manager Application database.

The mongo.mongoUri reference provides examples of the connection string format for each authentication mechanism and details the required permissions for the connecting user.

These include any connection string options that a MongoDB database could use. These options include, but aren’t limited to, TLS, set read and write concerns, and authentication.

Example

For an Ops Manager Application Database using Kerberos authentication, the mongo.mongoUri setting might resemble:

mongo.mongoUri=mongodb://username%40REALM.example.net@mydb1.example.net:
40000/?authMechanism=GSSAPI
3

Optional: Configure any other authentication mechanism-specific settings.

Edit the following settings in conf-mms.properties:

If you are using Kerberos authentication, you must :ref:`configure the Kerberos settings `, as in the following: .. code-block:: ini jvm.java.security.krb5.kdc=kdc.example.com jvm.java.security.krb5.realm=EXAMPLE.COM mms.kerberos.principal=mms/mmsweb.example.com@EXAMPLE.COM mms.kerberos.keyTab=/path/to/mms.keytab
If you are using x.509 Client Certificate Authentication, you must also be connecting over |tls-ssl|. The next section, :ref:`configure-ssl-backing`, covers the |tls-ssl| configuration instructions.
4

Restart all the Ops Manager instances, including those with the Backup Daemon enabled.

If the Ops Manager Application Database runs using TLS, proceed to the SSL configuration tutorial.

Restart Ops Manager using the appropriate command for your platform:

sudo service mongodb-mms restart
<install_dir>/bin/mongodb-mms restart
  1. Click Control Panel.
  2. Click System and Security.
  3. Click Administrative Tools.
  4. Click Services.
  5. In the Services list, right-click on the MongoDB Ops Manager HTTP Service and click Restart.
  6. Optionally, in the Services list, right-click on the MongoDB Backup Daemon Service and click Restart.

Configure TLS Connections to Application Database

To enable TLS connections to the Ops Manager Application database, follow this procedure.

1

Open the conf-mms.properties file with root (Linux) or Administrator (Windows) privileges.

This file configures Ops Manager’s connection to the Ops Manager Application Database.

2

Configure Ops Manager to connect to the Ops Manager Application Database over SSL.

Configure the following settings in conf-mms.properties:

Option Setting
Set this to true to indicate that the Ops Manager Application Database is using TLS/SSL.
Specify the PEM file that contains the root certificate chain from the Certificate Authority that signed the MongoDB server certificate.
If the MongoDB instance is running with --sslCAFile option, specify the PEM file containing an x.509 certificate and private key.

If the client PEM file contains an encrypted private key, specify the password for PEM file. To encrypt this password in the configuration file, use the Ops Manager credentialstool tool. See credentialstool.

Important

On Microsoft Windows servers, file paths for mongodb.ssl.CAFile and mongodb.ssl.PEMKeyFile must escape their backslashes to work properly. If you store your TLS/SSL certificates in D:\Certificates, the file path would be written as D:\\Certificates\\pemkeyfile.pem.

3

Restart all the Ops Manager instances, including those with the Backup Daemon enabled.

Restart Ops Manager using the appropriate command for your platform:

sudo service mongodb-mms restart
<install_dir>/bin/mongodb-mms restart
  1. Click Control Panel.
  2. Click System and Security.
  3. Click Administrative Tools.
  4. Click Services.
  5. In the Services list, right-click on the MongoDB Ops Manager HTTP Service and click Restart.
  6. Optionally, in the Services list, right-click on the MongoDB Backup Daemon Service and click Restart.