Skip to content

Replacing the appliance certificate

Out of the box, the appliance presents a self-signed certificate that it generated from its own hostname at first boot. Browsers warn about it, and every system that calls Orchestrator’s REST API has to be told to trust it. This recipe replaces it with a certificate signed by your own certificate authority (CA), so the warnings go away.

Getting ready

  • A root shell on the appliance: SSH in as vmware-system-user, then sudo su - (recipe 2.1).
  • A workstation with openssl and scp.
  • A CA that can sign a server certificate, such as Active Directory Certificate Services, and someone who can submit requests to it.
  • A maintenance window. Applying the certificate redeploys every service on the appliance.
  • A VM snapshot of the appliance, taken just before you start.

How to do it

  1. Create a private key and a certificate signing request (CSR) on your workstation. Put the appliance’s FQDN in both the common name and the subject alternative names (SANs). Browsers ignore the common name and look only at the SANs.
workstation
openssl req -new -newkey rsa:2048 -nodes \
-keyout vco01.key -out vco01.csr \
-subj "/C=IN/O=VMW Lab/CN=vco01.vmw.lab" \
-addext "subjectAltName=DNS:vco01.vmw.lab,DNS:vco01"
  1. Submit vco01.csr to your CA and ask for a web server certificate. Download the signed certificate, plus every intermediate CA certificate and the root CA certificate, all in Base64 (PEM) format.
  2. Check that the key and the certificate belong together. The two commands must print identical output:
workstation
openssl x509 -noout -pubkey -in vco01.crt | openssl sha256
openssl pkey -pubout -in vco01.key | openssl sha256
  1. Build one PEM file that holds, in this order, the private key, the appliance certificate, any intermediate CA certificates, and the root CA certificate:
workstation
cat vco01.key vco01.crt intermediate-ca.crt root-ca.crt > vco01-chain.pem
  1. Copy the file to the appliance. scp logs in as vmware-system-user like SSH does (recipe 2.1), so copy it to that user’s home folder:
workstation
scp vco01-chain.pem vmware-system-user@vco01.vmw.lab:~
  1. SSH in as vmware-system-user, switch to root with sudo su -, move the file into root’s home folder, and load the certificate:
root@vco01
mv /home/vmware-system-user/vco01-chain.pem /root/
root@vco01
vracli certificate ingress --set /root/vco01-chain.pem
  1. Apply it by redeploying the services. Don’t interrupt the script. It’s finished when it prints Prelude has been deployed successfully.
root@vco01
/opt/scripts/deploy.sh
  1. Confirm the appliance is now using the new certificate:
root@vco01
vracli certificate ingress --list | openssl x509 -noout -subject -issuer -dates
Figure 2.2. The new certificate, as the appliance reports it.
  1. Delete the PEM file from the appliance, because it contains the private key: rm /root/vco01-chain.pem. Store your copy somewhere safe.
  2. Browse to https://vco01.vmw.lab from a machine that trusts your CA. The browser should show a secure connection with no warning.
Figure 2.3. The browser trusts the Orchestrator Client once the CA-signed certificate is in place.

How it works

Orchestrator doesn’t terminate TLS itself. Every request reaches the appliance’s ingress first, the front door of the internal Kubernetes cluster, and the ingress holds the certificate that clients see. That’s why the command is vracli certificate ingress. --set checks the file and stores it in the appliance’s configuration, and deploy.sh rebuilds the services so the ingress picks it up.

The chain has to be in one file, in order, because the ingress sends the whole chain to every client. If an intermediate certificate is missing, desktop browsers often cope, but scripts and other products calling the REST API fail with an “unable to verify” error.

If --set fails with a message saying the public key in the certificate doesn’t match the private key, you’ve combined the wrong key and certificate, or the file is out of order. Step 3 catches the first case before you get to the appliance.

Needs a lab check. The PEM order (key, certificate, intermediates, root), vracli certificate ingress –set, and the deploy.sh step come from the Aria Automation Orchestrator 8.18 documentation. Confirm on 9.1.1 that deploy.sh is still required. One community write-up of 9.0 says the certificate is applied without a restart.
Needs a lab check. OpenSSL 3 writes keys in PKCS #8 format (BEGIN PRIVATE KEY). Broadcom’s example shows the older BEGIN RSA PRIVATE KEY format. Confirm 9.1.1 accepts PKCS #8. If it doesn’t, convert the key first with openssl rsa -in vco01.key -out vco01-rsa.key -traditional.
Needs a lab check. Time how long deploy.sh takes on the 9.1.1 lab appliance, so the book can give readers a realistic maintenance window.
Back in vRO 5.5–7Replace the certificate in the appliance management interface on port 5480, or import a PKCS #12 file on the Certificates page of Control Center.
In Orchestrator 9.xLoad a PEM chain with vracli certificate ingress --set, then run /opt/scripts/deploy.sh.

There's more

Going back to self-signed. To generate a fresh self-signed certificate, for example after changing the appliance’s IP address or hostname, run vracli certificate ingress --generate auto --set stdin, then /opt/scripts/deploy.sh.

Pasting instead of copying. If you can’t use scp, run vracli certificate ingress --set stdin, paste the whole chain into the terminal, and press Ctrl+D.

Clusters need more names. A cluster (recipe 2.4) is reached through its load balancer, so the certificate must name the load balancer’s FQDN as well as each node.

Watch the expiry date. Nothing warns you before the certificate expires. Put the notAfter date from step 8 in your calendar. You can also check it from any machine:

workstation
echo | openssl s_client -connect vco01.vmw.lab:443 2>/dev/null | openssl x509 -noout -dates

This is the certificate Orchestrator shows, not the ones it trusts. When a workflow calls another system over TLS, Orchestrator checks that system’s certificate against its own trust store. You manage that store in the Orchestrator Client with the workflows tagged ssl_trust_manager, such as Import a trusted certificate from a file (which expects a DER-encoded file). To see what’s already trusted, go to Administration > Inventory > Configuration > Keystores > CA Keystore, or run vracli vro keystore list.

See also