跳转到内容
搜索文档

Slack

最后更新 查看 MarkdownAgent 设置

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

前提条件

  • 在 Cloudflare One 中配置的身份提供商
  • Slack Business+ 或 Enterprise Grid 方案账户的管理员访问权限

1. 在 Cloudflare One 中添加 SaaS 应用程序

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

2. 创建 x.509 证书

  1. Public key 粘贴到文本编辑器中。
  2. -----BEGIN CERTIFICATE----------END CERTIFICATE----- 包裹证书。

3. 在 Slack 中添加 SAML SSO 提供商

  1. 在 Slack 中,转到 Settings & administrations(设置与管理)> Workspace settings(工作区设置)> Authentication(身份验证)
  2. 选择 Configure(配置)
  3. 开启 Test(测试)。在开启 **Configure(配置)**之前,配置更改将不会应用。
  4. 填写以下字段:
    • Service Provider Issuer URL(服务提供商颁发者 URL):确保设置为 https://slack.com
    • SAML SSO URL(SAML 单点登录 URL):来自 Cloudflare One 应用程序配置的 SSO endpoint(SSO 端点)。
    • Identity Provider Issuer(身份提供商颁发者):来自 Cloudflare One 应用程序配置的 Access Entity ID or Issuer(Access 实体 ID 或颁发者)。
    • Public Certificate(公钥证书):粘贴来自步骤 2. 创建 x.509 证书的整个 x.509 证书。
  5. 在 **Advanced Options(高级选项)**下,选择 Expand(展开)
  6. 对于 AuthnContextClassRef,确保已选择 urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
  7. 确保关闭 Sign the AuthnRequest(签署 AuthnRequest)
  8. 对于 SAML Response Signing(SAML 响应签名),开启 **Sign the Response(签署响应)**和 Sign the Assertion(签署断言)
  9. 在 **Settings(设置)**下的主配置页面中,选择工作区成员的 SSO 是 required(强制)、partially required(部分强制)还是 optional(可选)。
  10. (可选)在 **Customize(自定义)**下输入 Sign in Button Label(登录按钮标签)
  11. 测试您的设置。如果一切正常,将 **Test(测试)**切换为 Configure(配置)
  1. 在 Slack 中,转到 Settings & administration(设置与管理)> Organization settings(组织设置)> Security(安全)> SSO Settings(SSO 设置)
  2. 对于 SSO name(SSO 名称),输入您所需的名称。
  3. 填写以下字段:
    • SAML 2.0 Endpoint URL(SAML 2.0 端点 URL):来自 Cloudflare One 应用程序配置的 SSO endpoint(SSO 端点)。
    • Identity Provider Issuer URL(身份提供商颁发者 URL):来自 Cloudflare One 应用程序配置的 Access Entity ID or Issuer(Access 实体 ID 或颁发者)。
    • Service Provider Issuer URL(服务提供商颁发者 URL):确保设置为 https://slack.com
    • x.509 Certificate(x.509 证书):粘贴来自步骤 2. 创建 x.509 证书的整个 x.509 证书。
  4. 对于 AuthnContextClassRef,确保已选择 urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
  5. 确保关闭 Sign the AuthnRequest(签署 AuthnRequest)
  6. 对于 SAML Response Signing(SAML 响应签名),开启 **Sign the Response(签署响应)**和 Sign the Assertion(签署断言)
  7. 选择 Test Configuration(测试配置)
  8. 如果一切正常,选择 **Turn on SSO(开启 SSO)**或 Add SSO(添加 SSO)

这篇文档对您有帮助吗?