MongoDB Enterprise supports OpenID Connect (OIDC) and OAuth 2.0 authentication and authorization for both human users and applications. These protocols enable Workforce and Workload Identity Federation, which streamline authentication and authorization by integrating with external identity providers. MongoDB Enterprise为人类用户和应用程序支持OpenID Connect(OIDC)和OAuth 2.0身份验证和授权。这些协议支持劳动力和工作负载身份联合,通过与外部身份提供者集成简化身份验证和授权。This lets you simplify your security management and enhance your system's scalability and flexibility.这使您可以简化安全管理,增强系统的可扩展性和灵活性。
Important
OpenID Connect (OIDC) is only supported on Linux.OpenID Connect(OIDC)仅在Linux上受支持。
Use Cases用例
Workload and Workforce Identity Federation use OIDC and OAuth 2.0 as follows:工作负载和劳动力身份联合会使用OIDC和OAuth 2.0,如下所示:
Workforce Identity Federation uses OIDC to enable human users to authenticate and get authorized using an external identity provider (IdP).劳动力身份联合会使用OIDC使人类用户能够使用外部身份提供者(IdP)进行身份验证和授权。Workload Identity Federation uses OAuth 2.0 to enable your applications to access MongoDB using external programmatic identities such as Azure Service Principals, Azure Managed Identities, and Google Service Accounts.Workload Identity Federation使用OAuth 2.0使应用程序能够使用外部编程身份(如Azure服务主体、Azure托管身份和Google服务帐户)访问MongoDB。
Behavior行为
To use Workforce and Workload Identity Federation, you must use MongoDB Enterprise and have MongoDB 7.0.11 or later.要使用劳动力和工作负载身份联合,您必须使用MongoDB Enterprise并拥有MongoDB 7.0.11或更高版本。
To verify that you are using MongoDB Enterprise, pass the 要验证您是否正在使用MongoDB Enterprise,请将--version command line option to the mongod or mongos:--version命令行选项传递给mongod或mongos:
mongod --version
In the output from this command, look for the string 在此命令的输出中,查找字符串modules: subscription or modules: enterprise to confirm you are using the MongoDB Enterprise binaries.modules:subscription或modules:enterprise,以确认您正在使用MongoDB enterprise二进制文件。
Get Started开始使用
Select an authentication method to get started:选择一种身份验证方法以开始:
| OIDC | ||
| OAuth 2.0 |