Overview
A secret store connects EnclaveStack to where your team already keeps secrets. Secrets read from it are kept in sync and cached encrypted.
When to use it
- Your team manages secrets in one of those stores.
- Keys rotate there and your apps should follow.
How it works
- Plain HTTP clients
- Vault KV v2, 1Password Connect, AWS Secrets Manager, Doppler and Infisical through their HTTP APIs, without vendor SDKs.
- Encrypted cache
- Each value read is stored encrypted like any secret, so apps start even while the store can’t be reached.
Each secret that reads from a store is fetched again every refresh interval (5 minutes by default) and on Refresh now. If the store can’t be reached, the last value stays in use and the secret says why.
Architecture
- Control plane to Your secret store: read every 5 min
- Control plane to Encrypted value
- Encrypted value to Apps: at start
Flows
Connecting Vault
- Store a Vault token as a secret.
- Create the secret store with the address and that secret, then Test.
- Create secrets that read their value from it.
Set it up
In the console
- Store the store’s token as a secret.
- Open Secret stores and choose New secret store.
- Use Test to check the connection.
With the CLI
enclave secretstore create team-vault --provider vault --address https://vault.example.com --token-secret vault-tokenWith OpenTofu
OpenTofu configuration
resource "enclave_secret_store" "team_vault" {
name = "team-vault"
secret_provider = "vault"
settings = {
address = "https://vault.example.com"
tokenSecret = "vault-token"
}
}Settings reference
Every setting and output of the OpenTofu resource; the console and the CLI use the same names in their own words. Generated from platform 4d30582.
| Name | Type | Use | What it does |
|---|---|---|---|
name | text | required | Name of the secret store: 3–40 lowercase letters, digits or hyphens, starting with a letter. Changing it replaces the secret store. |
secret_provider | text | required | vault, onepassword, aws, doppler or infisical ("provider" is reserved by OpenTofu). Changing it replaces the store. |
settings | map of text | required | The provider's settings, as the API names them: map[aws:[region credentialsSecret endpoint] doppler:[tokenSecret endpoint] infisical:[siteUrl projectId environment path credentialsSecret] onepassword:[connectUrl vault tokenSecret] vault:[address mount namespace tokenSecret]]. |
project | text | optional | The project to create it in. Defaults to the provider's project (ENCLAVE_PROJECT, else default). Changing it replaces the resource. |
refresh_seconds | number | optional | How often synced secrets are read again (60–86400; default 300). |
id | text | output | Resource ID. |
Limits and security
Good to know
- Refresh every 60 seconds to 24 hours.
Security
- Store tokens are secrets themselves; values are cached encrypted.