Create or Identify Templates

The Keyfactor Cloud Gateway uses certificate templates stored in the local Active Directory that match certificate templates hosted in the managed forestClosed An Active Directory forest (AD forest) is the top most logical container in an Active Directory configuration that contains domains, and objects such as users and computers. to support 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). for certificates from the managed 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.. When you enroll for a certificate via the gateway, you make a request using the local Active Directory templateClosed A certificate template defines the policies and rules that a CA uses when a request for a certificate is received. and the corresponding managed forest certificate template is requested.

Templates are configured in the local environment and then are synchronized from the local environment to the managed environment. Templates for synchronization are selected in the gateway configuration wizard. Before you run the gateway configuration wizard, you need to create new or identify existing templates that will be synchronized to the managed environment.

Note:  Some configuration settings made to local templates are not synchronized to the cloud environment exactly as configured. For example, templates configured with a Subject Name set to Build from this Active Directory information in the local environment will be switched to Supply in the request in the cloud environment. This is done to support enrollment using Active Directory information supplied from the local environment rather than the cloud environment.
Creating Local Templates

If you have a Microsoft enterprise CA, you can easily create these templates using the Microsoft CA certificate templates MMC snap-in. If you don’t have a Microsoft enterprise CA, you can install the Microsoft Remote Server Administration Tools (RSAT) for Windows (see Add Remote Server Administration Tools) and use the Certificate Templates tool within this to manage templates. When you open the Certificate Templates tool for the first time (you’ll need to open it manually in an MMC or from the command line—certtmpl.msc—it does not appear on the menu), you’ll be offered the option to add the default templates into Active Directory. Doing so will create the necessary starter templates to work from. You can also create the necessary starter templates from the command line using this command:

certutil -installdefaulttemplates

Figure 689: Install Default Certificate Templates in Environments without a Microsoft CA

Note:  Keyfactor recommends using schema version 2 or later templates wherever possible.

Figure 690: Microsoft Template Schema Version

Template Attributes

The key attributes about templates that matter for the purposes of gateway enrollment are:

Template Permissions

The service account that the gateway is running as (by default, Network Service) needs read permissions on the templates that will be configured for enrollment from the local environment and users who will be enrolling need read and enroll permissions on these templates. The user completing the gateway installation needs read permissions on the templates from the local environment in order to complete the installation.

In a multi-domain environment, it's important to use the correct type of Active Directory group when assigning these permissions to allow permissions to be queried across domain boundaries. For more information about types of Active Directory groups, see:

The templates mapped to local templates must have CSRClosed A CSR or certificate signing request is a block of encoded text that is submitted to a CA when enrolling for a certificate. When you generate a CSR within Keyfactor Command, the matching private key for it is stored in Keyfactor Command in encrypted format and will be married with the certificate once returned from the CA. enrollment enabled in their default enrollment pattern. Permissions also need to be granted in Keyfactor Command for the gateway service account .