Retrieve secrets from GCP Secrets Manager
Learn how to use Google Cloud Platform (GCP) Secrets Manager to store your Retool resource secrets.
| Secrets Manager Availability | |||
|---|---|---|---|
| Self-hosted Edge 3.36 or later | Generally Available | ||
| Self-hosted Stable 3.33 or later | Generally Available | ||
Configuring Resources in Retool can require handling sensitive values, e.g., database passwords or API keys. Retool is SOC 2 Type 2 compliant, and most customers store these values with Retool. However, depending on your security posture, you may want to store secret values externally, rather than encrypted in Retool’s database. To support this, you can store and retrieve secrets from GCP Secrets Manager.
Requirements
To use the GCP Secrets Manager with Retool, you must:
- Run self-hosted Retool on versions 3.20 or later on the Enterprise plan.
- Have admin permissions for your Retool organization.
- Already have GCP Secrets Manager configured to store your secrets.
1. Set up Application Default Credentials
In GCP, set up application default credentials to grant Retool access to your secrets.
Workload Identity on Google Kubernetes Engine (GKE)
If you are using Google Kubernetes Engine to host Retool, you can use workload identity to set up application default credentials. Retool already creates a service account called retool in the GKE cluster. To complete the setup, add your IAM service account annotation to this pre-existing service account.
Alternatively, to automate this process, you can inject the annotations via values.yaml in the Retool Helm chart:
serviceAccount:
create: true
name:
annotations:
iam.gke.io/gcp-service-account: ${gke_service_account}
2. Configure Secrets Manager in Retool
Secrets management must be configured for the primary organization, and for any spaces within an organization that need to use secrets.
For multiple deployment instances of Retool, make the same changes to your organization (and spaces within the organization) for each instance in which you want to use secrets.
For each Retool Space, navigate to Settings > Secrets Manager and enter the Project ID and Project Number associated with your GCP Secrets Manager instance, and an optional Namespace. Click Test connection to confirm Retool can connect to your GCP Secrets Manager, then click Save.