OpenSSL Commands

Prerequisites

Access a Computer with OpenSSL

Copy the file(s) to a system that has OpenSSL. If you are on a Windows machine, the easiest way to do this is to use Git for Windows (https://git-scm.com/download/win). Once installed, you can run Git Bash and will have access to OpenSSL. Linux and macOS will likely already have OpenSSL support in Terminal. If you are in a VMware environment, the ESXi hosts also have OpenSSL support.

Obtain the Certificate Password

It is highly likely the .pfx file will contain a password to protect the file. This password is required for the conversion process.

Convert PKCS12 (P12) to Privacy Enhanced Mail (PEM)

PEM files may have either a cer, crt, or pem file extension. These should be interchangeable, but some vendors are very particular about the file extension. Like anything, check the applicable documentation for recommendations.

Most vendors will require three files. Commonly I see the folllowing:

  • Machine certificate
  • Signing chain (Look at the vendor documentation for the chaining order! Some vendors require root + intermediates at the bottom and other will require the intermediates + the root at the bottom)
  • Private key

To get the machine certificate and signing certificates, run the following command:

openssl pkcs12 -in certificate-name.pfx -out machine.pem -nodes -nokeys

To get the encrypted private key, run the following command:

openssl pkcs12 -in certificate-name.pfx -out machine.key -nocerts

If you view the file, you will see that it is encrypted. Most systems will not take an encrypted key and will require an RSA Private Key.

openssl rsa -in machine.key -out machine-rsa.key

Now if you view the new file, you will see it is an RSA Private Key.

Installing VMware App Volumes 4 Manager – Part 2

This is a prerequisite phase before configuring App Volumes Manager in the browser. A lot of this should already be accomplished in a production environment except the newly installed App Volumes Manager specific settings. This page can serve more than just for configuring security for App Volumes Manager.

At this point, the App Volumes Manager software should be installed. Reference the following article to install the App Volumes Manager: Installing VMware App Volumes 4 Manager – Part 1.

Rather than reiterate what’s already been written elsewhere that makes sense, I am just going to drop the appropriate links below and make notes where appropriate for reference.

Using SSL Certificates with App Volumes Manager

ref: https://docs.vmware.com/en/VMware-App-Volumes/4/com.vmware.appvolumes.admin.doc/GUID-266871B4-ACEA-455C-8388-20BDD7B239D2.html


Connecting Securely to Active Directory

ref: https://docs.vmware.com/en/VMware-App-Volumes/4/com.vmware.appvolumes.admin.doc/GUID-FAEDA013-2768-4854-B813-B39BB3F7E598.html

I added the certificate in the following order: Root+Intermediate+Machine and named it adCA.pem. This file gets added to the C:\Program Files (x86)\CloudVolumes\Manager\config directory and then the App Volumes Manager service gets restarted.


Replace the Self-Signed Certificate with CA-signed Certificate

ref: https://docs.vmware.com/en/VMware-App-Volumes/4/com.vmware.appvolumes.admin.doc/GUID-EFCC36A2-1609-4B47-969E-2A0CF9BC9B68.html

Add the CA signed certificate and key to the following directory: C:\Program Files (x86)\CloudVolumes\Manager\nginx\conf

Directory to nginx.conf configuration file: C:\Program Files (x86)\CloudVolumes\Manager\nginx\conf — Make a copy before editing!

Edit lines 57 and 58 to reflect the certificate and key added earlier.

Restart the App Volumes Manager service.


Add a Trusted Root Certificate to the Certificate Store

ref: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.authentication.doc/GUID-B635BDD9-4F8A-4FD8-A4FE-7526272FC87D.html

Add Custom Certificates

ref: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.authentication.doc/GUID-15A4FD99-37E2-41E5-8A35-247B8FDB019D.html


Convert Certificate Files to One-Line PEM Format

ref: https://docs.vmware.com/en/Unified-Access-Gateway/2009/uag-deploy-config/GUID-870AF51F-AB37-4D6C-B9F5-4BFEB18F11E9.html

Use the following commands to convert .p12 or .pfx files to PEM.

openssl pkcs12 -in mycaservercert.pfx -nokeys -out mycaservercert.pem
openssl pkcs12 -in mycaservercert.pfx -nodes -nocerts -out mycaservercertkey.pem
openssl rsa -in mycaservercertkey.pem -check -out mycaservercertkeyrsa.pem

Create a Custom vCenter Server Role [for App Volumes Manager]

ref: https://docs.vmware.com/en/VMware-App-Volumes/4/com.vmware.appvolumes.admin.doc/GUID-8C79E140-A8DA-4A1F-B09D-DE9A332114E2.html?hWord=N4IghgNiBcIE4HsIFMQF8g

Create a Custom vCenter Server Role Using PowerCLI [for App Volumes Manager]

ref: https://docs.vmware.com/en/VMware-App-Volumes/4/com.vmware.appvolumes.admin.doc/GUID-505624F3-F3EB-428C-BEA0-5BD7F6095A1F.html#GUID-505624F3-F3EB-428C-BEA0-5BD7F6095A1F


App Volumes 2.12.1 – vCenter Certificate becomes unverified. (2150281)

ref: https://kb.vmware.com/s/article/2150281

Use this article to have App Volumes Manager trust the vCenter Server certificate. I could not find this information anywhere else besides this kb.

To resolve the issue, add the vCenter CA certificate to the cacert.pem

Make sure that the cacert.pem file has the complete chain including the vCenter server certificate.

  • Generated the cacert.pem and placed it under the directory “C:/Program Files (x86)/CloudVolumes/Manager/config/cacert.pem”
  • Imported the vCenter CA cert and vCenter server cert to trusted store of the App Volume Manager.
  • Restarted the App Volume Manager service.

Update: I added the certificates in the following order: Root+Intermediate+Machine to cacert.pem and copied the file into the C:/Program Files (x86)/CloudVolumes/Manager/config/ directory. I then restarted the App Volumes Manager service. When configuring the Machine Managers, the certificate error is not present.