thalese-security microsoftadcs...

31
Thales e-Security Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 www.thalesesecurity.com

Upload: vomien

Post on 30-Jul-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Thales e-Security

Microsoft AD CS and OCSPIntegration Guide for Microsoft Windows Server 2016

www. t ha lesesecur it y . com

Page 2: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Version: 1.4.3

Date: 19 December 2017

Copyright 2017 Thales UK Limited. All rights reserved.

Copyright in this document is the property of Thales UK Limited. It is not to be reproduced, modified,adapted, published, translated in any material form (including storage in any medium by electronicmeans whether or not transiently or incidentally) in whole or in part nor disclosed to any third partywithout the prior written permission of Thales UK Limited neither shall it be used otherwise than for thepurpose for which it is supplied.

Words and logos marked with ® or ™ are trademarks of Thales UK Limited or its affiliates in the EUand other countries.

Information in this document is subject to change without notice.

Thales UK Limited makes no warranty of any kind with regard to this information, including, but notlimited to, the implied warranties of merchantability and fitness for a particular purpose. Thales UKLimited shall not be liable for errors contained herein or for incidental or consequential damagesconcerned with the furnishing, performance or use of this material.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 2

Page 3: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

ContentsChapter 1: Introduction 5

Product configurations 5

Supported Thales nShield functionality 5

Requirements 5

This guide 6

More information 6

Chapter 2: Procedures 7

Installing the HSM 7

Installing the software and creating or sharing the Security World 7

Installing and configuring AD CS 8

Configuring auto-enrollment group policy for a domain 9

Configuring the Thales nShield HSM with Certificate Services 10

Configuring Certificate Services with a new key 10

Configuring Certificate Services using an existing private key 10

Configuring Certificate Enrollment to use CA templates on the AD CS Server 11

Setting up key use counting 12

Key use counter overview 12

Installing Certificate Services with key use counting 12

CA Backup, migrate and restore 13

Backing up, migrating and restoring CA using an existing certificate and its associated privatekey 14

Backing up, migrating and restoring the CA using an existing private key 16

Installing the OCSP 17

Configuring the CA to issue an OCSP Response Signing Certificate 18

Configuring certificate templates for your environment 18

Configuring the CA to support theOnline Responder service 19

Requesting a certificate from OCSP Response Signing template 20

Verifying that the signing certificate is properly configured 20

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 3

Page 4: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Modifying the Online Responder service to use a Thales HSM 20

Setting up a revocation configuration 20

Verifying that OCSP works correctly 22

Generating a certificate request 22

Removing information about the certificate's CRL 23

Retrieving information about the certificate's AIA, CRLs, and OCSP 23

Verifying the OCSP Server is Active 24

Uninstalling AD CS and OCSP 24

Chapter 3: Troubleshooting 25

Appendix A: Installing and configuring AD CS on Windows Server Core 26

Verifying that the CA service has started successfully 27

Appendix B: Installing and configuring AD CS via PowerShell 28

Internet addresses 30

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 4

Page 5: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 1: Introduction

Chapter 1: IntroductionMicrosoft Active Directory Certificate Services (AD CS) provides the functionality for creating andinstalling a Certificate Authority (CA). The CA acts as a trusted third-party that certifies the identity ofclients to anyone who receives a digitally signed message. The CA may issue, revoke, and managedigital certificates.

The Online Responder is a Microsoft Windows Service that implements the Online Certificate StatusProtocol (OCSP) by decoding revocation status requests for specific certificates. The service providesup-to-date validation of certificates, and sends back a signed response containing the requestedcertificate status information. OCSP is used to provide real-time information about a certificate'sstatus.

The CA and OCSP use the Thales nShield Hardware Security Module (HSM) to protect their privatekeys.

Note: Throughout this guide, the term HSM refers to nShield® Solo™ modules (nShield PCIe andSolo XC), nShield Connect™, and nShield Edge™ products.

They also use the HSM for important operations such as key generation, certificate signing, and CRLsigning. The Thales HSM can can be configured to protect the private keys and meet FederalInformation Processing Standards (FIPS) 140-2 level 2 or level 3.

Product configurationsWe have successfully tested Thales HSM integration with Microsoft Windows Server 2016 (Standard,Datacenter and Server Core editions) and Microsoft AD CS in the following configurations:

Thales SecurityWorld Software

version

nShieldSolosupport

nShield Solo+/XC support

nShieldConnect +/XC support

nShieldEdgesupport

12.40.2 No Yes Yes No

Supported Thales nShield functionalitySoft cards — Key management Yes FIPS 140-2 level 3 YesKey recovery Yes Module-only key Yes K-of-N card set YesLoad balancing Yes Key import Yes Fail over Yes

Note: CA failover clustering is only supported with network attached HSMs (nShield Connect).

RequirementsBefore installing the software, we recommend that you familiarize yourself with the Microsoft AD CSand OCSP documentation and setup processes, and that you have the Thales nShield documentation

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 5

Page 6: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

This guide

available. We also recommend that you have an agreed organizational Certificate PracticesStatement and a Security Policy/Procedure in place covering administration of the PKI and HSM.

In particular, these documents should specify the following aspects of HSM administration:

l The number and quorum of Administrator Cards in the Administrator Card Set (ACS), and thepolicy for managing these cards

l Whether the application keys are protected by the module or an OCSl The number and quorum of Operator Cards in the OCS, and the policy for managing these cardsl Whether the Security World should be compliant with FIPS 140-2 level 3l Key attributes such as the key size and time-outl Whether there is any need for auditing key usagel Whether to use the Thales Cryptographic Service Providers for Microsoft Cryptographic API: NextGeneration (CNG) or CryptoAPI (CAPI)

l Whether to initialize the nShield Security World as Recoverable; this is highly recommended.

Note: We recommend that you use CNG for full access to available features and better integrationwith Windows Server 2016.

This guideThis guide describes how to configure AD CS and OCSP with the Thales nShield Hardware SecurityModule (HSM), and set up a root CA. We have tested the instructions, which provide astraightforward integration process. There may be other untested ways to achieve interoperability.This guide might not cover every step of the hardware and software setup process.

This guide assumes that you are familiar with the Thales HSM documentation and the setup process forAD CS and OCSP. For more information about installing the AD CS and OCSP, refer to the Microsoftdocumentation.

More informationl For more information about OS support, contact your Microsoft sales representative or ThalesSupport.

l For more information about contacting Thales, see Addresses at the end of this guide.l Additional documentation produced to support your Thales product is in the document directory ofthe CD-ROM or DVD-ROM for that product.

l For more information about HSM administration, refer to the User Guide for the HSM.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 6

Page 7: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 2: Procedures

Chapter 2: ProceduresInstalling the HSMInstall the HSM using the instructions in the Hardware Installation Guide for the HSM. We recommendthat you install the HSM before configuring the Security World Software, and before installing andconfiguring AD CS and OCSP.

If you already have an HSM installed and a Security World configured, proceed to Installing andconfiguring AD CS on page 8.

Installing the software and creating or sharing the Security WorldTo install the Security World Software and create the Security World:

1. Install the latest version of the Security World Software as described in the User Guide for theHSM.Note: We recommend that you always uninstall any existing Security World Software before

installing the new Security World Software.2. Initialize a Security World as described in the User Guide for the HSM.

Note: You can also use the CSP Install Wizard or the CNG Configuration Wizard to create aSecurity World for nShield Solo and nShield Edge HSMs. For nShield Connect, werecommend that you use the front panel user interface to create the Security World.

3. Register the Cryptographic Service Providers that you intend to use.Note: For CAPI on 64-bit Windows, both 32-bit and 64-bit CSP Install Wizards are available. If

you intend to use the CAPI CSPs from both 32-bit and 64-bit applications, or if you areunsure, run both wizards. The CNG Configuration Wizard registers the CNG Providersfor use by both 32-bit and 64-bit applications where relevant. For detailed information onregistering the CAPI CSPs or CNG Providers, refer to the User Guide for the HSM.

4. If you are installing OCSP on a different server to the CA, install the Security World Software onboth servers (as described in the User Guide for the HSMs) and share the Security World bycopying the %NFAST_KMDATA%\local directory from the CA server to the OCSP server. See theUser Guide for more information.Note: You can also have the Security World files in a shared network location which can be

accessed by both the CA and OCSP server.5. If you are going to use Key Counting using the nCipher CNG/KSP with the CA, you need to set

a Registry value . The Registry container is HKLM\Software\nCipher\CryptoNG\ and theRegistry Key is UseCountEnabled which must be set to 1.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 7

Page 8: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Installing and configuring AD CS

Installing and configuring AD CSNote: Pool mode can be configured using the relevant CNG or CAPI wizards either during the

creation of a new Security World or using and selecting to use an existing Security World.To enable pool mode using the CNG wizard:

1. Launch the CNG configuration wizard and go to the Enable HSM Pool Mode screen.Select the checkbox Enable HSM Pool Mode for CNG Providers.

To enable pool mode using the CSP wizards:

1. Select 32bit CSP install wizard or 64bit CSP install wizard (depending on the platformin use).

2. Launch the 32bit CSP install wizard or the 64bit CSP install wizard and go to theEnable HSM Pool Mode screen. Select the checkbox Enable HSM Pool Mode for CAPIProviders.

To install and configure Microsoft AD CS:

1. Click Start > Server Manager to open Server Manager.2. Click Manage, then click Add Roles & Features. The Before you begin window opens. Click

Next.3. On the Select installation type window, make sure the default selection of Role or Feature

Based Installation is selected and click Next.4. On Server selection, select a server from the server pool and click Next.5. On the Select server roles window, select the Active Directory Certificate Services role.6. When prompted to install Remote Server Administration Tools click Add Features, then click

Next.7. On the Select features window, click Next.8. On the Active Directory Certificate Services window, click Next.9. On the Select role services window, the Certification Authority role is selected by default. Click

Next.10. On the Confirm installation selections window, verify the information and click Install.11. When the installation is complete, click Configure Active Directory Certificate Services on the

destination server link.12. On the Credentials window, make sure that Administrator's credentials is displayed in the

Credentials box. If not, click Change and specify the appropriate credentials. Click Next.13. On the Role Services window, select Certification Authority. This is the only available selection

when the certification authority role is installed on the server. Click Next.14. On the Setup Type window, select the appropriate CA setup type for your requirements. Click

Next.15. On the CA Type window, Root CA is selected by default. Click Next.16. On the Private Key window, leave the default selection to Create a new private key selected.

Click Next.17. On the Cryptography for CA window, select the appropriate Thales cryptographic provider

along with the key type, key length and suitable hash algorithm:l RSA # nCipher Security World Key Storage Providerl ECDSA_P256 # Security World Key Storage Providerl ECDSA_P384 # Security World Key Storage Providerl ECDSA_P521 # Security World Key Storage ProviderMake sure the Allow administrator interaction when the private key is accessed by the CAcheck box is ticked

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 8

Page 9: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 2: Procedures

Click Next.18. On the CA Name window, give the appropriate CA name and click Next.19. On the Validity Period window, enter the number of years for the certificate to be valid and click

Next20. On the CA Database window, leave the default locations for the database and database log

files. Click Next.21. On the Confirmation window, click Configure.22. If you select nCipher cryptographic service provider on the Cryptography for CA window, the

nCipher key storage provider-create a key wizard prompts you to create a new key. Click Nextand On. Select a way to protect the new key. Click Next. Follow the subsequent instructions beprepared to present, the ACS quorum and then the OCS quorum and enter the applicable pass-phrases. Close the wizard.The Progress window opens during the configuration processing, then the Results windowopens. Click Close. If the Installation progress window is still open, click Close on that windowalso.

23. Verify that the CA service has started successfully by running the following command on thecommand line. Use Windows key + R to open the Run dialog, and type cmd to open the commandprompt. Run the command:

>sc query certsvc

SERVICE_NAME: certsvc

TYPE : 110 WIN32_OWN_PROCESS (interactive)

STATE : 4 RUNNING

(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)

WIN32_EXIT_CODE : 0 (0x0)

SERVICE_EXIT_CODE : 0 (0x0)

CHECKPOINT : 0x0

WAIT_HINT : 0x0

Configuring auto-enrollment group policy for a domainTo complete the integration procedures, you must configure auto-enrollment as a group policy:

1. On the domain controller, click Start > Administrative Tools > Group Policy Management.2. Go to Forest, select your Domain and expand it.3. Double-click Group Policy Objects in the forest and domain containing the Default Domain Policy

Group Policy object (GPO) that you want to edit.4. Right-click the Default Domain Policy GPO, and then click Edit.5. In the Group Policy Management Editor, click Computer Configuration > Policies > Windows

Settings > Security Settings > Public Key Policies.6. Double-click Certificate Services Client - Auto-Enrollment.7. In Configuration Model, click Enabled to enable auto-enrollment. Select the following check

boxes:n Renew expired certificates, update pending certificates, remove and revoke certificates.n Update certificates that use certificate template.

8. Click Apply and OK to accept your changes and close the Editor.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 9

Page 10: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Configuring the Thales nShield HSM with Certificate Services

Configuring the Thales nShield HSM with Certificate Services

Configuring Certificate Services with a new keyTo install the Certificate Server using the Thales HSM Key Storage Provider (KSP):

1. Install and configure the Thales HSM hardware and software as described in the section Installingthe software and creating or sharing the Security World on page 7.

2. Install Microsoft Active Directory Certificate Services as described in the section Installing andconfiguring AD CS on page 8, with the following settings:n In the Private Key window, click Create a new private key and click Next.n Continue the CA setup as described in the section Installing and configuring AD CS on page8.

Configuring Certificate Services using an existing private keyTo install the Certificate Server using the Thales HSM KSP with an existing HSM private key:

1. Install and configure the Thales HSM hardware and software as described in the section Installingthe software and creating or sharing the Security World on page 7.

2. Install Microsoft Active Directory Certificate Services as described in the section Installing andconfiguring AD CS on page 8.

3. In the Private Key window, select Use existing private key and then Select an existing privatekey on this computer. Click Next.

4. In the Select Existing Key window, click Change.5. In the Change Cryptographic Provider window, select the CSP that contains the created key.

Delete the contents of the field CA common name, and click Search. The search finds theexisting private key. Select the key, then select Allow administrator interaction when theprivate key is accessed by the CA. Click Next.

6. In the Cryptography for CA window, select the appropriate hash algorithm and click Next.7. In the CA Name window, click Next.8. In the Validity Period window, specify the validity period and click Next.9. In the CA Database window, specify the certificate database locations and certificate database

log locations and click Next.10. In the Confirmation window, click Configure.11. Wait for the configuration to complete. After successful completion, close the AD CS

configuration window.12. Verify that the CA service has successfully started by running the command:

>sc query certsvc

13. Verify the CA key by running the command:

>certutil -verifykeys

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 10

Page 11: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 2: Procedures

Configuring Certificate Enrollment to use CA templates on the ADCS ServerTo integrate the CA certificate enrollment functionality with a Thales HSM generated CA private key:

1. Create a CA template that uses the Thales HSM KSP:a. Run certtmpl.msc.b. Right-click the Administrator template, and select Duplicate Template. The Properties

window opens, showing Compatability tab.c. Select Windows Server 2016 Under Certificate Authority and Certificate Recipient drop-

down box.d. Click the General tab. In Template display name, type a name for the template.e. Click the Request Handling tab, and in Purpose select Signature and click Yes to confirm

changes to the certificate purpose.f. Deselect Allow private key to be exported.g. Click the Cryptography tab and in the Provider category select Key storage provider.h. In Algorithm Name, select an ECC or RSA algorithm.i. Click Requests must use one of the following providers and in Providers, select nCipher

Security World Key Storage Provider only;j. In Request Hash, select a hash type.k. Click Subject Name tab and deselect Include e-mail name in subject name and deselect

E-mail name.l. Click Apply and OK to save the template settings and close the Certificate Templateconsole.

2. Run certsrv.msc.3. In the left-hand pane, double-click the CA name.4. Make sure the RpcLocator service is running and then run certsrv.msc.5. Right-click the Certificate Template node and select New > Certificate Template to Issue.6. Select the template you just created, and click OK.7. Request a certificate based on the template:

a. Run certmgr.msc.b. In the left-hand pane, right-click the Personal node, and select All Tasks > Request New

Certificate.c. Click Next and Next to pass through the first two windows.d. Select the template that you created, and click Enroll.e. The Key Storage Provider window appears. Click Next.f. Insert the Administrator card when prompted.g. Highlight the required OCS on the Select operator card set to protect the key with

window, and click Finish. Be prepared to present the Operator card.h. Select the type of protection you want to use, and click Next.i. If OCS is selected, select the OCS from the Card sets pane, and click Finish.

Note: If passphrase authentication is enabled, a prompt for passphrase appears.8. Verify that the certificate is enrolled successfully. If the certificate fails to enroll, the following

error is displayed:

Error: the RPC server is unavilable. 0x800706ba (win32: 1722 RPC_S_SERVER_UNAVAILABLE

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 11

Page 12: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Setting up key use counting

The enrollment wizard shows if the certificate enrollment was successful or failed. Use the Detailsbutton to check the main information.

Setting up key use counting

Key use counter overviewSetting up key use counting is optional. If you require key use counting, follow the proceduresdescribed in this section. The procedures described in this section do not apply to most setups.

Note: If you do not follow the procedures described in this section, key use counting is not installed.You cannot add key use counting to a key retrospectively.

The key use counter audits usage of the CA signing key. It maintains a count of how many times thekey has been used. The key use counter should only be used with a root CA that has a low volume ofsignings where the count can be logged immediately before servicing a signature request and afterthe signature request has been serviced. This ensures that any illicit use of the CA is revealed throughdiscrepancies in the counter log.

Note: Note the following information about the key use counter:

l The counter is in the NVRAM of the HSM. To access the key count value in NVRAM, users mustpresent the ACS to the HSM.

l The counter is a 64-bit integer counter associated with a single private key.l The counter is started at zero.l If the maximum count is reached, the counter restarts at zero.l The counter can exist only on one HSM. If more than one HSM is attached to the server, you mustchoose which HSM stores the counter.

l If the module firmware is upgraded, the counter value is lost.l The key counter can only be set at HSM initialization, it cannot be activated after deployment.

Installing Certificate Services with key use countingTo install Certificate Services with key use counting:

1. If it is not already on your system installation, create the file %SystemRoot%\capolicy.inf (where%SystemRoot% is the system environment variable for the Windows installation folder, by defaultC:\WINDOWS\capolicy.inf) with the following content:

[Version]

Signature="$Windows NT$"

[certsrv_server]

EnableKeyCounting=True

Note: You must create the capolicy.inf file before Certificate Services is installed.2. Install the CA using the HSM KSP.3. Enable auditing for the CA service by running the command:

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 12

Page 13: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 2: Procedures

>certutil -setreg ca\auditfilter 1

4. Right-click the CA and click Properties.5. Click the Auditing tab and check the box for Start and Stop Active Directory Certificate

Services.6. Select Start > Administrative Tools > Local Security Policy.7. Go to Local Policy, expand it and select Audit Policy.8. In the right pane, double-click Audit Object Access and select Success and Failure.9. Click Apply and then OK, then close the window.10. Update the local security policies by opening a command prompt and running the command:

>gpupdate.exe /force

11. Restart the CA service to pick up the changes, by running the commands:

>net stop certsvc

>net start certsvc

12. Run Eventvwr.exe.13. Select Windows Logs > Security.14. Filter for event ID 4881 (CA startup event) or event ID 4880.15. Verify the CA startup event shows the PrivateKeyUsageCount property with a corresponding

value. Make a note of this value.16. Restart the Certificate Server, by running the commands:

>net stop certsvc

>net start certsvc

17. Verify that the event viewer contains a new CA startup event (event ID 4881).18. Make a note of the PrivateKeyUsageCount property value.

CA Backup, migrate and restoreThe most common procedure related to backup, migrate and restore for the CA and HSM is to use theoptions:

l Select a certificate and use its associated private key.l Select an existing private key.

This procedure describes backing up the CA / HSM data on an existing server and then restoring theCA / HSM data onto a new server. Thales have successfully tested this procedure in the followingconfigurations:

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 13

Page 14: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Backing up, migrating and restoring CA using an existing certificate and its associated private key

l Windows Server 2008 SP2 Enterprise 64-bit (CNG) to Windows Server 2012 (CNG)l Windows Server 2008 R2 SP1 Enterprise 64-bit (CNG) to Windows Server 2012 (CNG)l Windows Server 2008 R2 SP1 Enterprise 64-bit (CNG) to Windows Server 2012 R2 (CNG)l Windows Server 2012 (CNG) to Windows Server 2012 R2 (CNG)

Note: If your existing CA is using a custom CAPolicy.inf file, you should copy the file to the newplanned CA server. The CAPolicy.inf file is located in the %SystemRoot% directory, which isusually C:\Windows.

Backing up, migrating and restoring CA using an existing certificate and itsassociated private keyNote: For this procedure your CA must be protected with module-only protection or 1/N OCS

without passphrase as key protection method.

To back up the CA and HSM data on the existing server (machine #1), and then migrate the CA andHSM onto a new server (machine #2):

On machine #1:

1. Back up the CA database by running the command:

>certutil -config <CA_config_string> -backupdb <BackupDirectory>

2. Export the certificate on machine #1:a. Run mmc.b. In the console, go to File > Add/Remove Snap-in.c. Select the Certificates tab and click Add.d. The certificate snap-in window opens. Select Computer Account and click Next.e. Keep the default selection and click Finish, then click OK.f. Go to the directory Trusted Root Certificates > Certificates.g. Right-click the CA certificate, and click All Tasks > Export, then click Next.h. Select Base-64 encoded X.509 (.CER), and click Next.i. Specify the path and file name to save the certificate, and click Next.j. Click Finish.k. Click OK to close the export success message.

3. Back up the contents of the Security World data from the following location:C:\ProgramData\nCipher\KeyManagement Data\local.

4. Uninstall the CA from machine #1.

On machine #2:

1. Copy the backed-up Security World data on the following path on machine #2:C:\ProgramData\nCipher\KeyManagement Data\local.

2. Load the Security World onto the HSM on machine #2, by running the command:

>new-world -l

For more information about loading a Security World, refer to the User Guide for the HSM.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 14

Page 15: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 2: Procedures

3. Run the CNG Configuration Wizard.Note: If selecting operator card set protection, do not check Always use the wizard when

creating or importing keys.4. Copy and install the X.509 certificate into the local user Trusted Root CA Store on machine #2:

a. Right-click the certificate, and click Install.b. Click Next.c. Select Place all certificates in the following store, and click Browse.d. Select Trusted Root Certification Authorities, and click OK.e. Click Next.f. Click Finish.g. Click OK to close the import success message.

5. Install the certificate into my store, by running the following command from the console:

>certutil -addstore my <certificate name>

A success message appears.6. Repair the certificate store by running the following command from the console:

>certutil -f -repairstore -csp "nCipher Security World Key Storage Provider" my "<cert

serial number>"

7. Click Start > Server Manager to open Server Manager.8. Install and configure the CA as described in the section Installing and configuring AD CS on

page 8.9. Install and configure AD CS with the following settings:

a. In the Set Up Private Key window, select Use existing private key and then Select acertificate and use its associated private key .

b. In the existing Certificate window, the imported certificate is shown. Select the certificateand select Allow administrator interaction when the private key is accessed by the CA.Click Next.

c. If your CA is protected with OCS protection with passphrase, then the certificate is notdisplayed in the certificate section. You must remove the passphrase of the operator cardsetin order to view the CA certificate in the certificate section.

d. In the Certificate Database window click Next.e. In the Confirmation window click Configure.

10. When the CA installation is complete, click Close in the installation results window.11. Copy the backed-up CA database data onto machine #2.12. Run the command:

>certutil -shutdown

13. On machine #2, restore the CA database by running the command:

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 15

Page 16: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Backing up, migrating and restoring the CA using an existing private key

>certutil.exe -f -restoredb <BackupDirectory>

14. Restart the CA by running the command:

>net start certsvc

15. Verify that the CA service has started successfully by running the command:

>sc query certsvc

Backing up, migrating and restoring the CA using an existing private keyTo back up the CA and HSM data on the original server (machine #1), and then migrate the CA/HSMon a new server (machine #2):

On machine #1:

1. Back up the CA database by running the command:

>certutil -config <CA_config_string> -backupdb <BackupDirectory>

2. Back up the Security World data and the private key, which are found inC:\ProgramData\nCipher\Key Management Data\local. For more information about backing up aSecurity World, refer to the User Guide for the HSM.

3. Uninstall the CA from machine #1.

On machine #2:

1. Copy the backed-up Security World data and the private key to C:\ProgramData\nCipher\Key

Management Data\local on machine #2.2. Load the Security World onto the HSM on machine #2, by running the command:

>new-world -l

For more information about loading a Security World, refer to the User Guide for the HSM.3. Run the CNG Configuration Wizard and select Use existing Security World.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 16

Page 17: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 2: Procedures

4. Install Microsoft Active Directory Certificate Services with the following settings:a. In the Private Key window, select Use existing private key and use existing private key

on this computer. Click Next.b. In the Select Existing Key window, click Change. The Change Cryptographic Provider

window opens.c. Select the CSP that contains the created key. Delete the contents of the field CA common

name, and click Search. The search results should find the existing private keyd. Select the key that you generated on machine #1, click Allow administrator interaction

when the private key is accessed by the CA, and click Next.e. On the Cryptography for CA window, click Next.f. In the CA name window, click Next.g. In the Validity Period window, specify the validity period and click Next.h. In the Certificate Database window, specify the certificate database location and click

Next.i. On the Confirmation window, click Configure.j. In the Installation Results window, click Close.

5. Copy the backed-up CA database data onto machine #2.6. Run the command:

>certutil -shutdown

7. On machine #2, restore the CA database by running the command:

>certutil.exe —f —restoredb <BackupDirectory>

8. Restart the CA by running the command:

>net start certsvc

9. Verify that the CA service has started successfully by running the command:

>sc query certsvc

Installing the OCSPNote: If you are installing OCSP on a different server from the CA, see Installing the software and

creating or sharing the Security World on page 7 for instructions on sharing the SecurityWorld.

To install Online Responder Services:

1. Open Server Manager. Select Start > Server Manager.2. Click Manage and then click Add Roles & Features.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 17

Page 18: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Configuring the CA to issue an OCSP Response Signing Certificate

3. Before you begin window appears. Click Next.4. On the Select installation type window, make sure the default selection of Role or Feature

Based Installation is selected. Click Next.5. On Server selection, select a server from the server pool and click Next.6. On the Select server roles window, select the Active Directory Certificate Services role.7. Expand the Roles section (in the left-hand section) and click Online Responder.8. Click Add Feature, then click Next.9. On Select Feature window click Next.10. OnWeb Server Role Screen click Next.11. On Role Service Screen keep the default selection and click Next, then click Install.12. When the installation completes, click the Configure Online Responder link.13. Tick the check box for Online Responder and then click Configure.

Click Next.The Progress window is displayed during the configuration processing.The Results window appears.

14. Click Close. If the Installation progress window is still open, click Close on that window also.

Configuring the CA to issue an OCSP Response Signing CertificateThis section describes how to update the OCSP certificate template for use with the key storageprovider CNG. This procedure assumes you have an Enterprise CA installed.

Configuring certificate templates for your environment1. Go to Start > Run.2. In the run dialog type mmc and click OK.3. In the mmc console that appears go to File > Add/Remove Snap-in4. In the Add or Remove Snap-Ins dialog box that appears find and click the Certificate Templates

snap-in.5. Click Add and then click OK.6. Under Console Root expand Certificate Templates snap-in. All the available certificate templates

that you can issue with your CA are listed in the middle section.7. Scroll down the list until you locate the OCSP Response Signing template. Right-click the OCSP

Response Signing template and click Properties.8. In the popup dialog that appears click the Security tab and click Add.9. In the Select User, Computers, or Groups dialog that appears type the name of the machine that

is hosting the Online Responder service. Click OK.The machine is not immediately located. Another dialog appears.

10. In this dialog click Object Types and make sure the check box next to Computers is checked.Click OK.

11. Re-enter machine name in the Select User, Computers, or Groups dialog if it is not alreadythere. Click OK.The machine hosting the Online Responder is added to the Group and user names area underthe Security tab.

12. Click the machine name in the Group and user names area and under the Permissions areagive all permissions to machine and click Apply.

13. Click Request Handling tab and make sure that both Authorize additional service accounts toaccess the private key and Allow private key to be exported are disabled.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 18

Page 19: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 2: Procedures

14. Click the Cryptography tab. Select the algorithm, hash and key size you want to use from theAlgorithm Name drop-down combo box. We recommend that you choose the same algorithm asyour CA is using, although you can use any.

15. Below the combo box are two radio buttons: select Requests must use one of the followingproviders.

16. Check the box that opens next to the nCipher Security World Key Storage Provider entry. ClickApply.

17. Select the Subject Name tab.The radio button Build this from Active Directory Information is selected. If the followingoptions are displayed:l E-maill DNS namel User principal name (UPN)l Service principal name (SPN)Make sure that only Service Principal Name (SPN) is checked.

18. Uncheck any other checked boxes. Click Apply and then OK.

Note: To use CAPI CSP, make a copy of an OCSP response signing template. From theCryptographic tab, under the provider category, select Legacy Cryptographic ServiceProvider. Then, select Request must use one of the following providers and checknCipher Enhanced Cryptographic Provider.

Configuring the CA to support the Online Responder service1. Run certsrv.msc.2. Navigate to your CA.3. Right click on the CA and click Properties.4. Select Extensions tab. In the Select extension list, click Authority Information Access (AIA).5. Click Add and in the Add Location dialog box type under Location http://machinename/ocsp.

Click OK.6. On the Extensions tab make sure the URL that was just added to the locations area is

highlighted. Then make sure the check boxes next to Include in the AIA extension of issuedcertificates and Include in the online certificate status protocol (OCSP) extension are ticked.

7. Click Apply, let the service restart, then click OK.

Note: To restart the service, you will need to present the CA OCS to the HSM.

8. In Certification Authority, right-click Certificate Templates, and then click New CertificateTemplates to Issue.

9. Select your CA and in the right hand pane and right click on Certificate Templates.

10. In Enable Certificates Templates, select the OCSP Response Signing template and any othercertificate templates that you configured previously, and then click OK.

11. Open Certificate Templates in the Certification Authority and verify that the modified certificatetemplates appear in the list.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 19

Page 20: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Requesting a certificate from OCSP Response Signing template

Requesting a certificate from OCSP Response Signing template1. Go to Run, and type cmd to open the command prompt. Run the command:

> certutil -pulse

2. Go to Run, type mmc and click OK.3. In the mmc console that appears, select File > Add/Remove Snap-in.4. In the Add or Remove Snap-Ins pop-up dialog that appears, find the Certificates snap-in (under

the Available snap-ins section).5. Click the snap-in and click Add.6. In the dialog that appears, check the Computer Account radio button, and then click Next.7. In the Select Computer dialog, make sure that Local Computer is selected and click Finish. Then

click OK.8. Under the Console Root, expand the Certificates heading.9. Select the Personal folder and expand it.10. Right-click Certificates and select All Tasks > Request New Certificate.11. On the Before You Begin page click Next.12. On the Select Certificate Enrollment Policy page click Next.13. On the Request Certificates page select OCSP Response Signing template and click Enroll.14. When prompted present, the ACS quorum and then the OCS quorum and enter the applicable

pass-phrases. 15. On the Certificate Installation Results page select Finish.

Verifying that the signing certificate is properly configured1. Select the Personal folder and expand it.2. Select the Certificates folder. In the right-hand pane, an OCSP certificate appears.3. Right-click the certificate and click Properties.4. A dialog box appears. On the General tab under Certificate Purposes select Enable Only for

the following purposes, make sure the check box for OCSP is ticked. Click Apply and then OK.

Modifying the Online Responder service to use a Thales HSM1. Run Services.2. Locate the Online Responder Service in the list of services.3. Right-click the Online Responder Service and select Properties.4. In the dialog box that appears select the Log on tab.5. Under the Log on as heading, click the radio button next to Local System account. The heading

Allow service to interact with desktop becomes active with a check box next to it.6. Select the check box. Click Apply, then OK.7. From the Services window, right-click Online Responder Service and restart the service.

Setting up a revocation configurationA revocation configuration is needed to respond to status requests about certificates that have beenissued by a specific CA. Revocation configuration settings include:

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 20

Page 21: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 2: Procedures

l The CA certificatel The signing certificate for the online responderl The locations that clients can send their requests to

To set up a revocation configuration:

1. Open the Server Manager Dashboard and from the Tools menu select Online ResponderManagement.

2. Click Start and click Online Responder Management.3. In the left-hand pane click Revocation Configuration.4. In the right-hand pane under Actions click Add Revocation Configuration.5. Click Next on the Getting started with adding a revocation configuration section.6. In the Name the Revocation Configuration section, type a name for the configuration in the text

box. (For this example we use Test). Then click Next.7. In the Select CA Certificate Location section make sure the Select a certificate for an Existing

enterprise CA radio button is checked and click Next.8. In the Choose CA Certificate section make sure the Browse CA certificates published in Active

Directory radio button is selected and then click Browse.9. In the Select Certification Authority dialog box select the CA and click OK then Next.10. In the Select Signing Certificate section ignore the default settings and make sure the Manually

select a signing certificate radio button is selected. Click Next.11. If you are installing OCSP on a different server to the CA:

Note: Follow the details provided below (a through to e) to install the OCSP on a different serverto the CA. If the OCSP is on the same server as the CA just click FINISH.

a. On the Revocation Provider section click on Provider tab. The Revocation ProviderProperties dialog is displayed.

b. Under Base CRLs, click Add.c. Enter http://<OCSP hostname>/ocsp/<CA-name>.crl in the Open URL dialog box and click

OK.d. Under Base CRLs, select the above URL, click Move Up and then click OK.e. Copy the CRL files from the c:\Windows\System32\certsrv\CertEnroll folder of the CA

server to the C:\Windows\SystemData\ocsp folder of the OCSP server.12. In the next window click Finish. A dialog box opens stating Executing the specified action.... Let

this finish.13. When the wizard completes, the status of the Online Responder is shown in the Revocation

Configuration Status box as Bad Signing Certificate on Array Controller.14. To fix this, click Array Configuration in the left-hand pane and expand it.15. In the directory tree, click the machine name that you are using.16. The revocation configuration that you just created is listed in the middle section, in this case Test.17. In the right-hand pane, click Assign a signing certificate.18. Check the certificate that you set up earlier is listed in the dialog box that opens. Click OK.19. Go back to the Revocation Configuration pane and right-click the revocation configuration you

created (in this case Test) and then click Edit Properties.20. A Properties for Revocation Configuration: Test pane opens. Three tabs are available. Click the

Signing tab.21. Uncheck the Do not prompt for credentials for cryptographic operations check box and click

OK.22. Go back to Online Responder Management, go to Actions and click Refresh .

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 21

Page 22: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Verifying that OCSP works correctly

23. In the left-hand pane click Online Responder: Computer Name and check that the RevocationConfiguration Status shows asWorking.

Verifying that OCSP works correctly

Generating a certificate request1. Open Notepad and create a file called rsa.inf with contents similar to the following on your

local C drive:

[Version]

Signature = "$Windows NT$"

[NewRequest]

Subject = "CN=TEST-CA"

HashAlgorithmName = SHA512

KeyAlgorithm = RSA

KeyLength = 2048

ProviderName = "nCipher Security World Key Storage Provider"

KeyUsage = 0xf0

MachineKeySet = True

RequestType = PKCS10

[EnhancedKeyUsageExtension]

OID = 1.3.6.1.5.5.7.3.1

[Extensions]

1.3.6.1.5.5.7.48.1.5 = Empty

In the rsa.inf file replace the subject with your CA common name.2. Go to your local directory and find the file rsa.inf.3. Check that rsa.inf contains the following messages:

Leaf certificate revocation check passed

CertUtil: -verify command completed successfully.

4. From the command prompt navigate to your local C drive and add:

>certreq —new rsa.inf rsa.req

5. Check that rsa.req is listed in the directory.6. In the command line run the command:

>certreq —submit —attrib —CertificateTemplate:WebServer rsa.req

7. Click OK to select the CA certificate and save it as rsa.cer in your local directory.8. Navigate to the directory where you saved the certificate and look for rsa.cer.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 22

Page 23: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 2: Procedures

Removing information about the certificate's CRL1. Select Start > Run, and enter certsrv.msc. Click OK.2. Click Certificate Authority. A list of folders below the CA appears.3. Right-click the Revoked Certificates folder and click All Tasks, Publish. A Publish CRL dialog

appears.4. Click OK to select a New CRL.5. Right-click the CA and select Properties.6. Click the Extensions tab.7. Check that the Select extension drop-down list box shows CRL Distribution Point (CDP).8. Click any of the listed CRL distribution points, and click Remove, then Yes.9. Click Apply. A pop-up box appears saying you need to restart the service.10. Click Yes to restart the service, and then click OK to close the dialog.

Retrieving information about the certificate's AIA, CRLs, and OCSP1. To check that clients can still obtain revocation data in the command prompt, navigate to the

folder where the certificate is stored, then type:

>certutil —url rsa.cer

2. The URL Retrieval Tool appears.3. Select Certs (from AIA) and click Retrieve.4. The list contains the verified Certificate and its URL. Select CRLs (from CDP) and click Retrieve.5. Compare the results to what you had earlier when you removed a CRL distributed point. CRLs

show they have been verified.6. Select OCSP (from AIA) and click Retrieve.7. The list contains the Verified OCSP URL. Click Exit.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 23

Page 24: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Verifying the OCSP Server is Active

Verifying the OCSP Server is Active1. To check details about the certificate and its CA configuration in the command prompt, navigate

to the folder wher the certificate is stored, then type:

>certutil -verify rsa.cer > rsa.txt

2. Open the text file rsa.txt. The last few lines should be as follows:

Verified Issuance Policies: None

Verified Application Policies:

1.3.6.1.5.5.7.3.1 Server Authentication

Leaf certificate revocation check passed

CertUtil: -verify command completed successfully

3. This shows that the OCSP Server is working correctly and there were no errors.

Uninstalling AD CS and OCSPTo uninstall AD CS and OCSP:

1. Open Server Manager and click Start > Server Manager.2. Click Manage and then click Remove Roles & Features.

The Before you begin window opens. Click Next.3. On server selection, select a server from the server pool, and click Next.4. Deselect Active Directory Certificate Services and Online Responder, and click Next.5. When the Removal process is complete, click Close and restart the machine.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 24

Page 25: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Chapter 3: Troubleshooting

Chapter 3: TroubleshootingThe following table provides troubleshooting guidelines.

Problem Cause Resolution

Online Responder reportsBad Signing Certificateon Array Controller.

This error occurs whenthe CA certificate is staleor cannot be located bythe Online Responderclient.

Ensure that the steps above have been correctlycarried out. Also, ensure that the CA is correctlyconfigured and that a valid CA certificate existsfor OCSP Signing.

Using

certutil —url

<certnamehere.cer>

and selecting Certs (fromAIA) shows an entry inthe list called AIA withFailed next to it.

This error occurs whenCertificate AuthorityWeb Enrolment is notinstalled on the CA.

Install Certificate Authority Web Enrolment onthe CA machine. Go to Server Manager.Expand the Roles section (in the left-handsection) and click Active Directory CertificateServices. In the bottom right-hand section, clickAdd Role Services and select CertificateAuthority Web Enrolment.

Using the certreq —new

<.req file here>

command returns anInvalid Provider Specifiederror.

This error occurs whenthe CSPs are not installedand set up on the clientmachine or not set upcorrectly.

Ensure that the Thales CAPI CSP and ThalesCNG CSP providers are correctly installed andset. (Do this by running the CSP Install Wizardand CNG Configuration Wizard under nCipherin the Start menu).

When using the CAPI orCNG wizard to access aprivate key protected byan OCS with password,you are prompted multipletimes to enter thepassword.

This error is due to aproblem in WindowsServer 2012.

To prevent this from happening, download andinstall the hotfix available at the followinglocation:http://support.microsoft.com/kb/2740017/EN-US

When presenting a Javacard OCS (V12 onwardsonly), the AD CSConfiguration Wizarddoes not detect the OCS.cardpp --examine showsTokenSecureChannelError.

TokenSecureChannelError

can occasionally be seenwhen presenting a Javacard OCS.

Remove and re-insert the OCS until it is pickedup by cardpp and the AD CS ConfigurationWizard.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 25

Page 26: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Appendix A: Installing and configuring AD CS on Windows Server Core

Appendix A: Installing andconfiguring AD CS on WindowsServer CoreTo install the Certificate Server on Windows Server Core:

1. Join domain by running the command:

netdom join %computername% /domain:<full DNS domain name> /userd:<domain user>

/password:*

2. Restart the machine after joining the domain by running the command:

>shutdown /r /t 0

3. Enable WOW64 if you are working with 32-bit applications:

Start /w ocsetup ServerCore-WOW64

shutdown /r /t 0

4. Run PowerShell as admin user.5. Install CA binaries via PowerShell, by running the command:

Add-windowsfeature ADCS-Cert-Authority

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 26

Page 27: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Appendix A: Installing and configuring AD CS on Windows Server Core

6. Configure CA via Powershell, by running the command:

Install-AdcsCertificationAuthority –AllowAdministratorInteraction –

caTypeEnterpriseRootCA

–CryptoProviderName ECDSA_P256#HSM_KSP_NAME –KeyLength 256 –HashAlgorithmName SHA256

Example:

Install-AdcsCertificationAuthority –AllowAdministratorInteraction –caCommonName "Fips-

128-Module-CA-1"

–caTypeEnterpriseRootCA –CryptoProviderName "RSA#nCipher Security World Key Storage

Provider"

–KeyLength 2048 –HashAlgorithmName SHA256

7. When the confirmation message appears, type A and press Enter.

Note: Use Module Only Protection or 1/N OCS without passphrase as a key protection method forWindows Server Core.

Verifying that the CA service has started successfullyTo verify that the CA service has started, open a command prompt and run the command:

>sc query certsvc

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 27

Page 28: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Appendix B: Installing and configuring AD CS via PowerShell

Appendix B: Installing andconfiguring AD CS via PowerShellThis procedure installs the Certificate Server binaries through the Server Manager PowerShell (PS)cmdlets, and then configures the Certificate Server through the new PS deployment cmdlets.

To install and configure Microsoft Active Directory Certificate Services using PowerShell:

1. Run PowerShell as admin user.2. Run the command:

Add-windowsfeature ADCS-Cert-Authority --IncludeManagementTools

Note: This command only installs CA binaries.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 28

Page 29: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Appendix B: Installing and configuring AD CS via PowerShell

3. Configure CA. There are three parameter sets for the CA PowerShell deployment cmdlet:a. Using new certificate and private key :

1. Run the following command in PowerShell:

Install-AdcsCertificationAuthority –AllowAdministratorInteraction –caCommonName

"<CA-Name>" –caType

EnterpriseRootCA –CryptoProviderName "<Key Storage Provider Name>" –KeyLength

<2048> -HashAlgorithmName <SHA256>

Example:

Install-AdcsCertificationAuthority –AllowAdministratorInteraction –caCommonName

"Fips-128-Module-CA-1"

–caType EnterpriseRootCA –CryptoProviderName "RSA#nCipher Security World Key

Storage Provider"

–KeyLength 2048 -HashAlgorithmName SHA256

2. When the confirmation message appears, type A and press Enter.b. Using existing private key:

1. Run the following command in PowerShell:

Install-AdcsCertificationAuthority –AllowAdministratorInteraction –caType

EnterpriseRootCA –CryptoProviderName

ECDSA_P256#HSM_KSP_NAME –KeyContainerName NAME_OF_KEY –HashAlgorithmName SHA256

Example:

Install-AdcsCertificationAuthority –AllowAdministratorInteraction –catype

EnterpriseRootCA –CryptoProviderName

"RSA#nCipher Security World Key Storage Provider" –KeyContainerName "Fips-128-

Module-CA-1" -HashAlgorithmName SHA256

2. When the confirmation message appears, type A and press Enter.c. Using existing certificate and private key:

1. Using a certificate already present on local machine in MY store, run the command:

Install-AdcsCertificationAuthority –AllowAdministratorInteraction –caType

EnterpriseRootCA –certificateID

[cert hash | cert serial number]

Example:

Install-AdcsCertificationAuthority –AllowAdministratorInteraction –caType

EnterpriseRootCA –certificateID

"49177ae638cc948241947879ae66d315"

2. When the confirmation message appears, type A and press Enter.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 29

Page 30: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

Internet addressesWeb site: https://www.thalesesecurity.comSupport: https://www.thalesesecurity.com/supportOnline documentation: https://www.thalesesecurity.com/resourcesInternational sales offices: https://www.thalesesecurity.com/about-us/contact-us

Addresses and contact information for the main Thales e-Security sales offices are provided at the bottom ofthe following page.

Microsoft AD CS and OCSP Integration Guide for Microsoft Windows Server 2016 30

Page 31: Thalese-Security MicrosoftADCS andOCSPgo.thalesesecurity.com/rs/480-LWA-970/images/Microsoft-AD-CS-and... · >certutil-config-backupdb

About Thales e-Security

Thales e-Security is a leading global provider of data encryption and cyber securitysolutions to the financial services, high technology manufacturing, governmentand technology sectors. With a 40-year track record of protecting corporate andgovernment information, Thales solutions are used by four of the five largestenergy and aerospace companies, 22 NATO countries, and they secure more than80 percent of worldwide payment transactions. Thales e-Security has offices inAustralia, France, Hong Kong, Norway, United Kingdom and United States.For more information, visit www.thalesesecurity.com

www. t ha lesesecur it y . com

Follow us on: