There are four primary authentication mechanisms (https://docs.mongodb.com/manual/core/authentication-mechanisms/#authentication-mechanisms) currently supported by MongoDB. Salted Challenge Response Authentication Mechanism (SCRAM) and X.509 Certificate Authentication are supported in all versions of MongoDB. Two additional mechanisms, Keberos and Lightweight Directory Access Protocol (LDAP), are available only in the Enterprise edition. Let's look at them individually:
- SCRAM:Â SCRAM is the default authentication mechanism for MongoDB. It is based upon RFC 5802 and RFC 7677, providing a secure way to support usernames and passwords. To authenticate using this mechanism, simply provide a valid username and password and indicate the authentication database.
- X.509 certificate authentication:Â The X.509 certificate authentication process, defined by RFC 6818, involves generating public key infrastructure certificates used in an exchange between client...