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, thensudo su -(recipe 2.1). - A workstation with
opensslandscp. - 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
- 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.
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"- Submit
vco01.csrto 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. - Check that the key and the certificate belong together. The two commands must print identical output:
openssl x509 -noout -pubkey -in vco01.crt | openssl sha256openssl pkey -pubout -in vco01.key | openssl sha256- Build one PEM file that holds, in this order, the private key, the appliance certificate, any intermediate CA certificates, and the root CA certificate:
cat vco01.key vco01.crt intermediate-ca.crt root-ca.crt > vco01-chain.pem- Copy the file to the appliance.
scplogs in asvmware-system-userlike SSH does (recipe 2.1), so copy it to that user’s home folder:
scp vco01-chain.pem vmware-system-user@vco01.vmw.lab:~- SSH in as
vmware-system-user, switch torootwithsudo su -, move the file into root’s home folder, and load the certificate:
mv /home/vmware-system-user/vco01-chain.pem /root/vracli certificate ingress --set /root/vco01-chain.pem- Apply it by redeploying the services. Don’t interrupt the script. It’s finished when it prints
Prelude has been deployed successfully.
/opt/scripts/deploy.sh- Confirm the appliance is now using the new certificate:
vracli certificate ingress --list | openssl x509 -noout -subject -issuer -datesSSH session on vco01 showing the output of vracli certificate ingress --list | openssl x509 -noout -subject -issuer -dates, with the lab CA as issuer.
- Delete the PEM file from the appliance, because it contains the private key:
rm /root/vco01-chain.pem. Store your copy somewhere safe. - Browse to
https://vco01.vmw.labfrom a machine that trusts your CA. The browser should show a secure connection with no warning.
Browser certificate viewer for https://vco01.vmw.lab, showing the certificate chain up to the lab root CA and the Subject Alternative Name field.
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.
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.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.deploy.sh takes on the 9.1.1 lab appliance, so the book can give readers a realistic maintenance window.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:
echo | openssl s_client -connect vco01.vmw.lab:443 2>/dev/null | openssl x509 -noout -datesThis 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
- 2.4 Building a three-node cluster, which needs a certificate with extra SANs.
- 2.3 Managing the package signing certificate, the other certificate the appliance generates for itself.
- Broadcom TechDocs: Manage VCF Operations orchestrator certificates.
- Broadcom KB 445001: the certificate and private key don’t match.
- Broadcom KB 423661: checking certificate expiry dates on 8.18.1 and later.
