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

2.为 Microsoft AD FS 配置 SUSE Rancher Prime

完成 为 Rancher 配置 Microsoft AD FS 后,将您的 Active Directory 联合身份验证服务 (AD FS) 信息输入到 Rancher,以便 AD FS 用户可以使用 Rancher 进行身份验证。

配置 ADFS 服务器的重要说明:
  • SAML 2.0 WebSSO 协议服务 URL 为:https://<RANCHER_SERVER>/v1-saml/adfs/saml/acs

  • 依赖方信任标识符 URL 为:https://<RANCHER_SERVER>/v1-saml/adfs/saml/metadata

  • 您必须从 AD FS 服务器导出 federationmetadata.xml 文件。可以在以下位置找到:https://<AD_SERVER>/federationmetadata/2007-06/federationmetadata.xml

  1. 在左上角,点击 ☰ > 用户与身份验证

  2. 在左侧导航菜单中,点击 身份验证提供者

  3. 单击 ADFS

  4. 完成 配置 AD FS 账户 表单。Microsoft AD FS 允许您指定现有的 Active Directory (AD) 服务器。下面的 配置部分 描述了如何将 AD 属性映射到 Rancher 中的字段。

  5. 完成 配置 AD FS 账户 表单后,单击 启用

    Rancher 会将您重定向到 AD FS 登录页面。输入与 Microsoft AD FS 进行身份验证的凭据,以验证您的 Rancher AD FS 配置。

    您可能需要禁用弹出窗口拦截器才能查看 AD FS 登录页面。

*结果:*Rancher 已配置为与 AD FS 一起使用。您的用户现在可以使用他们的 AD FS 登录凭据登录 Rancher。

配置

字段 说明

显示名称字段

包含用户显示名称的 AD 属性。

示例:http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name

用户名字段

包含用户名/名的 AD 属性。

示例:http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname

UID 字段

每个用户唯一的 AD 属性。

示例:http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn

组字段

为管理组成员资格创建条目。

示例:http://schemas.xmlsoap.org/claims/Group

Rancher API 主机

您的 Rancher 服务器的 URL。

私钥/证书

这是一个密钥-证书对,用于在 Rancher 和您的 AD FS 之间创建安全外壳。确保将通用名称 (CN) 设置为您的 Rancher 服务器 URL。

证书创建命令

元数据 XML

从您的 AD FS 服务器导出的 federationmetadata.xml 文件。

您可以在 https://<AD_SERVER>/federationmetadata/2007-06/federationmetadata.xml 找到此文件。

示例证书创建命令

您可以使用 openssl 命令生成证书。例如:

openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com"

配置SAML单点注销(SLO)

Rancher supports the ability to configure SAML SLO. Options include logging out of the Rancher application only, logging out of Rancher and registered applications tied to the external authentication provider, or a prompt asking the user to choose between the previous options. The steps below outline configuration from the application GUI:

The Log Out behavior configuration section only appears if the SAML authentication provider allows for SAML SLO.

  1. Sign in to Rancher using a standard user or an administrator role to configure SAML SLO.

  2. In the top left corner, click ☰ > Users & Authentication.

  3. In the left navigation menu, click Auth Provider.

  4. Under the section Log Out behavior, choose the appropriate SLO setting as described below:

    Setting Description

    Log out of Rancher and not authentication provider

    Choosing this option will only logout the Rancher application and not external authentication providers.

    Log out of Rancher and authentication provider (includes all other applications registered with authentication provider)

    Choosing this option will logout Rancher and all external authentication providers along with any registered applications linked to the provider.

    Allow the user to choose one of the above in an additional log out step

    Choosing this option presents users with a choice of logout method as described above.

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.