【问题标题】:Google App Engine & Identity-Aware Proxy - Validate if external users has MFA enabledGoogle App Engine 和 Identity-Aware Proxy - 验证外部用户是否启用了 MFA
【发布时间】:2021-03-04 08:20:40
【问题描述】:

我进行了一些研究,以找到一种方法来验证外部用户(GCP 组织之外)是否启用了多因素身份验证。我找到了 Google Workspace is_2sv_enrolled,但这是针对组织中的用户的。

您知道是否有任何方法可以验证外部用户是否通过身份识别代理从 Google App Engine 登录启用了 MFA?

为了更具体地说明我要解决的问题,这里是上下文的基本摘要:

我使用 Google App Engine 和 Identity-Aware Proxy 在 Python 中开发了一个解决方案,以便授权用户可以进行身份​​验证,并允许他们各自的 IP 地址访问 AWS 上的安全组入口中的某些端口,这是一个包含多种技术的解决方案,例如:Google Application Engine、Identity-Aware Proxy、Google Compute Engine、AWS WAF、AWS API Gateway、AWS Lambda、AWS Lambda等等。

目前,任何在身份识别代理中获得授权且符合我已经可以管理的条件的用户都将被允许进入安全组入口。

问题:我想将来自外部用户的这些访问权限限制为只允许拥有启用了 MFA 的 Google 帐户的用户访问。

谢谢。

【问题讨论】:

    标签: google-app-engine google-cloud-platform google-oauth multi-factor-authentication identity-aware-proxy


    【解决方案1】:

    Google 帐户不提供有关 MFA 的信息(称为声明)。

    只要授权请求中提供了正确的范围(openid 个人资料电子邮件),Google 帐户就会提供有关用户的信息。 发现文档中记录了端点、范围和声明的详细信息。 Google 在一个众所周知的 URL 上发布此文档:

    https://accounts.google.com/.well-known/openid-configuration

    以下是发现文档的内容(截至此日期)。请注意,在 claim_supported 部分中没有返回 MFA 相关信息(声明)的规定。

    {
     "issuer": "https://accounts.google.com",
     "authorization_endpoint": "https://accounts.google.com/o/oauth2/v2/auth",
     "device_authorization_endpoint": "https://oauth2.googleapis.com/device/code",
     "token_endpoint": "https://oauth2.googleapis.com/token",
     "userinfo_endpoint": "https://openidconnect.googleapis.com/v1/userinfo",
     "revocation_endpoint": "https://oauth2.googleapis.com/revoke",
     "jwks_uri": "https://www.googleapis.com/oauth2/v3/certs",
     "response_types_supported": [
      "code",
      "token",
      "id_token",
      "code token",
      "code id_token",
      "token id_token",
      "code token id_token",
      "none"
     ],
     "subject_types_supported": [
      "public"
     ],
     "id_token_signing_alg_values_supported": [
      "RS256"
     ],
     "scopes_supported": [
      "openid",
      "email",
      "profile"
     ],
     "token_endpoint_auth_methods_supported": [
      "client_secret_post",
      "client_secret_basic"
     ],
     "claims_supported": [
      "aud",
      "email",
      "email_verified",
      "exp",
      "family_name",
      "given_name",
      "iat",
      "iss",
      "locale",
      "name",
      "picture",
      "sub"
     ],
     "code_challenge_methods_supported": [
      "plain",
      "S256"
     ],
     "grant_types_supported": [
      "authorization_code",
      "refresh_token",
      "urn:ietf:params:oauth:grant-type:device_code",
      "urn:ietf:params:oauth:grant-type:jwt-bearer"
     ]
    }
    

    【讨论】:

      猜你喜欢
      • 2021-07-18
      • 1970-01-01
      • 2020-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-03
      • 2021-07-12
      • 2018-10-17
      相关资源
      最近更新 更多