Use the Secrets Proxy
This feature is available in the Standard Plan and above. For more information, see our pricing plans or contact our sales team.
This feature is in Alpha and requires UXP v2.2. Secrets proxy should not be used in production environments without testing.
The Secrets Proxy lets Crossplane providers read and write secrets directly to HashiCorp Vault instead of storing them as Kubernetes Secrets. Providers use the standard Kubernetes Secret API. The Secrets Proxy intercepts those calls and routes them to Vault transparently.
Prerequisites​
Before you begin, ensure you have:
- kubectl installed
- Helm installed
- The Vault CLI installed
- The
upCLI installed - A UXP cluster running version v2.2.0-up.3 or later and a Standard license
- A HashiCorp Vault instance reachable from your cluster, with Kubernetes auth enabled
Enable the Secrets Proxy​
Enable the Secrets Proxy on your UXP installation:
helm repo add upbound-stable https://charts.upbound.io/stable && helm repo update
helm install crossplane \
--namespace crossplane-system \
--create-namespace \
upbound-stable/crossplane \
--devel \
--set upbound.secretsProxy.enabled=true
kubectl get pods -n crossplane-system -w
Configure Vault​
Store the AWS credentials that the provider reads. The Secrets Proxy serves
these to providers as if they were a Kubernetes Secret, using the ini format
expected by the AWS provider family:
vault kv put secret/crossplane-system/aws-official-creds credentials="
[default]
aws_access_key_id = <AWS_ACCESS_KEY_ID>
aws_secret_access_key = <AWS_SECRET_ACCESS_KEY>
"
Create a policy granting read access to secrets in crossplane-system:
vault policy write crossplane- <<'EOF'
path "secret/*" {
capabilities = ["create", "read", "update", "delete", "list"]
}
path "secret/metadata/*" {
capabilities = ["create", "read", "update", "delete", "list"]
}
EOF
Allow the secret-store-vault service account in crossplane-system to use the
new crossplane policy you just created:
vault write auth/kubernetes/role/crossplane \
bound_service_account_names="secret-store-vault" \
bound_service_account_namespaces=crossplane-system \
policies=crossplane\
ttl=24h