如何将 Azure AD 中的用户验证为部署在 Google 云 运行 中的自定义 Web 应用程序?

How to Authenticate users in Azure AD to a custom web app deployed in Google cloud run?

我有将 AWS cognito 与 Azure AD (SSO) 集成的经验。但是我不知道如何在GCP中实现类似的认证。

我想对 Azure AD 中的用户进行身份验证,以使用部署在 Google 云 运行 中的自定义 Web 应用程序。

我在 GCP 中看到三个选项,但我找不到任何资源来实施。

  1. Google 云身份
  2. Google 云身份平台
  3. Firebase 身份验证

此自定义 Web 应用应仅对我们组织中的 Azure AD 用户进行身份验证。

Google Cloud Identity Platform 和 Firebase Authentication 实际上是一回事。 GCIP 中还有一些附加功能。

要为 Microsoft 用户设置 GCIP,这里是 link 到 the docs

如果您使用 Cloud Function for Firebase,您可以使用 Callable Function 获取经过身份验证的用户,然后处理您自己的授权。

如果您想使用 Cloud 运行,那么您可以使用 Firebase Admin SDK(甚至使用 GCIP)来 verify the token and get the user ID (which you can then use to authorise the user via a database or with Custom Claims)。