Menu Close

9.4.2. 在 IdM CLI 中添加证书映射规则

  1. 获取管理员凭证:

    # kinit admin
  2. 输入映射规则以及映射规则所基于的匹配规则。例如,若要使 AD 搜索任何呈现的证书中的 IssuerSubject 条目,并且只允许 AD.EXAMPLE.COM 域的 AD-ROOT-CA 签发的证书:

    # ipa certmaprule-add ad_configured_for_mapping_rule --matchrule '<ISSUER>CN=AD-ROOT-CA,DC=ad,DC=example,DC=com' --maprule '(altSecurityIdentities=X509:<I>{issuer_dn!ad_x500}<S>{subject_dn!ad_x500})' --domain=ad.example.com
    -------------------------------------------------------
    Added Certificate Identity Mapping Rule "ad_configured_for_mapping_rule"
    -------------------------------------------------------
      Rule name: ad_configured_for_mapping_rule
      Mapping rule: (altSecurityIdentities=X509:<I>{issuer_dn!ad_x500}<S>{subject_dn!ad_x500})
      Matching rule: <ISSUER>CN=AD-ROOT-CA,DC=ad,DC=example,DC=com
      Domain name: ad.example.com
      Enabled: TRUE
  3. 系统安全服务守护进程(SSSD)会定期重新读取证书映射规则。要强制立即载入新创建的规则,重启 SSSD:

    # systemctl restart sssd