跳转到内容
搜索文档

Google Cloud

最后更新 查看 MarkdownAgent 设置

本指南介绍如何在 Cloudflare One 中将 Google Cloud 配置为 SAML 应用程序。

前提条件

1. 向 Cloudflare One 添加 SaaS 应用程序

  1. Cloudflare 仪表板中,转到 Zero Trust > Access controls(访问控制)> Applications(应用程序)
  2. 选择 Create new application(创建新应用程序)> SaaS application(SaaS 应用程序)
  3. 对于 Application(应用程序),选择 Google Cloud
  4. 对于身份验证协议,选择 SAML
  5. 选择 Add application(添加应用程序)
  6. 填写以下字段:
    • Entity ID(实体 ID)google.com
    • Assertion Consumer Service URL(断言使用者服务 URL)https://www.google.com/a/<your_domain.com>/acs
    • Name ID format(名称 ID 格式)Email
  7. 复制 SSO endpoint(SSO 端点)、**Access Entity ID or Issuer(Access 实体 ID 或签发者)**和 Public key(公钥)
  8. 为该应用程序配置 Access 策略
  9. 保存应用程序。

2. 创建 x.509 证书

  1. 将来自 Cloudflare One 中应用程序配置的 **Public key(公钥)**粘贴到文本编辑器中。
  2. 将证书包裹在 -----BEGIN CERTIFICATE----------END CERTIFICATE----- 之中。
  3. 将文件扩展名设置为 .crt 并保存。

3. 在 Google Cloud 中创建 SSO 提供商

  1. 在您的 Google 管理控制台中,转到 Security(安全)> Authentication(身份验证)> SSO with third party IdP(使用第三方 IdP 进行 SSO)
  2. 选择 Third-party SSO profile for your organization(适用于您组织的第三方 SSO 配置文件)> Add SSO Profile(添加 SSO 配置文件)
  3. 开启 Set up SSO with third-party identity provider(设置使用第三方身份提供商的 SSO)
  4. 填写以下信息:
    • Sign-in page URL(登录页面 URL):来自 Cloudflare One 中应用程序配置的 SSO 端点。
    • Sign-out page URL(登出页面 URL)https://<team-name>.cloudflareaccess.com/cdn-cgi/access/logout,其中 <team-name> 是您的 Cloudflare One 团队名称
    • Verification certificate(验证证书):上传来自步骤 2. 创建 x.509 证书.crt 证书文件。
  5. (可选)开启 Use a domain specific issuer(使用特定于域的签发者)。如果您选择此选项,Google 将发送特定于您的 Google Cloud 域的签发者(即 google.com/a/<your_domain.com> 而不是标准的 google.com)。

4. 测试集成

打开无痕/隐私浏览器窗口,并转到您的 Google Cloud URL(https://console.cloud.google.com/a/<your_domain.com>)。使用不属于超级管理员账户的凭据进行登录。

故障排除

Error: "G Suite - This account cannot be accessed because the login credentials could not be verified."(G Suite - 无法访问此账户,因为无法验证登录凭据。)

如果看到此错误,可能是公钥与私钥不匹配。请确认您的证书文件包含正确的公钥。

这篇文档对您有帮助吗?