Preparing Keyfactor Command for the Gateway

Before you install the Keyfactor Windows EnrollmentClosed Certificate enrollment refers to the process by which a user requests a digital certificate. The user must submit the request to a certificate authority (CA). Gateway, you need to make sure certain configuration steps have been completed in your managed instance of Keyfactor Command to support using the gateway with Keyfactor Command.

To configure your Keyfactor Command instance to work with your gateway, in the Keyfactor Command Management Portal:

  1. Browse to System Settings → Security Roles and Claims and either create or review the security claim and role created for the Keyfactor APIClosed An API is a set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command. connection from the gateway (see Review Service Accounts for the Gateway).

    The service account that holds the API role and communicates with the managed instance of Keyfactor Command needs to be granted the following security role permissions in Keyfactor Command (see Security Role Operations):

    • Certificates > Enrollment > CSR
    • Certificate Authorities > Read
    • Certificate Templates> Read
    • Enrollment Patterns > Read
    • Security > Read
    • Workflows > Definitions > Read
    • Workflows > Instances > Read

      If you will be using workflows with manager approval required in Keyfactor Command.

    • Certificates > Collections > Read

      If you will be using workflows with manager approval required in Keyfactor Command.

    The service account that holds the API role needs to be added in Associated Roles on the enrollment pattern or patterns that will be used for enrollment in Keyfactor Command (see below).

  2. Browse to Locations → Certificate Authorities and create a certificate authorityClosed A certificate authority (CA) is an entity that issues digital certificates. Within Keyfactor Command, a CA may be a Microsoft CA or a Keyfactor gateway to a cloud-based or remote CA. record for each EJBCA CAClosed A certificate authority (CA) is an entity that issues digital certificates. Within Keyfactor Command, a CA may be a Microsoft CA or a Keyfactor gateway to a cloud-based or remote CA. that you will access via the gateway (see Add or Modify an HTTPS CA). In the configuration, be aware:

  3. On the Certificate Authorities page, configure the EJBCA CA for certificate synchronization and wait for the synchronization to complete (see Add or Modify an HTTPS CA).
  4. Browse to Locations → Certificate Templates and search for your EJBCA templates. If they don’t appear, you may need to use the Import Templates option (see Import Templates). Templates auto import periodically but may not have imported before you visit the page.

    Note:  When EJBCA templates are imported, their names follow this convention:
    • Short Name: <end entity profile name>_<certificate profile name>
    • Display Name: <end entity profile name> (<certificate profile name>)

    If the end entity profile name and certificate profile name are the same, only the end entity profile name is used.

    For example, if both names are Development Web Server, the Short Name and Display Name will both be Development Web Server.

    Only certificate profiles configured as available in a given end entity profile will be imported as templates associated with the given end entity profile name.

  5. On the Certificate Templates page, open the configuration for each EJBCA templateClosed A certificate template defines the policies and rules that a CA uses when a request for a certificate is received. that you will using for mapping in the gateway (see Create or Identify Templates and Enrollment Patterns), and configure the settings (see Edit). Do not turn on Private Key Retention.
  6. On the Enrollment Patterns page, create at least one enrollment pattern for each template you wish to use for enrollment and configure the settings (see Add or Modify an Enrollment Pattern). In the configuration, be aware:

    • To support the gateway, turn on CSR Enrollment. You do not need to turn on PFX Enrollment or CSR Generation.

    • Enrollments done through the Keyfactor Windows Enrollment Gateway send the local Active Directory certificate template information to Keyfactor Command as extension data. To support this feature, two configurations need to be done:

      • All enrollment patterns in Keyfactor Command that will be mapped to local templates in the gateway configuration need to be configured with an enrollment field in Keyfactor Command on the Enrollment Fields tab of the enrollment pattern configuration. The enrollment field should be of type String with the following Name:

        ExtensionData-1.3.6.1.4.1.311.21.7

        Figure 607: Configure an Extension Data Enrollment Field for Each Mapped Enrollment Pattern

        This configuration needs to be completed before a Keyfactor Command template will appear in the gateway configuration mapping tool.

        Important:  This setting makes it impossible to use the enrollment pattern directly in Keyfactor Command rather than through the gateway, since the enrollment would be expecting you to be able to provide this extension data. If you wish to do direct enrollments in Keyfactor Command for your EJBCA CA as well as through the gateway, you will need a separate set of enrollment patterns and templates on the local side and a separate set of certificate profiles in EJBCA that are not configured to submit extension data with the request.
      • A Custom Certificate Extension for certificate template information must be enabled in EJBCA and then configured on each EJBCA certificate profile you will be using in the gateway. For a Keyfactor-managed instance of EJBCA, this may be configured for you. ClosedShow EJBCA custom extension configuration information.

        Note:  If this configuration is not completed, you will see a warning in the gateway log on certificate enrollment of:

        The certificate was issued without template extension data.

        The gateway passes either the template name (for a version 1 template) or the template OIDClosed Object identifiers or OIDs are a standardized system for identifying any object, concept, or "thing" with a globally unambiguous persistent name. and version information (for version 2 and later templates) to Keyfactor Command using this extension data field.

    • On the Basic Information tab of each enrollment pattern, turn off the Use AD Permissions option and add the security role created for the Keyfactor API to the Associated Roles.

      Figure 610: Add the Service Account's Security Roles

Optional Configuration

You may need to make further configurations if you use either of the following special features in your environment: