If your organization uses Vault as an internal certificate authority (CA) and you want to use certificates signed by Vault CA to enable secure mTLS communication between services within your service mesh, you must create an integration with Vault CA using the Tanzu Service Mesh API.
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 that are used for authenticated and encrypted traffic between 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 cluster trusts the certificate because it stores Vault CA's root and intermediate certificates in its trust store. 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 CA 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 CA root and intermediate certificates in its trust store, it trusts mTLS session certificates received from Vault CA.
To create a Vault CA integration through the API, you must make these API calls:
Upload the CA bundle containing the Vault server's root and intermediate certificates to Tanzu Service Mesh. This step is optional and you must do it only if you use a self-signed root certificate that is not publicly available.
Create an external account to define the Vault CA configuration.
Create a certificate authority (CA) integration to generate the Vault CA label.
The following procedure describes how to make these API calls.
Prerequisites
Get an API token and an access code to authenticate your requests to theTanzu Service Mesh API. You must use the access code in the csp-auth-token header in your requests. For information about generating an API token and getting an access code, see Authentication with the Tanzu Service Mesh REST API.
Configure Vault to trust connections from your Kubernetes clusters. For detailed information about the configuration steps to perform on Vault, see step 1 in Create a Vault CA Integration Account.
Procedure
What to do next
To apply the Vault CA configuration from the Vault integration to a cluster during onboarding, provide the CA label as the value of caLabels[].value
in the API call to onboard the cluster.
You can change the Vault CA integration for a cluster. 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.