本指南介绍如何在 Cloudflare One 中将 Google Cloud 配置为 SAML 应用程序。
- 在 Cloudflare One 中配置的身份提供商
- 对 Google Workspace 账户的管理员访问权限
- 在您组织的 Google Cloud 账户中设置了 Cloud Identity Free 或 Premium ↗
- 在 Cloudflare 仪表板 ↗中,转到 Zero Trust > Access controls(访问控制)> Applications(应用程序)。
- 选择 Create new application(创建新应用程序)> SaaS application(SaaS 应用程序)。
- 对于 Application(应用程序),选择 Google Cloud。
- 对于身份验证协议,选择 SAML。
- 选择 Add application(添加应用程序)。
- 填写以下字段:
- Entity ID(实体 ID):
google.com - Assertion Consumer Service URL(断言使用者服务 URL):
https://www.google.com/a/<your_domain.com>/acs - Name ID format(名称 ID 格式):Email
- Entity ID(实体 ID):
- 复制 SSO endpoint(SSO 端点)、**Access Entity ID or Issuer(Access 实体 ID 或签发者)**和 Public key(公钥)。
- 为该应用程序配置 Access 策略。
- 保存应用程序。
- 将来自 Cloudflare One 中应用程序配置的 **Public key(公钥)**粘贴到文本编辑器中。
- 将证书包裹在
-----BEGIN CERTIFICATE-----和-----END CERTIFICATE-----之中。 - 将文件扩展名设置为
.crt并保存。
- 在您的 Google 管理控制台 ↗中,转到 Security(安全)> Authentication(身份验证)> SSO with third party IdP(使用第三方 IdP 进行 SSO)。
- 选择 Third-party SSO profile for your organization(适用于您组织的第三方 SSO 配置文件)> Add SSO Profile(添加 SSO 配置文件)。
- 开启 Set up SSO with third-party identity provider(设置使用第三方身份提供商的 SSO)。
- 填写以下信息:
- 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证书文件。
- (可选)开启 Use a domain specific issuer(使用特定于域的签发者)。如果您选择此选项,Google 将发送特定于您的 Google Cloud 域的签发者(即
google.com/a/<your_domain.com>而不是标准的google.com)。
打开无痕/隐私浏览器窗口,并转到您的 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 - 无法访问此账户,因为无法验证登录凭据。)
如果看到此错误,可能是公钥与私钥不匹配。请确认您的证书文件包含正确的公钥。