权限认证机制

On this page

此页面

NOTE

Starting in version 4.0, MongoDB removes support for the deprecated MongoDB Challenge-Response (MONGODB-CR) authentication mechanism.

MongoDB supports the following authentication mechanisms:

In addition, MongoDB Enterprise provides integration with a number of external authentication mechanisms, including Kerberos and LDAP. See Enterprise Authentication Mechanisms for the additional authentication mechanisms supported by MongoDB Enterprise.

注意 从4.0版本开始,MongoDB删除了对已弃用的MongoDB询问-响应(MONGODB-CR)身份验证机制的支持。 MongoDB支持以下身份验证机制:

Default Authentication Mechanism

As of MongoDB 3.0, Salted Challenge Response Authentication Mechanism (SCRAM) is the default authentication mechanism for MongoDB.

默认权限认证机制

在MongoDB 3.0中,严格询问响应认证机制 (SCRAM) 是MongoDB的默认身份验证机制。

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.

指定权限认证机制

指定要使用的身份验证机制,设置 authenticationMechanisms 参数,使用 mongodmongos 。 客户端在 db.auth() 方法中指定身份验证机制。对于 mongo 命令和MongoDB工具,还可以从命令行指定身份验证机制。

英文原文地址:https://docs.mongodb.com/v4.2/core/authentication-mechanisms/

译者:管祥青

最后更新于