22.3. 为 Web 服务器和客户端身份验证创建 CA ACL

证书颁发机构访问控制列表(CA ACL)规则定义哪些配置集可用于发布哪些用户、服务或主机的证书。通过关联配置集、主体和组,CA ACL 允许主体或组使用特定配置集请求证书。

例如,使用 CA ACL ,管理员可以将只用于伦敦办事处工作的员工的配置文件限制为与伦敦办事处相关的组的成员。

22.3.1. 在 IdM CLI 中查看 CA ACL

按照以下流程查看 IdM 部署中提供的证书颁发机构访问控制列表(CA ACL)以及特定 CA ACL 的详情。

步骤

  1. 要在 IdM 环境中查看所有 CA ACL,请输入 ipa caacl-find 命令:

    $ ipa caacl-find
    -----------------
    1 CA ACL matched
    -----------------
      ACL name: hosts_services_caIPAserviceCert
      Enabled: TRUE
  2. 要查看 CA ACL 的详情,请输入 ipa caacl-show 命令并指定 CA ACL 名称。例如,要查看 hosts_services_caIPAserviceCert CA ACL 的详情,请输入:

    $ ipa caacl-show hosts_services_caIPAserviceCert
      ACL name: hosts_services_caIPAserviceCert
      Enabled: TRUE
      Host category: all
      Service category: all
      CAs: ipa
      Profiles: caIPAserviceCert
      Users: admin

22.3.2. 使用由 webserver-ca 发布的证书为 Web 客户端创建 CA ACL

按照以下流程,在为 HTTP/my_company.idm.example.com@IDM.EXAMPLE.COM 服务请求证书时,创建一个需要系统管理员使用 webserver-ca 子 CA 和 caIPAserviceCert 配置文件的 CA ACL。如果用户从其他子 CA 或不同配置集请求证书,则请求会失败。唯一的例外是,当存在另一个启用了匹配的 CA ACL 时。要查看可用的 CA ACL,请参阅在 IdM CLI 中查看 CA ACL

先决条件

  • 确保 HTTP/my_company.idm.example.com@IDM.EXAMPLE.COM 服务是 IdM 的一部分。
  • 请确定您已获取了 IdM 管理员的凭证。

步骤

  1. 使用 ipa caacl 命令创建 CA ACL,并指定其名称:

    $ ipa caacl-add TLS_web_server_authentication
    --------------------------------------------
    Added CA ACL "TLS_web_server_authentication"
    --------------------------------------------
      ACL name: TLS_web_server_authentication
      Enabled: TRUE
  2. 使用 ipa caacl-mod 命令修改 CA ACL,以指定 CA ACL 的描述:

    $ ipa caacl-mod TLS_web_server_authentication --desc="CAACL for web servers authenticating to web clients using certificates issued by webserver-ca"
    -----------------------------------------------
    Modified CA ACL "TLS_web_server_authentication"
    -----------------------------------------------
      ACL name: TLS_web_server_authentication
      Description: CAACL for web servers authenticating to web clients using certificates issued by webserver-ca
      Enabled: TRUE
  3. webserver-ca 子 CA 添加到 CA ACL 中:

    $ ipa caacl-add-ca TLS_web_server_authentication --ca=webserver-ca
      ACL name: TLS_web_server_authentication
      Description: CAACL for web servers authenticating to web clients using certificates issued by webserver-ca
      Enabled: TRUE
      CAs: webserver-ca
    -------------------------
    Number of members added 1
    -------------------------
  4. 使用 ipa caacl-add-service 指定其主体可以请求证书的服务:

    $ ipa caacl-add-service TLS_web_server_authentication --service=HTTP/my_company.idm.example.com@IDM.EXAMPLE.COM
      ACL name: TLS_web_server_authentication
      Description: CAACL for web servers authenticating to web clients using certificates issued by webserver-ca
      Enabled: TRUE
      CAs: webserver-ca
      Services: HTTP/my_company.idm.example.com@IDM.EXAMPLE.COM
    -------------------------
    Number of members added 1
    -------------------------
  5. 使用 ipa caacl-add-profile 命令为请求的证书配置集指定:

    $ ipa caacl-add-profile TLS_web_server_authentication --certprofiles=caIPAserviceCert
      ACL name: TLS_web_server_authentication
      Description: CAACL for web servers authenticating to web clients using certificates issued by webserver-ca
      Enabled: TRUE
      CAs: webserver-ca
      Profiles: caIPAserviceCert
      Services: HTTP/my_company.idm.example.com@IDM.EXAMPLE.COM
    -------------------------
    Number of members added 1
    -------------------------

    您可以直接使用新创建的 CA ACL。它默认在创建后启用。

注意

CA ACL 的作用是,可为来自特定主体或组的请求指定允许哪些 CA 和配置集组合。CA ACL 不会影响证书验证或信任。它们不会影响签发的证书的使用方式。

22.3.3. 使用由 webclient-ca 发布的证书为 Web 服务器验证用户 Web 浏览器创建 CA ACL

按照以下流程,在请求证书时,创建一个需要系统管理员使用 webclient-ca 子 CA 和 IECUserRoles 配置文件的 CA ACL。如果用户从其他子 CA 或不同配置集请求证书,则请求会失败。唯一的例外是,当存在另一个启用了匹配的 CA ACL 时。要查看可用的 CA ACL,请参阅在 IdM CLI 中查看 CA ACL

先决条件

  • 确保您已获取 IdM 管理员的凭据。

步骤

  1. 使用 ipa caacl 命令创建 CA ACL 并指定其名称:

    $ ipa caacl-add TLS_web_client_authentication
    --------------------------------------------
    Added CA ACL "TLS_web_client_authentication"
    --------------------------------------------
      ACL name: TLS_web_client_authentication
      Enabled: TRUE
  2. 使用 ipa caacl-mod 命令修改 CA ACL,以指定 CA ACL 的描述:

    $ ipa caacl-mod TLS_web_client_authentication --desc="CAACL for user web browsers authenticating to web servers using certificates issued by webclient-ca"
    -----------------------------------------------
    Modified CA ACL "TLS_web_client_authentication"
    -----------------------------------------------
      ACL name: TLS_web_client_authentication
      Description: CAACL for user web browsers authenticating to web servers using certificates issued by webclient-ca
      Enabled: TRUE
  3. webclient-ca 子 CA 添加到 CA ACL 中:

    $ ipa caacl-add-ca TLS_web_client_authentication --ca=webclient-ca
      ACL name: TLS_web_client_authentication
      Description: CAACL for user web browsers authenticating to web servers using certificates issued by webclient-ca
      Enabled: TRUE
      CAs: webclient-ca
    -------------------------
    Number of members added 1
    -------------------------
  4. 使用 ipa caacl-add-profile 命令为请求的证书配置集指定:

    $ ipa caacl-add-profile TLS_web_client_authentication --certprofiles=IECUserRoles
      ACL name: TLS_web_client_authentication
      Description: CAACL for user web browsers authenticating to web servers using certificates issued by webclient-ca
      Enabled: TRUE
      CAs: webclient-ca
      Profiles: IECUserRoles
    -------------------------
    Number of members added 1
    -------------------------
  5. 使用 ipa caacl-mod 命令修改 CA ACL,以指定 CA ACL 适用于所有 IdM 用户:

    $ ipa caacl-mod TLS_web_client_authentication --usercat=all
    -----------------------------------------------
    Modified CA ACL "TLS_web_client_authentication"
    -----------------------------------------------
      ACL name: TLS_web_client_authentication
      Description: CAACL for user web browsers authenticating to web servers using certificates issued by webclient-ca
      Enabled: TRUE
      User category: all
      CAs: webclient-ca
      Profiles: IECUserRoles

    您可以直接使用新创建的 CA ACL。它默认在创建后启用。

注意

CA ACL 的作用是,可为来自特定主体或组的请求指定允许哪些 CA 和配置集组合。CA ACL 不会影响证书验证或信任。它们不会影响签发的证书的使用方式。