Docs Home / Node.js Driver

Authentication Mechanisms认证机制

Overview概述

In this guide, you can learn how to authenticate to MongoDB by using the authentication mechanisms available in MongoDB Server. Authentication mechanisms are processes by which the driver and server confirm the identity of a client to ensure security before connecting.在本指南中,您可以学习如何使用MongoDB Server中提供的身份验证机制对MongoDB进行身份验证。身份验证机制是驱动程序和服务器在连接之前确认客户端身份以确保安全的过程。

Tip

Connecting to MongoDB连接到MongoDB

To learn how to establish a connection to your MongoDB deployment, see the Connect to MongoDB guide.要了解如何建立与MongoDB部署的连接,请参阅《连接到MongoDB》指南。

MongoDB Edition CompatibilityMongoDB版本兼容性

The following table lists the authentication mechanisms supported by MongoDB and the MongoDB Server editions that each mechanism is compatible with. Click the name of a mechanism to learn more about how to use it with your application.下表列出了MongoDB支持的身份验证机制以及每种机制兼容的MongoDB Server版本。单击机制的名称,了解有关如何将其与应用程序一起使用的更多信息。

Authentication Mechanism认证机制AtlasEnterprise Advanced企业高级版Community社区版
SCRAM Authentication MechanismsSCRAM身份验证机制YesYesYes
X.509 Authentication Mechanism认证机制YesYesYes
AWS IAM Authentication Mechanism认证机制YesNoNo
OIDC Authentication Mechanism认证机制YesYesNo
LDAP (PLAIN) Authentication Mechanism认证机制YesYesNo
Kerberos (GSSAPI) Authentication Mechanism认证机制NoYesNo