Preparing for Transport Layer Security (TLS)

This topic describes how to provide an existing Certificate Authority (CA) certificate to BOSH CredHub and how to generate a new CA certificate with BOSH CredHub, if you do not already have one.

WARNING: This procedure involves restarting all of the VMs in an existing VMware Tanzu Application Service for VMs (TAS for VMs) deployment in order to propagate a CA certificate. The operation can take a long time to complete.


Enabling TLS provisions VMware Tanzu GemFire for VMs service instances with a certificate, so that apps, gfsh, and Pulse can establish encrypted connections with the Tanzu GemFire service instance.

The certificate deployed on the Tanzu GemFire service instance is a server certificate. The server certificate is generated by CredHub, a component designed for centralized credential management in TAS for VMs. CredHub is deployed on the same VM as the BOSH Director.

CredHub generates the server certificate using a Certificate Authority (CA) certificate. The CA certificate must be provided to CredHub by the operator or generated by CredHub.

Apps use the CA certificate to authenticate components of Tanzu GemFire service instances. Apps that communicate with Tanzu GemFire must have access to the CA certificate in order to validate that the server certificate can be trusted.

WARNING: An operator must rotate the CA certificate if it expires or if it becomes compromised. To rotate your CA certificate, see Managing Certificates. Do not attempt to rotate a CA certificate on your own. Contact Support and perform the procedure with their assistance.

Provide or Generate a CA Certificate

TLS authorization requires a credential generated by CredHub. You do not need to create a new User Account and Authentication (UAA) client for CredHub specifically to support TLS, as long as a UAA Client exists with credhub.write and permissions. The client used in this section is one that was created during the Ops Manager installation process: the ops_manager client.

Perform the following steps to log in to CredHub and provide or generate a CA certificate:

  1. From the Ops Manager VM, set the API target of the CredHub CLI to your CredHub server.

    Run the following command:

    credhub api https://BOSH-DIRECTOR:8844 --ca-cert=/var/tempest/workspaces/default/root_ca_certificate

    where BOSH-DIRECTOR is the IP address of the BOSH Director VM.

    For example:

    $ credhub api --ca-cert=/var/tempest/workspaces/default/root_ca_certificate

  2. Log in to CredHub.

    Run the following command:

    credhub login --client-name=CLIENT-NAME --client-secret=CLIENT-SECRET

    where CLIENT-NAME is the client name, usually ops_manager or a CredHub-specific UAA client of your own creation, and CLIENT-SECRET is the client secret which can be found under the Credentials tab of the Ops Manager tile with the name Bosh Commandline Credentials.

    For example:

    $ credhub login \
        --client-name=ops_manager \

  3. Use the CredHub CLI to check whether a services CA certificate already is present.

    • Enter the following command:
      $ credhub get \
    • If you already have a certificate at the services/tls_ca path, skip to step 5.
  4. Use the CredHub CLI to generate a CA certificate or provide an existing one.

    Note: Your deployment may have multiple CA certificates. VMware recommends a dedicated CA certificate for services.

    • If you do not have a CA certificate, use the CredHub CLI to generate one. Enter the following command:
      $ credhub generate \
          --name="/services/tls_ca" \
          --type="certificate" \
          --no-overwrite \
          --is-ca \
    • If you have an existing CA certificate that you want to use, create a new file called root.pem with the contents of the certificate. Then enter the following command, specifying the path to root.pem and the private key for the certificate:
      $ credhub set \
          --name="/services/tls_ca" \
          --type="certificate" \
          --certificate=./root.pem \
  5. Use the BOSH CLI v2 to extract the certificate portion from the CA certificate and print it. Enter the following command:

    $ bosh interpolate <(credhub get --name=/services/tls_ca) \

  6. Record the output of the bosh interpolate command from step 5.

Add the CA Certificate to Ops Manager

Add the CA certificate to Ops Manager by adding it to the BOSH Director tile and the Tanzu Application Service tile.

Add the CA certificate to the BOSH Director tile:

  1. Navigate to the Ops Manager Installation Dashboard and select the Bosh Director tile. Click Security.

  2. Paste the contents of the CA certificate into Trusted Certificates. Append to existing Trusted Certificates, if there are already certificates listed. Security: Trusted Certificates

  3. Include Tanzu Ops Manager Root CA in Trusted Certs

    Checking this box will place the Tanzu Ops Manager Root CA into the trusted certificate field. The Bosh Director will then place this CA into the trust store of every VM that it deploys. Security: Include Trusted

  4. Generate VM passwords or use single password for all VMs

    Choose Generate passwords or Use default BOSH password, whichever suits your implementation. Security: Generate VM passwords

  5. Click Save.

Add the CA certificate to the Tanzu Application Service tile

  1. The CA certificate must also be added for the Gorouter. Navigate to the TAS tile’s Settings tab.

  2. Click on Networking. Add the CA certificate to the box labeled Certificate Authorities Trusted by Gorouter.
    Networking: CA Gorouter

  3. Scroll down and add the CA certificate to the box labeled Certificate Authorities trusted by the HAProxy.
    Networking: CA HA Proxy

  4. Click Save.

Save Your Changes

  1. Return to the Installation Dashboard.
  2. Click Review Pending Changes (see Reviewing Pending Product Changes).
  3. Click Apply Changes.