本文档采用自动化机器翻译技术翻译。 尽管我们力求提供准确的译文,但不对翻译内容的完整性、准确性或可靠性作出任何保证。 若出现任何内容不一致情况,请以原始 英文 版本为准,且原始英文版本为权威文本。

使用 Shibboleth 和 OpenLDAP 的组权限

由于 Shibboleth 是一个 SAML 提供者,它不支持搜索组。虽然 Shibboleth 集成可以验证用户凭据,但在没有额外配置的情况下,它不能用于在 Rancher 中为组分配权限。

解决此问题的一种方法是配置一个 OpenLDAP 身份提供者。通过为 Shibboleth 配置 OpenLDAP 后端,您将能够在 Rancher 中搜索组,并将其分配给 Rancher UI 中的集群、项目或命名空间等资源。

术语

  • Shibboleth 是一个用于计算机网络和互联网的单点登录系统。它允许人们使用一个身份登录多个系统。它验证用户凭据,但本身不处理组成员资格。

  • *SAML:*安全声明标记语言,是一种开放标准,用于在身份提供者和服务提供者之间交换身份验证和授权数据。

  • OpenLDAP: 是轻量级目录访问协议(LDAP)的免费开源实现。它用于管理组织的计算机和用户。OpenLDAP 对 Rancher 用户很有用,因为它支持组。在 Rancher 中,可以为组分配权限,以便它们可以访问集群、项目或命名空间等资源,只要这些组已经存在于身份提供者中。

  • *IdP 或 IDP:*身份提供者。OpenLDAP 是身份提供者的一个例子。

将 OpenLDAP 组权限添加到 Rancher 资源

下图说明了 OpenLDAP 组的成员如何访问该组具有权限的 Rancher 资源。

例如,集群所有者可以将 OpenLDAP 组添加到集群,以便他们有权限查看大多数集群级资源并创建新项目。然后,OpenLDAP 组成员在登录 Rancher 后将能够访问集群。

在这种情况下,OpenLDAP 允许集群所有者在分配权限时搜索组。没有 OpenLDAP,搜索组的功能将不被支持。

当 OpenLDAP 组的成员登录 Rancher 时,她会被重定向到 Shibboleth,并输入她的用户名和密码。

Shibboleth 验证她的凭据,并从 OpenLDAP 中检索用户属性,包括组。然后,Shibboleth 向 Rancher 发送包含用户属性的 SAML 断言。Rancher 使用组数据,以便她可以访问她的组所拥有的所有资源和权限。

将 OpenLDAP 组权限添加到 Rancher 资源

SAML 和 OpenLDAP 组权限

When you configure a SAML authentication provider backed by OpenLDAP, the SAML response might return only a subset of the groups that a user belongs to. The exact groups returned depend on the configuration of your external authentication provider.

Rancher assigns user permissions based strictly on the groups provided in the SAML response.

Even if you can search for and view specific OpenLDAP groups in the Rancher UI, you cannot use them to assign permissions if they are missing from the SAML response.

To assign permissions successfully, verify that your SAML authentication provider is configured to return all necessary OpenLDAP groups.