1. 在 Microsoft AD FS 中配置 Rancher

在配置 Rancher 以支持 AD FS 用户之前,你必须在 AD FS 中将 Rancher 添加为 relying party trust(信赖方信任)。

  1. 以管理用户身份登录 AD 服务器。

  2. 打开 AD FS Management 控制台。在 Actions 菜单中选择 Add Relying Party Trust…。然后单击 Start

    1. 在 Microsoft AD FS 中配置 Rancher - 图1

  3. 选择 Enter data about the relying party manually 作为获取信赖方数据的选项。

    1. 在 Microsoft AD FS 中配置 Rancher - 图2

  4. Relying Party Trust 设置显示名称,例如 Rancher

    1. 在 Microsoft AD FS 中配置 Rancher - 图3

  5. 选择 AD FS profile 作为信赖方信任的配置文件。

    1. 在 Microsoft AD FS 中配置 Rancher - 图4

  6. 留空 optional token encryption certificate,因为 Rancher AD FS 不会使用它。

    1. 在 Microsoft AD FS 中配置 Rancher - 图5

  7. 选择 Enable support for the SAML 2.0 WebSSO protocol 并在 Service URL 处输入 https://<rancher-server>/v1-saml/adfs/saml/acs

    1. 在 Microsoft AD FS 中配置 Rancher - 图6

  8. https://<rancher-server>/v1-saml/adfs/saml/metadata 添加为 Relying party trust identifier

    1. 在 Microsoft AD FS 中配置 Rancher - 图7

  9. 本教程不涉及多重身份验证。如果你想配置多重身份验证,请参见 Microsoft 文档

    1. 在 Microsoft AD FS 中配置 Rancher - 图8

  10. Choose Issuance Authorization RUles 中,你可以根据用例选择任何一个可用选项。但是考虑到本指南的目的,请选择 Permit all users to access this relying party

    1. 在 Microsoft AD FS 中配置 Rancher - 图9

  11. 检查所有设置后,选择 Next 来添加信赖方信任。

    1. 在 Microsoft AD FS 中配置 Rancher - 图10

  12. 选择 Open the Edit Claim Rules…。然后单击 Close

    1. 在 Microsoft AD FS 中配置 Rancher - 图11

  13. Issuance Transform Rules 选项卡中,单击 Add Rule…

    1. 在 Microsoft AD FS 中配置 Rancher - 图12

  14. Claim rule template 中选择 Send LDAP Attributes as Claims

    1. 在 Microsoft AD FS 中配置 Rancher - 图13

  15. Claim rule name 设置为所需的名称(例如 Rancher Attributes)并选择 Active Directory 作为 Attribute store。创建对应下表的映射:

    LDAP 属性传出声明类型
    Given-NameGiven Name
    User-Principal-NameUPN
    Token-Groups - Qualified by Long Domain NameGroup
    SAM-Account-Name名称
  1. ![](/projects/rancher-2.6-zh/e36db07ead89c812baf0d2b228c003d7.png)
  1. 从 AD 服务器的以下位置下载 federationmetadata.xml
  1. https://<AD_SERVER>/federationmetadata/2007-06/federationmetadata.xml

结果:你已将 Rancher 添加为依赖信任方。现在你可以配置 Rancher 来使用 AD。

后续操作

在 Rancher 中配置 Microsoft AD FS