- Reference >
- Backup Agent >
- Configure Backup Agent for Access Control >
- Configure Backup Agent for MONGODB-CR
Configure Backup Agent for MONGODB-CR¶
On this page
In MongoDB 3.0 and later, MongoDB’s default authentication mechanism is
a challenge and response mechanism (SCRAM-SHA-1
). Previously, MongoDB
used MongoDB Challenge and Response (MONGODB-CR
) as the default.
The Backup Agent can use MONGODB-CR
or SCRAM-SHA-1
to authenticate to hosts that enforce access control.
To authenticate using SCRAM-SHA-1
or MONGODB-CR
, create a user
in the admin
database with the appropriate roles in MongoDB.
Note
In Ops Manager 1.8 and later, Ops Manager can manage agent authentication for you if you use Automation to manage the agents. With Automation, Ops Manager creates the users for each agent and configures the agent appropriately. See: Enable SCRAM-SHA-1 / MONGODB-CR Authentication for your Ops Manager Group for more information.
Procedures¶
Create MongoDB User for the Agent¶
Connect to the mongod or mongos instance as a user with access to create users in the database. See db.createUser() method page for more information.
To authenticate to sharded clusters, create shard-local users on each shard and create cluster-wide users:
- Create cluster users while connected to the mongos: these credentials persist to the config servers.
- Create shard-local users by connecting directly to the replica set for each shard.
MongoDB 3.0 and Later¶
To back up MongoDB instances running 3.0 and later, create a user in
the admin
database with an operation that resembles the following:
See Access Control for MongoDB 3.0 for more information on the required access.
MongoDB 2.6¶
To back up MongoDB 2.6 release series instances, create a user in the
admin
database with an operation that resembles the following:
See Access Control for MongoDB 2.6 for more information on the required access.
MongoDB 2.4¶
To back up MongoDB 2.4 release series instances, create a user in the
admin
database with an operation that resembles the following:
See Access Control for MongoDB 2.4 for more information on the required access.
Host Settings¶
In addition to adding the agent as a MongoDB user, you must also specify the host’s authentication settings. You can specify the host’s authentication settings when adding the host, or you can edit the settings for an existing host.