How to use vSphere Certificate Manager to Replace SSL Certificates
search cancel

How to use vSphere Certificate Manager to Replace SSL Certificates

book

Article ID: 318946

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article explains when and how to use vSphere Certificate Manager.

Use of vSphere Certificate Manager:

The vSphere Certificate Manager can be used to:

  • Implement Default Certificates
  • Replace VMCA Certificate with a custom CA Certificate
  • Replace all vSphere Certificates and Keys with custom CA Certificates and Keys

Implement Default Certificates (use Option 4 or 8):

  • This option is the most preferred with the least amount of overhead in implementing, it is used when not planning on implementing custom CA Certificates signed by either an enterprise CA (like a Microsoft Windows CA) or a Commercial CA (Verisign, GoDaddy, etc.).
  • In this environment, the vSphere certificates are generated and issued by the VMware Certificate Authority (VMCA) and stored by the vSphere Endpoint Certificate Store (VECS).
  • These certificates are not trusted outside of vSphere by default.
  • If Machine SSL & Solution User Certificates are expired, use Option 8 (Reset all Certificates).

Replace VMCA Certificate with a custom CA Certificate (use Option 2):

  • In this environment, replace the default VMCA Certificate and Key with a custom CA Certificate and Key from either an enterprise CA (like a Microsoft Windows CA) or a Commercial CA (Verisign, GoDaddy, etc.).
  • The VMCA will then be used to generate new vSphere certificates that will be signed by the previously imported custom CA Certificate and Key.
  • These certificates issued by the VMCA will be trusted outside of vSphere.
  • VMware does not recommend operating VMCA as a subordinate (or intermediate) certificate authority. Choosing this option might encounter significant complexity and the potential for a negative impact to the security, and an unnecessary increase in operational risk. For example, a rogue administrator with full access to the vCenter could mint fully trusted and valid certificates that are trusted all the way up to the organization’s Root CA
     

Replace all vSphere Certificates and Keys with custom CA Certificates and Keys (use Option 5):

  • In this environment, replace the Machine Certificate and all Solution User Certificates with custom CA Certificates signed by either an enterprise CA (like a Microsoft Windows CA) or a Commercial CA (Verisign, GoDaddy, etc.).
  • The VMCA is not responsible for issuing these certificates.

Please note that in vSphere 7.x perform steps 1 and 2 through the vCenter user interface.

Environment

VMware vCenter Server 

Resolution

Process to Update the Machine  SSL certificate or generate a certificate signing request:

Note: In vSphere vCenter 7.x/8.x, in the user interface, update the Machine  SSL certificate or generate a certificate signing request by going to

  • Menu > Administration > Certificates > Certificate Management.

In the Machine SSL Certificate section, select the Actions pull-down menu.


Note: In Windows-based vCenter, login as an administrator or "Run as Administrator" if user access control is enabled.

         Take a snapshot of the vCenter before performing this activity. If the vCenter is in linked mode, take offline snapshots of all the linked vCenter.


To launch the vSphere Certificate Manager, execute the following commands:

  • vCenter Server Appliance: /usr/lib/vmware-vmca/bin/certificate-manager

When running the certificate-manager command, the screen presents with the 8 options as shown in the screenshots for Windows and appliance respectively.



Details of the Options:

Option # Detail Required Information
1 Replace the Machine SSL certificate with a Custom CA Certificate
Machine SSL Certificate provides a sub-option to generate Certificate Signing Request(s) and Key(s) for Machine SSL certificate.
  • [email protected] password.
  • Path to a custom Certificate and Key for the Machine Certificate.
  • Path to a custom Certificate for the VMCA Root
2 Replace the VMCA Root certificate with a Custom CA Signing Certificate and Replace all Certificates.

This option provides a sub-option to generate Certificate Signing Request(s) and Key(s) for VMCA Root Signing certificate.
  • [email protected] password

  • Configure the certool.cfg file at /usr/lib/vmware-vmca/share/config/certool.cfg (used by VMCA when generating certificates)

  • Root Signing Cert

  • Root Signing Key


Optional Information:

Is replacing all Solution User certificates with custom CA is needed? 

  • YES: Paths to the custom Certificates and Keys for the Solution Users (vpxd, vpxd-extension, vsphere-webclient, machine).

Note: Optionally perform this step later using Option 5.

  • NO: VMCA will generate new Certificates/Keys for Solution Users using the provided Custom CA Signing Certificate.

Note: Optionally perform this step later using Option 6. 

Is replacing the Machine SSL Certificate with custom CA needed?

  • YES: Path to a custom Certificate and Key for the Machine Certificate.

Note: Optionally perform this step later using Option 1.

  • NO: VMCA will generate a new Certificate/Key for Machine using the provided Custom CA Signing Certificate.

Note: Optionally perform this step later using Option 3.

3 Replace the Machine SSL certificate with a VMCA Generated Certificate
  • [email protected] password
  • Configure the certool.cfg file (used by VMCA when generating certificates)
4 Regenerate a new default VMCA Root Certificate and Replace all Certificates
  • [email protected] password
  • Configure the certool.cfg file (used by VMCA when generating certificates)
5 Replace the Solution User Certificates with Custom CA Certificates
  • [email protected] password
  • Path to the custom Root CA Certificate
  • Path to the custom Certificate and Key for vpxd Solution User
  • Path to the custom Certificate and Key for vpxd-extension Solution User
  • Path to the custom Certificate and Key for vSphere-webclient Solution User
  • Path to the custom Certificate and Key for machine Solution User
  • If vCenter Server is 7.0, the path to the Custom Certificate and Key for hvc & wcp Solution Users
6 Replace the Solution User Certificates with VMCA generated Certificates
7 Revert last performed operation by re-publishing old certificates
8 Reset all certificates
  • [email protected] password
  • Configure the certool.cfg file (used by VMCA when generating certificates)



Note 2: The Certool.cfg is located at:

  • /usr/lib/vmware-vmca/share/config/certool.cfg
  • Configuration file locations in vCenter Server Appliance and Platform Service Controler Appliance(External PSC):
    • vCenter Server Appliance: /usr/lib/vmware-vmca/share/config/certool.cfg
    • External Platform Service Controller Appliance: /usr/lib/vmware-vmca/share/config/certool.cfg

The default configuration of certool.cfg should look like the following Screenshot:



If the PNID on the vCenter is unknown, it can be obtained with this command for Windows or the VCSA respectively:

  • vCenter Server Appliance 6.x/7.x/8.x:
/usr/lib/vmware-vmafd/bin/vmafd-cli get-pnid --server-name localhost



Additional Information

Note: Currently, vCenter Server integrates only with VMCA. The vSphere Certificate Manager and VMCA cannot be used to issue certificates to any other products.
 
Log file locations:
  • The vSphere Certificate Manager stores a certificate-manager.log file in these locations:
    • vCenter Server Appliance 6.x/7.x/8.x: /var/log/vmware/vmcad/certificate-manager.log
       
  • The certool.cfg file is located at:
    Configuration file locations in vCenter Server Appliance and Platform Service Controler Appliance:
    • vCenter Server Appliance: /usr/lib/vmware-vmca/share/config/certool.cfg
    • Platform Service Controller Appliance: /usr/lib/vmware-vmca/share/config/certool.cfg


Impact/Risks:

Changing vCenter Server certificates may impact connected products ie: SRM, vSphere Replication, Horizon View, etc.