Menu
Enter Active Directory Certificate Services (AD CS). What is Active Directory Certificate Services (AD CS)? According to Microsoft themselves, AD CS is the “Server Role that allows you to build a public key infrastructure (PKI) and provide public key cryptography, digital certificates, and digital signature capabilities for your organization.”. In my lab environment, I setup a Microsoft Certificate Authority to sign. This indicates you need to complete the ADCS configuration.
-->Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016
You can use this procedure to install Active Directory Certificate Services (AD CS) so that you can enroll a server certificate to servers that are running Network Policy Server (NPS), Routing and Remote Access Service (RRAS), or both.
Important
- Before you install Active Directory Certificate Services, you must name the computer, configure the computer with a static IP address, and join the computer to the domain. For more information on how to accomplish these tasks, see the Windows Server 2016 Core Network Guide.
- To perform this procedure, the computer on which you are installing AD CS must be joined to a domain where Active Directory Domain Services (AD DS) is installed.
Membership in both the Enterprise Admins and the root domain's Domain Admins group is the minimum required to complete this procedure.
Note
To perform this procedure by using Windows PowerShell, open Windows PowerShell and type the following command, and then press ENTER.
Add-WindowsFeature Adcs-Cert-Authority -IncludeManagementTools
After AD CS is installed, type the following command and press ENTER.
Install-AdcsCertificationAuthority -CAType EnterpriseRootCA
To install Active Directory Certificate Services
Tip
If you want to use Windows PowerShell to install Active Directory Certificate Services, see Install-AdcsCertificationAuthority for cmdlets and optional parameters.
- Log on as a member of both the Enterprise Admins group and the root domain's Domain Admins group.
- In Server Manager, click Manage, and then click Add Roles and Features. The Add Roles and Features Wizard opens.
- In Before You Begin, click Next.NoteThe Before You Begin page of the Add Roles and Features Wizard is not displayed if you have previously selected Skip this page by default when the Add Roles and Features Wizard was run.
- In Select Installation Type, ensure that Role-Based or feature-based installation is selected, and then click Next.
- In Select destination server, ensure that Select a server from the server pool is selected. In Server Pool, ensure that the local computer is selected. Click Next.
- In Select Server Roles, in Roles, select Active Directory Certificate Services. When you are prompted to add required features, click Add Features, and then click Next.
- In Select features, click Next.
- In Active Directory Certificate Services, read the provided information, and then click Next.
- In Confirm installation selections, click Install. Do not close the wizard during the installation process. When installation is complete, click Configure Active Directory Certificate Services on the destination server. The AD CS Configuration wizard opens. Read the credentials information and, if needed, provide the credentials for an account that is a member of the Enterprise Admins group. Click Next.
- In Role Services, click Certification Authority, and then click Next.
- On the Setup Type page, verify that Enterprise CA is selected, and then click Next.
- On the Specify the type of the CA page, verify that Root CA is selected, and then click Next.
- On the Specify the type of the private key page, verify that Create a new private key is selected, and then click Next.
- On the Cryptography for CA page, keep the default settings for CSP (RSA#Microsoft Software Key Storage Provider) and hash algorithm (SHA2), and determine the best key character length for your deployment. Large key character lengths provide optimal security; however, they can impact server performance and might not be compatible with legacy applications. It is recommended that you keep the default setting of 2048. Click Next.
- On the CA Name page, keep the suggested common name for the CA or change the name according to your requirements. Ensure that you are certain the CA name is compatible with your naming conventions and purposes, because you cannot change the CA name after you have installed AD CS. Click Next.
- On the Validity Period page, in Specify the validity period, type the number and select a time value (Years, Months, Weeks, or Days). The default setting of five years is recommended. Click Next.
- On the CA Database page, in Specify the database locations, specify the folder location for the certificate database and the certificate database log. If you specify locations other than the default locations, ensure that the folders are secured with access control lists (ACLs) that prevent unauthorized users or computers from accessing the CA database and log files. Click Next.
- In Confirmation, click Configure to apply your selections, and then click Close.
-->
Certificates play the most critical role in securing communications between federation servers, Web Application Proxies, claims-aware applications, and Web clients. This topic describes the steps required to obtain and configure the Secure Sockets Layer (SSL) certificate for your federation service. In other words, the SSL certificate in your existing AD FS farm is nearing expiration and you want to obtain another certificate and configure it as the SSL certificate in your AD FS farm. The SSL certificate is used for securing communications between federation servers and clients. For more information, see the “Certificate requirements” section in AD FS Requirements.
Note
Whether you are obtaining a new SSL certificate from a third party or from an enterprise certification authority (CA), ensure the certificate has subject alternative name entries of type DNS for each of the following:Your federation service name, such as fs.contoso.com (or an appropriate wildcard entry such as *.contoso.com)If you are using AD FS with Device Registration Service (DRS), add an additional SAN of type DNS for each UPN suffix in use in your environment, for example enterpriseregistration.contoso.com.It’s recommended that you mark the private key as exportable so that the same certificate can be deployed across each federation server and web application proxy within your AD FS farm. Note that the certificate must be publicly trusted (chain to a publicly trusted root CA).
Obtain an SSL certificate from AD CS
Perform the following procedures to obtain a new SSL certificate from AD CS. In order to complete these, you must deploy and configure AD CS in your environment. For more information, see Active Directory Certificate Services Overview.
Configure a template
- In the Certificate Templates snap-in, right-click the Web Server template and select Duplicate.
- On the Security tab, click Add.
- Click Object Types, check Computers, and then click Ok.
- Enter Domain Computers.
- Click Check Names and then lick OK.
- With Domain Computers selected, check read, enroll, and auto-enroll permissions.If you are on a domain controller, repeat the steps above to add read, enroll, and auto-enroll permissions explicitly to the domain controller by name. This is because a domain controller is not a member of domain computers.
- On the Request Handling tab, check the Allow private key to be exported box.
- On the General tab, update the template display name to SSL Certificate Template or similar.
- Click OK to save the new template.
Assign a template to a CA
- Under Certification Authority (Local), expand the node with the CA name.
- Click to select the Certificate Templates container (under the CA name, not the Certificate Templates snap-in).
- Right click the container and select New, and then Certificate Template to Issue.
- Select SSL Certificate Template and click OK.
Request and enroll a new SSL certificate for AD FS
- Open the MMC window and add the Certificates snap-in for the local Computer account.
- Right-click the Personal node and choose All Tasks -> Request New Certificate.
- Click Next twice to get to the Request certificates page. Your can see the template you created in the previous step.
- Click the More information is required... link.
- Under Subject name, under Type, select Common name.
- Enter your federation service name, for example 'fs.contoso.com' and then click Add.
- Under Alternative name, under Type, select DNS.
- Using the same process, add a subject alternative name of type DNS for your federation service name, for example, “fs.contoso.com” (the same name you added above).If you are using AD FS with DRS, add an additional SAN of type DNS for each UPN suffix in use in your environment, for example “enterpriseregistration.contoso.com”.
- Click the Private Key tab.
- Under Key options, ensure the Make private key exportable option is checked and click OK.
- Back on the Request Certificates wizard page, ensure the checkbox for the template is checked and click Enroll.You can now see the certificate you requested and enrolled in the Personal store in the Certificates snap-in.
Export the SSL certificate to a .PFX file
- In the Certificates snap-in for the Local Machine, click the Personal store.
- Double-click the SSL certificate you used for your federation service.
- On the Details tab, click Copy to file and then click Next in the wizard.
- Ensure .pfx is selected, Include all certificates in the certification path if possible and Export all extended properties are checked and then click Next.
- Select Password, enter a password, and then click Next.
- Select a file location and name, click Next, and then click Finish.
Configure the obtained certificate as the SSL certificate for AD FS
Now that you have obtained an SSL certificate and exported it to a .pfx file, you can configure this certificate as the SSL certificate of your AD FS farm. You do this by installing and configuring this certificate on each node in your AD FS farm.
Important
It is recommended to use the same SSL certificate on all federation servers and web application proxy machines in your AD FS farm.
Install the new SSL certificate on each federation server in the AD FS farm
- Install the new certificate in the local computer personal certificates store on each federation server in your farm by double-clicking the .PFX file and completing the wizard. Ensure the certificate is installed in the Local Computer Personal Certificates store on each federation server.
- Open a Windows PowerShell command window and execute the following command to list the contents of the local machine store: PS:>dir Cert:LocalMachineMy.
- Copy the thumbprint of your new SSL certificate from the output list from the command above, and set the SSL certificate on AD FS using the following command: PS:>Set-AdfsSslCertificate –Thumbprint <thumbprint>.
- Verify the new settings using the following command: PS:>Get-AdfsSslCertificate.
Configure the new SSL certificate as the service communication certificate for your AD FS farm
- The service communication certificate enables WCF message security for securing communications between federation servers. By default, the SSL certificate in your AD FS farm is also automatically used as the service communications certificate. (This is the recommended approach).Now that you have obtained and configured a new certificate as the SSL certificate for your AD FS farm, you need to designate this SSL certificate to also be the service communication certificate in your AD FS farm. This does not happen automatically. You can do this via MMC -> Certificates -> Set Service Communications Certificate.
- The following message will inform you that you need to set the private key permissions correctly on the new certificate: “Ensure that the private key for the chosen certificate is accessible to the service account for this Federation Service on each server in the farm.” Update the permissions on the SSL and the service communication certificates to allow Read access for the AD FS service and DRS services. You have to complete the following procedure on all federation servers in your farm.
- Add the Certificates snap-in to MMC, select Computer account and click Next, then select Local computer and click Finish.
- Expand Certificates (Local Computer), expand Personal, and select Certificates.
- Right-click your new SSL and Service Communications certificate, select All Tasks, and select Manage Private Keys.
- Click Add...
- Click Locations...
- Select the local host name (not the directory) and click OK.
- In the Enter the object names field, type nt serviceadfssrv and click Check names. The name should resolve to the service adfssrv. Click OK.
- If you are using AD FS with DRS, in the Enter the object names field, type nt servicedrs and click Check names. The name should resolve to the service DRS. Click OK.
- Select the service and ensure only Read access is selected. Click OK again.
Configure the new SSL certificate for DRS
- If you have configured AD FS with DRS, then you must make sure that your new SSL certificate for AD FS is also properly configured for DRS.If all of the correct DRS names are in the certificate (an additional SAN of type DNS for each UPN suffix in use in your environment, for example enterpriseregistration.contoso.com), then there are no additional steps required to configure the SSL certificate for DRS. The Set-AdfsSslCertificate will configure the correct bindings for DRS as well.Ensure that the correct DRS names are included in the certificate by running the command Get-AdfsDeviceRegistrationUpnSuffix, which lists all UPN suffixes in use in the enterprise, and comparing the output to the contents of the SAN of the certificate.If any names are missing you will have to obtain a new SSL certificate and re-execute Set-AdfsSslCertificate on each federation server and Web Application Proxy.Whenever running, Set-AdfsSslCertificate, make sure to update the service communications certificate as well. You can do this via MMC -> Certificates -> Set Service Communications Certificate.
Install the SSL certificate on each web application proxy
- The new SSL certificate must be installed on all nodes of your AD FS farm, including all proxy computers. Therefore, you must install the new SSL certificate in the local machine personal certificates store on each Web Application Proxy in your AD FS farm.ImportantIt is recommended to use the same SSL certificate on all federation servers and web application proxy machines in your AD FS farm.Once installed, you can set this SSL certificate as the AD FS proxy certificate by running the following commands: Set-WebApplicationProxySslCertificate -Thumbprint <thumbprint> and Get-WebApplicationProxySslCertificate.