跳转到内容
搜索文档

Google Workspace

最后更新 查看 MarkdownAgent 设置

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

前提条件

  • 在 Cloudflare One 中配置的身份提供商
  • Google Workspace 账户的管理员访问权限

1. 在 Cloudflare One 中创建应用程序

  1. Cloudflare 仪表板中,转到 Zero Trust > Access controls(访问控制)> Applications(应用程序)

  2. 选择 Create new application(创建新应用程序)

  3. 选择 SaaS application(SaaS 应用程序)

  4. 填写以下信息:

    • Application(应用程序)Google
    • Entity ID(实体 ID):使用 Google 在配置您的 SAML SSO 提供商时为您提供的值。
    • Assertion Consumer Service URL(断言使用者服务 URL)https://www.google.com/a/<your_domain.com>/acs,其中 <your_domain.com> 是您的 Google Workspace 域名。
    • Name ID Format(名称 ID 格式)Email
  1. 为您的应用程序创建 Access 策略。例如,您可以允许使用 @your_domain.com 邮箱地址的用户访问。

  2. 复制 SSO endpoint(SSO 端点)、**Access Entity ID or Issuer(Access 实体 ID 或签发者)**和 Public key(公钥)。这些值将用于配置 Google Workspace。

  3. 保存应用程序。

2. 从公钥创建证书

  1. 复制并将 **Public key(公钥)**粘贴到文本编辑器中。

  2. -----BEGIN CERTIFICATE----------END CERTIFICATE----- 包裹证书。例如,

    -----BEGIN CERTIFICATE-----
    <PUBLIC_KEY>
    -----END CERTIFICATE-----
  3. 将文件扩展名设置为 .crt 并保存。

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

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

4. 测试集成

  1. 在您的 Google 管理控制台中,转到 Apps(应用)> Google Workspace > Gmail > Setup(设置)
  2. 复制您的 Gmail Web address(Web 地址)
  3. 打开无痕浏览器窗口,转到您的 Gmail 网址(例如,https://mail.google.com/a/<your_domain.com>)。

应显示 Access 登录屏幕。

故障排除

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

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

这篇文档对您有帮助吗?