Enable Access Control
On this page
Enabling access control on a MongoDB deployment enforces authentication. With access control enabled, users are required to identify themselves and can only perform actions that adhere to the permissions granted by the roles assigned to their user.
Compatibility
You can use authentication for deployments hosted in the following environments:
MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
Note
You can't disable access control in MongoDB Atlas.
MongoDB Enterprise: The subscription-based, self-managed version of MongoDB
MongoDB Community: The source-available, free-to-use, and self-managed version of MongoDB
To learn more about authenticating for deployments hosted in MongoDB Atlas, see Atlas UI Authentication.
Access Control Resources
If you would like to enable access control for a standalone MongoDB instance, please refer to one of the following resources:
Configure MongoDB with Kerberos Authentication and Active Directory Authorization
Authenticate and Authorize Users Using Active Directory via Native LDAP
If you would like to enable access control for a replica set or a sharded cluster, please refer to one of the following resources:
Next Steps
To create additional users, see Create a User.
To manage users, assign roles, and create custom roles, see Manage Users and Roles.