Why Use External Secrets?
Instead of storing sensitive values directly in Flipt configuration files, external secrets provide:- Enhanced Security: Sensitive data is stored in dedicated secret management systems with proper access controls
- Centralized Management: All secrets managed in one place with audit trails and access policies
- Environment Separation: Different secrets for development, staging, and production environments
- Rotation Support: Easy secret rotation without updating configuration files (coming soon)
- Access Control: Fine-grained permissions for who can access which secrets
Supported Providers
Flipt supports multiple secret providers to fit different deployment scenarios:File Provider
Store secrets in local files - ideal for development and simple deployments
HashiCorp Vault
Enterprise-grade secret management with advanced authentication and access
controls
AWS Secrets Manager
Retrieve secrets from AWS Secrets Manager using standard AWS credentials
GCP Secret Manager
Retrieve secrets from Google Cloud Secret Manager with Application Default
Credentials or service account keys
Azure Key Vault
Retrieve secrets from Azure Key Vault using Azure identity credentials
Configuration Overview
Enable secrets management by configuring providers in your Flipt configuration:File Provider
The file provider is the simplest option, storing each secret as an individual file in the configured directory.Configuration
Usage
Create individual secret files in the configured directory. Each file becomes a secret where the filename is the key and the file contents are the value:Each secret is stored as a separate file. The filename becomes the secret key,
and the file contents become the secret value.
HashiCorp Vault Provider
Vault provides enterprise-grade secret management with advanced features like dynamic secrets, encryption as a service, and detailed audit logs.Basic Configuration
Authentication Methods
Token Authentication
Best for development and testing:Kubernetes Authentication
Ideal for Kubernetes deployments:AppRole Authentication
Good for automated systems and CI/CD:Environment Variables
Avoid storing sensitive values in configuration files by using environment variables:AWS Secrets Manager Provider
The AWS Secrets Manager provider retrieves secrets stored in AWS Secrets Manager. It uses the AWS SDK for Go v2, which automatically resolves credentials from the standard AWS credential chain.Configuration
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | bool | No | false | Enables the AWS Secrets Manager provider |
endpoint_url | string | No | (empty) | Custom endpoint URL (useful for LocalStack testing) |
Authentication
The AWS provider relies on the default AWS credential chain. You can authenticate using any of the following methods:- Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY, and optionallyAWS_SESSION_TOKENfor temporary credentials) - Shared credentials file (
~/.aws/credentials) - IAM roles for Amazon EC2 or ECS
- IAM Roles Anywhere
- SSO credentials
AWS_DEFAULT_REGION or AWS_REGION environment variable.
Environment Variables
Custom Endpoint
For local development with LocalStack or other AWS-compatible services, specify a custom endpoint:GCP Secret Manager Provider
The GCP Secret Manager provider retrieves secrets stored in Google Cloud Secret Manager. It supports both global and regional secrets.Configuration
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | bool | No | false | Enables the GCP Secret Manager provider |
project | string | Yes (when enabled) | (none) | GCP project ID |
location | string | No | (empty) | GCP region for regional secrets |
credentials | string | No | (empty) | Path to a service account credentials JSON file |
Authentication
The GCP provider supports two authentication methods:- Application Default Credentials (ADC): Automatically used when no
credentialspath is specified. This works with GCE metadata, GKE workload identity, andgcloud auth application-default login. - Service account key file: Specify an explicit path to a service account JSON credentials file.
Regional Secrets
By default, the provider accesses global secrets. To use regional secrets, specify thelocation field:
Environment Variables
Azure Key Vault Provider
The Azure Key Vault provider retrieves secrets stored in Azure Key Vault. It uses the Azure SDK for Go withDefaultAzureCredential, which supports multiple authentication methods.
Configuration
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
enabled | bool | No | false | Enables the Azure Key Vault provider |
vault_url | string | Yes (when enabled) | (none) | Azure Key Vault URL (for example, https://my-vault.vault.azure.net/) |
Authentication
The Azure provider usesDefaultAzureCredential, which tries multiple authentication methods in order:
- Environment variables (
AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_CLIENT_SECRET) - Workload identity (for Kubernetes)
- Managed identity (for Azure VMs, App Service, and other Azure services)
- Azure CLI credentials
Environment Variables
Using Secrets in Configuration
Secrets can be referenced throughout your Flipt v2 configuration using the secret reference syntax. Secret references must always include the provider specification.Secret Reference Syntax
Secret references use the format${secret:provider:key} where:
provideris the name of the configured secrets provider (e.g.,file,vault,aws,gcp,azure)keyis the name of the secret to retrieve
File Provider Examples
Vault Provider Examples
Cloud Provider Examples
For cloud providers (AWS, GCP, Azure), thekey in the secret reference corresponds to the exact secret name as stored in the provider. Path separators and version specifiers are not supported in the key โ use the secretโs name directly.
Combined with Environment Variables
You can combine secret references with environment variables in the same configuration:Structured Secret References
For more complex scenarios, you can also use the structuredkey_ref format in configuration sections that support it: