权限认证机制

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 Mechanismsarrow-up-right 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)arrow-up-right is the default authentication mechanism for MongoDB.

默认权限认证机制

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

Specify Authentication Mechanism

To specify the authentication mechanism to use, set the authenticationMechanismsarrow-up-right parameter for mongodarrow-up-right and mongosarrow-up-right.

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

指定权限认证机制

指定要使用的身份验证机制,设置 authenticationMechanismsarrow-up-right 参数,使用 mongodarrow-up-rightmongosarrow-up-right 。 客户端在 db.auth()arrow-up-right 方法中指定身份验证机制。对于 mongoarrow-up-right 命令和MongoDB工具,还可以从命令行指定身份验证机制。

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

译者:管祥青

最后更新于