Setup CA Server for vSphere Lab- Say Good Bye to Self-Signed Certs


A while back I wrote a post on Configuring CA Server on Server 2008 so that one can use signed certificate in lab or even in production.

Most vSphere appliances/softwares comes with a self-signed certs and works just fine in home lab. But if you are like me and get annoyed by  the warning message “Your connection is not secure”, then generate signed certificates to use in your lab and get rid of the ugly browser warning message.

As I stated in my earlier post on SSL certs that self-signed certs works just fine but it’s good to know how to work with signed certificates as in production environment organizations don’t use self-signed certificates and rely on SSL certificates bought from 3rd party like Thawte or Verisign.

There are 2 types of CA server: Standalone and Enterprise.

Enterprise Root CA: The enterprise root CA is the most trusted CA in an organization and should be installed before any other CA. All other CAs are subordinate to an enterprise root CA. This CA should be highly physically secured, as a compromise of the enterprise CA effectively makes the entire chain compromised.

Enterprise Subordinate CA:  An enterprise subordinate CA must get a CA certificate from an enterprise root CA but can then issue certificates to all users and computers in the enterprise. These types of CAs are often used for load balancing of an enterprise root CA.

Standalone Root CA: A standalone root CA is the root of a hierarchy that is not related to the enterprise domain information. Multiple standalone CAs can be established for particular purposes. A standalone root CA is often used as the root for other enterprise subordinate CAs to improve security in an environment. In other words, the root is configured as standalone, and subordinate enterprise domain integrated CAs are set up within the domains in a forest to provide for autoenrollment across the enterprise.

Standalone Subordinate CA: A standalone subordinate CA receives its certificate from a standalone root CA and can then be used to distribute certificates to users and computers associated with that standalone CA.

An enterprise CA is typically used to issue certificates to users, computers, and services, and is not typically used as an offline CA. Enterprise CA requires AD DS, which can be used as a configuration and registration database. An enterprise CA also provides a publication point for certificates issued to users and computers.

In this post we will be setting up Enterprise CA Server.

Users can request certificates from an Enterprise CA using the following methods:

  1. Manual Enrollment
  2. Web Enrollment
  3. Auto enrollment
  4. Enrollment agent

For more information on CA please read this Article

In this post I am going to share the steps needed to configure a Windows 2012 R2 Server as Certificate Authority.

Prerequisites

  • Active Directory Domain already setup and configured.
  • Server 2012 installed and joined to domain.

Let’s jump into action now.

1: Launch Server Manager and click on Add Roles and features.

ca-1

2: Select Role-based or feature-based installation.

ca-2

3: From the list of roles available select “Active Directory Certificate Service” and hit Next.

ca-3

4: A new window will pop-up. Click on Add Features

ca-4

5: On Select features page hit Next.

ca-5

6: Hit Next to continue.

ca-6

7: On select role page, select “Certification Authority” and hit Next.

ca-7

8: On the confirmation page hit Install.

ca-8

9: Once installation is complete hit Close.

ca-9

Note: The above steps can be achieved via command line as well. You can run following command to add the windows cert role


Add-WindowsFeature ADCS-Cert-Authority, ADCS-Web-Enrollment -IncludeManagementTools

10: Click on Manage button on top of Server Manager window and click on “Configure Active Directory Certificate Services” option to complete the post-deployment configuration of CA server.

ca-10

11: On specify Credentials page specify the user accounts that have local administrator rights on the server where you are configuring CA server role. Hit Next to continue.

ca-11

12: On Role Services page select “Certification Authority” and hit Next.

ca-12

13: Select “Enterprise CA” on Setup type page. Hit Next to continue.

ca-13

14: On CA Type page select “Root CA” and hit next.

ca-14

15: On Private Key page select “Create a new private key”

ca-15

16: Select SHA 1 and key length as 4096 as cryptographic options. The bigger is the key length, the most secure it is and most hard to break.

ca-16

Update: 08/06/2016

Since SHA-1 is has been retired, update hash algorithm on CA server by running the command from powershell:

certutil -setreg ca\csp\CNGHashAlgorithm SHA256

Reboot the server after that for changes to take effect.

17: Dont change the defaults on CA name page and hit next.

ca-17

18: Default validity period is 5 years. Change this to any value as per your need and hit next.

ca-18

19: Choose default for CA Database location and hit next.

ca-19

20: On the confirmation page click on configure to finish configuration.

ca-20

21: On Results page hit close to complete the configuration wizard.

ca-21

Add Certification Authority Web Enrollment service

The Web Enrollment service is very useful while making requests for certificates from computers that are not members of AD domain. This essentially allow certificates to be enrolled directly over HTTP, enabling non-domain or Internet-connected clients to connect and request certificates from a CA server.

Once “Certificate Authority” role is installed completely, you can add Certification Authority Web Enrollment service to it from server manager page.

22: Launch server manager again select “Certification Authority Web Enrollment” and hit Next.

ca-22

23: Click on Add features to add IIS role.

ca-23

24: On select features page just hit next.

ca-24

25: Hit next to continue.

ca-25

26: Add the roles as shown in below screenshot and hit next.

ca-26

27: Hit Install to start the role installation process

ca-27

28: Once installation is completed, continue with Post-deployment configuration.

ca-28

29: Specify the credentials and hit next.

ca-29

30: Make sure “Certification Authority Web Enrollment” role is selected. Hit next.

ca-30

31: On confirmation page click on configure.

ca-31

32: Hit close once configuration is succeeded.

ca-32

Verify Certificate Authority Functionality

To verify that the CA server is operational, we can check both from within our browser as well as by checking the Certificate Authority management console. On your CA server, start the Certificate Authority Management tool. If all is well, this will show your CA server with a green icon, it means the CA services are up and running.

ca-229

Once the installation/configuration of web-enrollment completes,  open a browser and see if the certificate enrollment web page is working.

From a client, type your CA server name followed by /certsrv (http://CA-SRV-FQDN/certsrv). If you opened browser on the CA server itself you can use localhost followed by /certsrv.

Access CA server over https

By default the web portal for CA server is accessible over http. However if you want to access CA server over secure connection, you can change the protocol to https.

Launch IIS manager and navigate to default Web Site. You will see  a virtual directory “CertSrv” created. Select certsrv and look on right hand side pane and you will see it can be browsed over http.

ca-33

To make it accessible over https, select the default web site and right click on it and choose “Edit Bindings”

ca-34

Click on ADD

On Add Site Binding page, select type as https and select the IP address of the CA server. Provide a hostname for the ca srv and hit OK.

ca-35

You will see now https has been added now. You can chose to remove http from site bindings if you wish. This means your ca srv web portal will be accessible only over https.

ca-36

In our Next post we will see Set Up Automatic Certificate Enrollment.

I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing. Be sociable :)

About Alex Hunt

Hi All I am Manish Kumar Jha aka Alex Hunt. I am currently working in VMware Software India Pvt Ltd as Operations System Engineer (vCloud Air Operations). I have around 5 Years of IT experience and have exposure on VMware vSphere, vCloud Director, RHEL and modern data center technologies like Cisco UCS and Cisco Nexus 1000v and NSX. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.
This entry was posted in SSL Certficates. Bookmark the permalink.

6 Responses to Setup CA Server for vSphere Lab- Say Good Bye to Self-Signed Certs

  1. Pingback: Replacing Esxi 6 SSL Certificates | Virtual Reality

  2. Pingback: Replacing vSphere 6 Solution user certificates with CA signed certificates | Virtual Reality

  3. Pingback: Newsletter: June 25, 2016 | Notes from MWhite

  4. Pingback: Replacing vSphere 6 SSL Certificates | Virtual Reality

  5. Pingback: Learning NSX-Part-11-Replacing NSX default SSL Certficates with CA Signed Certificates | Virtual Reality

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s