Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

5.2.2.2. 使用共享 Secret 创建信任

共享 secret 是一种密码,它为受信任的同级服务器所知,可供其他域用于加入信任。共享 secret 可以在 Active Directory(AD)中配置单向和双向信任。在 AD 中,共享 secret 作为信任配置中的可信域对象 (TDO)存储。
IdM 支持使用共享 secret 而不是 AD 管理员凭证创建单向或双向信任。设置这种信任需要管理员在 AD 中创建共享 secret,并在 AD 端手动验证信任关系。
5.2.2.2.1. 使用共享 secret 创建双向信任
使用 Microsoft Windows Server 2012 R2 或 2016 的共享 secret 创建双向信任:
  1. 为信任准备 IdM 服务器,如 第 5.2.2.1.1 节 “为信任准备 IdM 服务器” 所述。
  2. 如果 IdM 和 AD 主机使用无法解析这两个域的 DNS 服务器,请为 DNS 区域设置转发:
    1. 准备 AD DNS 服务器,以将 IdM 域的查询转发到 IdM DNS 服务器。详情请查看 第 5.2.1.7 节 “在 AD 中为 IdM 域创建条件 Forwarder”
    2. 准备 IdM DNS 服务器,以将 AD 域的查询转发到 AD DNS 服务器。详情请查看 第 5.2.1.8 节 “在 IdM 中为 AD 域创建转发区”
  3. 配置 Active Directory 域和信任控制台的信任。特别是:
    • 创建新信任.
    • 为信任的 IdM 域名指定,如 idm.example.com
    • 指定这是林类型的信任
    • 指定这是双向信任类型
    • 指定这是林范围的身份验证
    • 设置信任密码
      注意
      在配置 IdM 中的信任时,必须使用相同的密码。
    当系统要求确认进入的信任时,请选择 No
  4. 创建信任协议,如 第 5.2.2.1.2 节 “创建信任协议” 所述。运行 ipa trust-add 命令时,请使用 --type、--trust-secret--two-way=True 选项,并省略 --admin 选项。例如:
    [root@ipaserver ~]# ipa trust-add --type=ad ad.example.com --trust-secret --two-way=True
    Shared secret for the trust:
    -------------------------------------------------------
    Added Active Directory trust for realm "ad.example.com"
    -------------------------------------------------------
      Realm-Name: ad.example.com
      Domain NetBIOS name: AD
      Domain Security Identifier: S-1-5-21-796215754-1239681026-23416912
      SID blacklist incoming: S-1-5-20, S-1-5-3, S-1-5-2, S-1-5-1, S-1-5-7, S-1-5-6,
                              S-1-5-5, S-1-5-4, S-1-5-9, S-1-5-8, S-1-5-17, S-1-5-16,
                              S-1-5-15, S-1-5-14, S-1-5-13, S-1-5-12, S-1-5-11,
                              S-1-5-10, S-1-3, S-1-2, S-1-1, S-1-0, S-1-5-19, S-1-5-18
      SID blacklist outgoing: S-1-5-20, S-1-5-3, S-1-5-2, S-1-5-1, S-1-5-7, S-1-5-6,
                              S-1-5-5, S-1-5-4, S-1-5-9, S-1-5-8, S-1-5-17, S-1-5-16,
                              S-1-5-15, S-1-5-14, S-1-5-13, S-1-5-12, S-1-5-11,
                              S-1-5-10, S-1-3, S-1-2, S-1-1, S-1-0, S-1-5-19, S-1-5-18
      Trust direction: Trusting forest
      Trust type: Active Directory domain
      Trust status: Waiting for confirmation by remote side
  5. 检索域列表:
    [root@ipaserver ~]# ipa trust-fetch-domains ad_domain
  6. 在 IdM 服务器上,使用 ipa trust-show 命令验证是否已建立信任关系。
    [root@ipaserver ~]# ipa trust-show ad.example.com
    
      Domain NetBIOS name: AD
      Domain Security Identifier: S-1-5-21-796215754-1239681026-23416912
      Trust direction: Trusting forest
      Trust type: Active Directory domain
    
  7. 另外,还可搜索可信域:
    [root@ipaserver ~]# ipa trustdomain-find ad.example.com
    Domain name: ad.example.com
    Domain NetBIOS name: AD
    Domain Security Identifier: S-1-5-21-796215754-1239681026-23416912
    Domain enabled: True
  8. 验证 Kerberos 配置,如 第 5.2.2.1.3 节 “验证 Kerberos 配置” 所述。