New certificates are regularly requested via autoenrollment

Assume the following scenario:

  • A certificate template is configured for automatic request and issuance (autoenrollment).
  • Users or computers request new certificates at regular intervals and long before the defined renewal period.

Certification authority console, columns Request ID, Requester Name INTRA\rudi and Certificate Template "ADCS Labor Benutzer2": requests 111044 to 111047

In the certificate store of the user or computer in question, it is noticeable that no information about certificate templates of the certificates in question is displayed.

Certificates console: three certificates for Rudi Ratlos from ADCS Labor Issuing CA 1, column "Certificate Template" highlighted in yellow and empty

Cause

Do you know TameMyCerts? TameMyCerts is an add-on for the Microsoft certification authority (Active Directory Certificate Services). It extends the function of the certification authority and enables the application of rule sets to realize the secure automation of certificate issuance. TameMyCerts is unique in the Microsoft ecosystem, has already proven itself in countless companies around the world and is available under a free license. It can be downloaded via GitHub and used free of charge. Professional maintenance is also offered.

The triggers for an automatic certificate request through the autoenrollment process are:

  • When the user logs on (for computers, when the computer account logs on, i.e. at system startup).
  • By timer every 8 hours.
  • When Group Policy is updated, assuming there has been a change.

Task Scheduler: folder CertificateServicesClient, UserTask "Running", "Triggers" tab with Custom Trigger and "At log on"

The certificates are requested again because they do not include the "Certificate Template Information" extension. This extension is evaluated by the autoenrollment client to be able to determine whether a certificate already exists or whether a new one must be requested. If the extension does not exist, a new certificate request is made each time the autoenrollment process is called.

Most often, the cause can be found in the fact that the corresponding certificate extension has been disabled in the certification authority's policy module.

This can be determined with the following command line command.

certutil -getreg policy\DisableExtensionList

If the object identifier 1.3.6.1.4.1.311.21.7 (szOID_CERTIFICATE_TEMPLATE) appears in the list, it is not entered by the certification authority in issued certificates.

Command prompt: certutil -getreg policy\DisableExtensionList shows 1.3.6.1.4.1.311.21.10 Application Policies and 1.3.6.1.4.1.311.21.7 Certificate Template Information

The entry can be removed with the following command line command.

certutil -setreg policy\DisableExtensionList -1.3.6.1.4.1.311.21.7

Command prompt: certutil -setreg policy\DisableExtensionList -1.3.6.1.4.1.311.21.7 with the note "The CertSvc service may need to be restarted for changes to take effect."

The certification authority service must then be restarted for the changes to take effect.

Now the certificate extension should be re-entered into issued certificates.

Certificate dialog, "Details" tab: "Certificate Template Information" extension with Template=ADCS Labor Benutzer, Major Version Number=101, Minor Version Number=99

External sources: