Note
Starting in MongoDB 8.0, LDAP authentication and authorization is deprecated. LDAP is available and will continue to operate without changes throughout the lifetime of MongoDB 8. LDAP will be removed in a future major release.
For details, see LDAP Deprecation.
Enabling access control on a MongoDB deployment enforces authentication. With access control enabled, users must authenticate and can only perform actions permitted by their assigned roles.
You can configure authentication in the UI for deployments hosted in MongoDB Atlas.
Note
You can't disable access control in MongoDB Atlas.
Access Control Resources
To enable access control for a standalone instance, see the following resources:
To enable access control for a replica set or a sharded cluster, see the following resources:
Next Steps
To create additional users, see Create a User on Self-Managed Deployments.
To manage users, assign roles, and create custom roles, see Manage Users and Roles on Self-Managed Deployments.