1 Location and Basic Usage¶
LSST Data Management maintains an instance of HashiCorp’s Vault product at vault.lsst.codes.
To use Vault, set VAULT_ADDR to https://vault.lsst.codes, and set the appropriate token (described later) in the environment variable VAULT_TOKEN.
Then use the Vault CLI (or other client of your choice) to access secrets under the structure allowed for your token.
Note that we are using Version 2 of the KV Secret Engine (allowing versioned secrets), and therefore you must read and write secrets with vault kv get or vault kv put rather than simple vault read or vault write commands.
2 Vault Implementation¶
There is currently a single Vault instance for LSST Data Management. That instance is deployed in the Roundtable Kubernetes cluster hosted on GCP. It is deployed using the standard HashiCorp Vault Helm chart. The server uses Let’s Encrypt certificates and does not require client certificate authentication. See the operational documentation for more information.
Figure 1 Roundtable Vault deployment¶
In the future, we may separate the Vault instance for production services running at the LDF from the Roundtable Vault for other supporting services and test environments.
Each Kubernetes cluster that uses Vault to store secrets has one instance of the Kubernetes Vault Secrets Operator deployed in the cluster.
This service is responsible for retrieving secrets from Vault and materializing them as Kubernetes Secret resources.
This is configured via Kubernetes VaultSecret resources.
HashiCorp provides a Vault Agent Injector as an alternate way to integrate Kubernetes workloads with Vault. We considered using this instead of Vault Secrets Operator primarily because HashiCorp supports it, but decided against it for several reasons:
Vault Secrets Operator allows us to generate one Vault token per Kubernetes cluster that has read access to all secrets for that cluster. Vault Agent Injector requires either co