OPTIONS

Authentication Mechanisms

MongoDB supports the following authentication mechanisms:

In addition, MongoDB Enterprise also provides supports for additional mechanisms. See Enterprise Authentication Mechanisms for additional mechanisms available in MongoDB Enterprise.

Default Authentication Mechanism

Changed in version 3.0.

MongoDB uses the SCRAM-SHA-1 as the default challenge and response authentication mechanism. Previous versions used MONGODB-CR as the default.

Specify Authentication Mechanism

To specify the authentication mechanism to use, set the authenticationMechanisms parameter for mongod and mongos.

Clients specify the authentication mechanism in the db.auth() method. For the mongo shell and the MongoDB tools, you can also specify the authentication mechanism from the command line.

←   Users SCRAM-SHA-1  →

Was this page helpful?

Yes No

Thank you for your feedback!

We're sorry! You can Report a Problem to help us improve this page.