While many Active Directory environments use the default settings from 2003, other environments have adapted to enable new functionality, like Windows Hello for Business. To do so, the default Domain Controllers certificates and certificate templates need to be replaced, as they do not fulfill all of the requirements set out for them.
This blogpost shows how to issue the right certificates to Domain Controllers.
About Domain Controller Certificates
Domain Controllers use certificates for several purposes:
- To verify their identities as Domain Controllers for the Active Directory domain
- To provide smart card authentication
- To encrypt traffic when acting as a host offering the secure Lightweight Directory Access Protocol (LDAPS)
Optionally, they can use their certificates for IPSec communications.
All certificates used by Domain Controllers are stored in their local computer’s personal certificate stores.
History of recommended Domain Controller certificates
Throughout the history of Active Directory, several superseding certificate configurations have been issued to Domain Controllers. The Domain Controller certificate template, initially requested by Windows 2000 server-based Domain Controllers and issued by Windows 2000 Server-based CAs was superseded by the Domain Controller Authentication certificate template. Since Windows Server 2008, the Kerberos Authentication certificate template is recommended to issue to Domain Controllers.
The Domain Controller certificate template is a v1 template. It cannot be modified. The Domain Controller authentication certificate template is a v2 template. It can be modified, but does not support the new Microsoft Cryptographic API (CAPI) with the latest encryption and hashing algorithms. The Kerberos Authentication certificate is a v3 template. Unlike the v2 template, v3 templates and beyond can use the latest cryptographic abilities.
Since Windows Server 2012, v4 templates allow the option to Renew with the same key on the Request Handling tab of the properties for a certificate template.
LDAP and LDAPS are typically used by non-domain-joined devices and services. LDAPS provide encryption based on TLS, whereas LDAP doesn’t provide encryption of the traffic exchanged with the Domain Controller. For offering the secure Lightweight Directory Access Protocol (LDAPS), by default, a Domain Controller uses a self-signed certificate with a validity period of 1 year.
To provide a valid certificate for this purpose, a proper certificate should be enrolled. The Kerberos Authentication certificate template provides the necessary certificate for this purpose.
The Kerberos Authentication certificate template is recommended, as it includes both the Active Directory domain name and the Domain Controller’s fully qualified domain name as its subject and, by default, supports the following purposes:
- Server Authentication
- Client Authentication
- Smart Card Logon
- KDC Authentication
Windows Hello for Business
For Windows Hello for Business, a feature introduced in Windows 10, the built-in Kerberos Authentication certificate template needs to be updated to comply with the certificate template settings outlined in the Microsoft Docs.
The certificate templates that are superseded by the new certificate template are hard-coded for a Domain Controller to autoenroll. The enrollment for these certificates occurs, despite the lack of an autoenrollment policy. However, to have new certificate templates autoenroll, an autoenrollment policy needs to be created using Group Policy.
To issue Kerberos Authentication certificates to Domain Controllers, the Certification Authority (CA) needs to run Windows Server 2008 R2, or a newer version of Windows Server.
Certificate autoenrollment is a feature of enterprise Certification Authorities (CAs). It cannot be configured on a standalone CA.
For the steps below, sign in to the Enterprise CA with a domain account that is a member of the Enterprise Admins group.
To issue the necessary certificates for Windows Hello for Business, all Domain Controllers that request the new certificate template need to run Windows Server 2016, or a newer version of Windows Server.
To create a group policy object (GPO) and manage its settings, sign in to a system with the Group Policy Management Console installed with an account that is a member of the Domain Admins group, per Active Directory domain.
Specifying the right Certificate Template
Before enabling the certificate autoenrollment policy through Group Policy, configure the Kerberos Authentication certificate template to supersede the Domain Controller and Domain Controller Authentication certificate templates.
Perform these steps to do so:
- Press Start.
- Search for the Certification Authority management console or run certsrv.msc. The Certification Authority window appears.
- In the left navigation pane, expand the node representing the CA. Right-click the Certificate Templates node and select Manage from the context menu to manage certificate templates.
The Certificate Templates Console (certtmpl.msc) window appears.
- In the main pane, select the Kerberos Authentication certificate template.
- Right-click the certificate template and select Duplicate Template from the context menu.
The Properties of New Template window appears.
- On the Compatibility tab, make the following changes in the Compatibility Settings area:
- Change the value for Certification Authority to at least Windows Server 2008 R2, specifying the earliest Windows Server version acting as CA that will issue this certificate template. The Resulting changes pup-up window appears. Click OK to dismiss it.
- Change the value for Certification recipient to at least Windows 7 / Windows Server 2008 R2, specifying the earliest Windows Server version acting as clients that will request this certificate template. The Resulting changes pup-up window appears. Click OK to dismiss it.
- Navigate to the Subject Name tab.
- Make sure the settings for the certificate template’s subject name are configured as in the below screenshot:
- Navigate to the Cryptography tab.
- On the Cryptography tab, make the following changes:
- Change the Provider Category to Key Storage Provider.
This should change the Algorithm name to RSA and the value for Minimum key size to 2048. If it doesn’t, change it to these values.
- Change the value for Request hash to SHA256.
- Navigate to the Superseded Templates tab.
- Click the Add… button.
The Add Superseded Template pop-up window appears.
- Select the following certificate templates using the Shift button to select multiple templates:
- Directory Email Replication
- Domain Controller
- Domain Controller Authentication
- Kerberos Authentication
The Properties of New Template window closes.
The Enable Certificate Templates window appears.
With these steps completed, disable the superseded certificate templates.
Configuring the Domain Controllers for Autoenrollment
With the right Certificate Template present, we’ll now configure the group policy for autoenrollment. Any previously enrolled certificate based on the superseded certificate templates will be removed and replaced by a certificate, based on the new certificate template.
Certificate autoenrollment is based on Group Policy. Perform these steps to configure Group Policy settings for autoenrollment:
- Press Start.
- Search for Group Policy Management or run gpmc.msc.
The Group Policy Management window appears.
- In the left navigation pane, expand the Forest node.
- Expand the Domains node, and then navigate to the domain where you want to create the Group Policy object (GPO).
- Expand the domain name and select the Group Policy Objects node.
- Right-click the Group Policy Objects node and select New from the context menu.
The New GPO pop-up window appears.
- Enter the name for the GPO.
- Make sure that you don’t select Starter GPOs.
- Click OK to create the GPO.
- Locate the newly created GPO in the main pane.
- Right-click the GPO and select Edit from the context menu.
The Group Policy Management Editor window appears.
- Expand the Computer Configuration node.
- Expand the Policies node.
- Expand the Windows Settings node.
- Expand the Security Settings node.
- Select the Public Key Policies node.
- In the main pane, right-click the Certificate Services client – Auto-Enrollment setting and select Properties from the context menu.
The Certificate Services client – Auto-Enrollment Properties window appears.
- Change the setting for the Configuration Model: setting to Enabled.
- Select the Renew expired certificates, update pending certificates, and remove revoked certificates option.
- Select the Update certificates that use certificate templates option.
- Click OK to save the Group Policy setting and close the Certificate Services client – Auto-Enrollment Properties window.
- Close the Group Policy Management Editor window.
- In the Group Policy Management window, in the left navigation pane, select the Domain Controllers OU.
- Right-click the Domain Controllers OU and select Link an Existing GPO… from the context menu.
The Select GPO pop-up window appears.
- Select the newly created GPO from the list of Group Policy objects:.
- Click OK.
As the group policy setting is enabled within the Computer Configuration part of the GPO, the Domain Controller will automatically enroll certificates that are configured for autoenrollment, when:
- The server reboots
- A group policy background refresh occurs
- When you perform the following command: certutil.exe –pulse
Update your Domain Controllers to the 20s and create a Certificate Template that allows the Windows Hello for Business hybrid scenarios.