If your organization uses Vault as an internal certificate authority (CA) and you want to use certificates signed by Vault CA for secure mTLS communication between services within your service mesh, create an integration with Vault CA in Tanzu Service Mesh.
When your organization uses Vault as an internal CA, it can have one or multiple Vault servers that store a trusted root certificate and one or more intermediate certificates. Vault uses these CA certificates to generate and sign mTLS session certificates for authentication and encryption of services within the service mesh.
Every time a service needs an mTLS session certificate for secure communication with other services in the service mesh, the service sends a request to a Vault server from its Vault-connected cluster. Vault generates a certificate, signs it, and sends it back to the cluster. The service then uses the certificate to make mTLS authenticated and encrypted connections to other services.
If you want to use Vault CA for your service mesh, you must create a Vault integration in Tanzu Service Mesh. The integration defines a configuration that points to a Vault server. The Vault CA configuration contains such details as the URL of the Vault server, the endpoint on Vault to use for signing certificates, and the reference to the Vault server's bundle that contains the root certificate and the intermediate certificates.
After you create a Vault CA integration, you need to apply the CA label from the integration to a cluster when you onboard it. During onboarding, the Vault CA configuration is pushed to the services in the cluster, and the root and intermediate certificates are uploaded into the cluster's trust store.
Once the Vault CA configuration is applied to a cluster, the cluster is considered to be connected to the Vault server, and the services can send certificate generation and signing requests to the server. Because the cluster has the Vault server's root and intermediate certificates in its trust store, it trusts mTLS session certificates received from Vault CA.
You can view the CA health status for each connected cluster in the Tanzu Service Mesh UI.
You can also create a Vault CA integration by using the Tanzu Service Mesh API. For more information, see Create a Vault CA Integration in the Tanzu Service Mesh API Programming Guide.
Prerequisites
Verify that you are familiar with Vault concepts, such as PKI secrets engine, mount path, namespace, role, and policy. For information about these Vault concepts, see the HashiCorp Vault documentation.
Verify that you are familiar with the Kubernetes concept service account. For more information about service accounts, see the Kubernetes documentation.
Configure Vault to trust connections from your Kubernetes clusters. See step 1 in the following procedure.
Procedure
Results
The new account is added to the Vault integration card on the Integrations page. To view the details of the new Vault integration account and of the other existing integration accounts on the integration accounts details page, click View Details on the Vault integration card.
You can view the CA health status for the clusters connected to the Vault server specified in the integration account. A CA health status of CA: Connected means that the services in the cluster can successfully have certificates generated and signed by Vault CA. A CA health status of CA: Unknown means that the cluster is disconnected from the Vault server, and the services in the cluster cannot send certificate generation and signing requests to the server.
To view the CA health status of the connected clusters:
On the Global Namespaces page, click the name of the global namespace that you created. The global namespace details page displays the summary information about the global namespace, including its overall health state. The overall status of Healthy means that the configuration of the global namespace is synced and applied to the clusters that make up the global namespace. Verify that the CA: Connected status is displayed for each cluster within the global namespace by clicking the Healthy drop-down menu at the top of the page.
To access the Global Namespaces page, in the navigation pane on the left, select .
On the Clusters tab, click the name of the cluster from the displayed table. The cluster details page displays the summary information about the cluster, including its overall health state. Verify that the CA: Connected status is displayed for the selected cluster by clicking the Healthy drop-down menu at the top of the page.
To access the Clusters tab, in the navigation pane on the left, select and select the tab.
What to do next
To apply the Vault CA configuration from the integration account to a cluster so that the services deployed in the cluster can send certificate generation and signing requests to the Vault server, select the CA label from the integration account when you onboard the cluster (see step 7).
To edit a Vault integration account, click Edit in the Vault card. If you have more than one Vault account, in the lower-left corner of the card, click <number> Accounts, click the name of the account, and then click Edit. You can edit the following details:
Description. The description of the integration account in Tanzu Service Mesh.
Service Account Name. The name of the Kubernetes service account that services will use to authenticate to the Vault server when sending requests from the cluster.
Before changing the service account name in the integration account, change the service account name in the role configuration in Vault. See step 1 g.
To delete a Vault integration, click Delete. To confirm the deletion, click Confirm. If any clusters use the Vault CA configuration from the account, a warning is displayed. Select I understand the consequences of this action and click Confirm.
If you delete a Vault CA integration, and the associated CA issued certificates for the service pods on a cluster, the pods will continue to have the certificates until they expire. When the certificates expire, mTLS connectivity between the services will fail.
Also, if a pod gets deleted, it won’t be automatically recreated because the CA was removed, and no new certificates can be created.
In this case, you will need to connect another CA to the cluster and restart all the pods so that they can start using the new CA’s certificates.
You can also edit or delete an integration account from the integration account details page.
On the Vault card, click View Details.
On the integration details page, in the section for the account, click Edit Configuration or click More Actions and then click Delete Account.
You can change the Vault CA integration for a cluster by using the Tanzu Service Mesh API. We recommend changing the CA integration for a cluster only if the change will not cause that cluster and the other clusters in the global namespace to use different roots of trust. The use of different roots of trust in the global namespace will cause cross-cluster connectivity problems.