Encore, AWS Secrets Manager, Google Secret Manager, Infisical, Doppler, HashiCorp Vault, OpenBao, 1Password and SOPS ranked by where secrets live, how they reach the app and how they work on a laptop.

The best secrets management tool keeps values in your own cloud and out of the repository, and Encore ranks first: with infrastructure from code, secrets are declared by name in backend code and land in a secrets manager in your own AWS or GCP account.
AWS Secrets Manager and Google Secret Manager come next for apps on one cloud. Storing a secret is the easy part, and the work that remains is keeping local, preview and production values in step.
Verdict: keep production secrets in your cloud's own manager, under the same IAM rules as the services that read them, and let Encore declare them in code so local, preview and production values stay in step without extra wiring. Use AWS Secrets Manager or Google Secret Manager directly when the app is not built with Encore, Infisical or Doppler when secrets have to reach several platforms, and Vault or OpenBao when you need short-lived database and cloud credentials and have a platform team to run them.
What you need to decide:
In Encore, a secret is a named declaration in backend code, and the value is read by calling it:
// payments/stripe.ts
import { api } from "encore.dev/api";
import { secret } from "encore.dev/config";
const stripeKey = secret("StripeSecretKey");
export const balance = api(
{ expose: false, method: "GET", path: "/payments/balance" },
async (): Promise<{ available: number }> => {
const resp = await fetch("https://api.stripe.com/v1/balance", {
headers: { Authorization: `Bearer ${stripeKey()}` },
});
const body = (await resp.json()) as { available: { amount: number }[] };
return { available: body.available[0]?.amount ?? 0 };
},
);
Values are set per environment type, from the dashboard or the CLI:
Local values sync to everyone working on the app, and a .secrets.local.cue file overrides them on one machine. A missing secret is a warning locally and a failed deploy in the cloud, so a new secret cannot reach production without a value.
When you deploy to your own cloud, Encore provisions a secrets manager in that account, replicates the values into it and injects them into each service as secret environment variables. On AWS the values sit in Secrets Manager, and the AWS infrastructure docs describe each service getting access only to the secrets it needs.
The code holds names, not values, which matters once an AI coding agent writes part of the backend. The agent can add secret("SendgridApiKey") in the same change as the feature, and a person sets the value with encore secret set, so the key never lands in the repository.
It only applies to apps built with Encore, so secrets for other systems, such as CI or a separate frontend, still need one of the tools below.
AWS Secrets Manager stores secrets encrypted with KMS, controls access with IAM and logs reads to CloudTrail. It rotates RDS and other credentials with managed or Lambda-based rotation, and ECS and Lambda can inject values at startup. Reading a secret from code is one SDK call:
import { SecretsManagerClient, GetSecretValueCommand } from "@aws-sdk/client-secrets-manager";
const client = new SecretsManagerClient({});
const { SecretString } = await client.send(
new GetSecretValueCommand({ SecretId: "prod/stripe" }),
);
Pricing is per secret per month plus API calls, so caching values in the process matters at high request rates. Local development has no equivalent, and each service needs an IAM policy for each secret.
Google Secret Manager stores versioned secrets per project with IAM access per secret and audit logs. Cloud Run can mount a secret as an environment variable or a file, which avoids SDK code:
Like the AWS service, it covers deployed environments only, and local values are handled separately.
Vault covers the widest range of features on this list. Beyond key-value storage, it issues dynamic database and cloud credentials that expire, acts as a certificate authority and encrypts data as a service. Apps authenticate with Kubernetes, AWS IAM or other methods and read through the API, the Vault Agent or a sidecar.
Running Vault well means high availability, unsealing, backups and policy management, which is a platform team's job. HCP Vault is the managed option. HashiCorp moved Vault and Terraform to the Business Source License in 2023. The Terraform change prompted the OpenTF fork, now OpenTofu.
OpenBaoOpenBao is a fork of Vault's last open source release, maintained under the Linux Foundation with the MPL 2.0 license. Its API and most engines are compatible with Vault, so existing clients and policies carry over, and it is developed in the open with its own roadmap. It brings the same operational load as self-hosted Vault.
InfisicalInfisical is an open source secrets platform with a dashboard for projects and environments, secret versioning, rotation and a Kubernetes operator, available as a hosted service or self-hosted. The CLI injects values into any command, which covers local development:
Production apps still need a machine identity and either the SDK, the operator or a sync into the cloud's own manager.
DopplerDoppler organises secrets into projects and configs per environment and syncs them into AWS Secrets Manager, Google Secret Manager, Vercel, GitHub Actions and many other targets, and doppler run -- npm start injects values locally. It suits teams deploying to several platforms that want one source of truth. Doppler is hosted by default and also offers an on-premises option.
1Password's developer tools let .env files reference vault items instead of holding values, and op run resolves them when a command starts:
# .env
STRIPE_KEY="op://Shop/Stripe/secret-key"
op run reads that file, resolves each reference and starts the command with the values in its environment:
Service accounts and Connect servers cover CI and production, and it fits teams that already keep credentials in 1Password, with fewer infrastructure features such as dynamic credentials.
SOPSSOPS encrypts the values in YAML, JSON or env files with age, PGP or a cloud KMS key, leaving the keys readable, so encrypted secrets live in Git next to the code and diff cleanly. It is popular with Flux and Argo CD. There is no server and no audit log of reads, and rotation means re-encrypting and committing.
Leaked keys usually come from code and chat tools, not from the secrets store. GitGuardian's State of Secrets Sprawl 2026 counted 28.65 million new hardcoded secrets in public GitHub commits in 2025, up 34% on the year before, and found that internal repositories are about six times more likely than public ones to contain one. About 28% of incidents started outside code altogether, in tools like Slack, Jira and Confluence.
Whatever the tool, use one secret per purpose and separate values per environment, run a scanner on the repository, rotate anything that has been committed and keep secrets out of logs and error reports.
For apps on one cloud, that cloud's own manager, AWS Secrets Manager or Google Secret Manager, is the default because IAM already controls who can read each secret. Infisical and Doppler suit teams that want one dashboard for every environment, Vault and OpenBao suit platform teams that need dynamic credentials, 1Password suits teams already on it, and SOPS suits teams that keep encrypted secrets in Git.
Yes. For most apps they are the normal way in, as long as you handle them with care. Environment variables are the most common way to hand a secret to a process, and most tools on this list inject them. They leak through crash reports, debug pages and child processes, so keep the set small, never log the environment and read secrets once at startup.
Yes. GitGuardian's State of Secrets Sprawl 2026 report found that commits co-authored with Claude Code leaked secrets at a 3.2% rate, against a 1.5% baseline across public GitHub, and counted 24,008 unique secrets in MCP configuration files. Keeping values out of the repository entirely, and giving agents secret names rather than values, closes most of that gap.
No. HashiCorp moved Vault to the Business Source License in 2023. OpenBao is a fork of the last open source version, maintained under the Linux Foundation with the MPL 2.0 license and a largely compatible API.
Declare the secret in code with const stripeKey = secret("StripeSecretKey") from encore.dev/config and call stripeKey() where you need the value. Set values with encore secret set --type prod StripeSecretKey for production and --type dev,preview,local for the rest. Encore checks that every declared secret has a value before a deploy, and in your own AWS or GCP account it stores the values in a secrets manager and injects them into each service at runtime.
Deploy to your cloud on AWS and Google Cloud without managing infrastructure
Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.