Authentication is the process of verifying the identity of a client. When access control (authorization) is enabled, MongoDB requires all clients to authenticate themselves in order to determine their access.
Although authentication and authorization are closely connected, authentication is distinct from authorization:
- Authentication verifies the identity of a user.
- Authorization determines the verified user's access to resources and operations.
To get started using access control, follow these tutorials:
MongoDB Community supports a number of authentication mechanisms that clients can use to verify their identity:
In addition to the preceding mechanisms, MongoDB Atlas and MongoDB Enterprise support the following mechanisms:
These mechanisms allow MongoDB to integrate into your existing authentication system.
Internal / Membership Authentication¶
In addition to verifying the identity of a client, MongoDB can require members of replica sets and sharded clusters to authenticate their membership to their respective replica set or sharded cluster. See Internal/Membership Authentication for more information.