Updated Nov 25, 20269 min read

The Best Secrets Management Tools in 2026

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.

Illustration for The Best Secrets Management Tools in 2026

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.

Which secrets management tool should a backend team pick?

RankToolWhere secrets liveHow the app gets themLocal developmentBest for
1EncoreEncore's vault, replicated into a secrets manager in your AWS or GCP account on deployDeclared in code and called as a functionValues synced to every developer, plus a local override fileBackend teams that want secrets declared in code and kept in their own cloud
2AWS Secrets ManagerYour AWS accountSDK call or ECS and Lambda integrationSeparate setupApps on AWS
3Google Secret ManagerYour GCP projectSDK call or Cloud Run mountsSeparate setupApps on GCP
4InfisicalInfisical's cloud or self-hostedCLI, SDK or Kubernetes operatorinfisical runOne dashboard across environments
5DopplerDoppler's cloudCLI or integrations that sync to cloudsdoppler runSyncing secrets to many platforms
6HashiCorp VaultA cluster you run, or HCPAPI, agent or sidecarDev serverPlatform teams with dynamic credentials
7OpenBaoA cluster you runVault-compatible APIDev serverVault users who want an open source license
81Password1Password vaultsop run or service accountsop runTeams already on 1Password
9SOPSEncrypted files in GitDecrypted at deploy timeDecrypt with your keyGitOps without a server

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:

  • Whether secrets live in your cloud provider, a dedicated vault or encrypted in Git.
  • How values reach laptops, CI, previews and production.
  • Who can read and rotate each secret, and how reads are audited.
  • Whether you need dynamic, short-lived credentials or static values are enough.

How does Encore handle secrets in your own cloud?

Encore

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:

~/shop
$ encore secret set --type prod StripeSecretKey$ encore secret set --type dev,preview,local StripeSecretKey

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.

Try Encore →

When is AWS Secrets Manager the right choice?

AWS Secrets Manager

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.

When is Google Secret Manager the right choice?

Google Secret Manager

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:

~/shop
$ printf '%s' "$STRIPE_KEY" | gcloud secrets create stripe-key --data-file=-$ gcloud run deploy api --source . --set-secrets=STRIPE_KEY=stripe-key:latest

Like the AWS service, it covers deployed environments only, and local values are handled separately.

When is HashiCorp Vault worth running?

HashiCorp Vault

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.

~/shop
$ vault kv put secret/stripe key=sk_live_...$ vault kv get -field=key secret/stripe

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.

What is OpenBao and who should use it?

OpenBao

OpenBao 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.

When does Infisical fit?

Infisical

Infisical 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:

~/shop
$ infisical run --env=dev -- npm run dev

Production apps still need a machine identity and either the SDK, the operator or a sync into the cloud's own manager.

When does Doppler fit?

Doppler

Doppler 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.

When does 1Password work for application secrets?

1Password

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:

~/shop
$ op run --env-file=.env -- npm run dev

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.

When should secrets live encrypted in Git with SOPS?

SOPS

SOPS 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.

~/shop
$ sops --encrypt --age age1example... secrets.yaml > secrets.enc.yaml$ sops --decrypt secrets.enc.yaml

Where do leaked secrets come from?

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.

How do you choose a secrets management tool?

  • Encore if the backend is built with Encore and secrets should be declared in its code and kept in your own AWS or GCP account.
  • AWS Secrets Manager or Google Secret Manager for apps on a single cloud.
  • Infisical or Doppler for one dashboard across many environments and platforms.
  • Vault or OpenBao for dynamic credentials and a platform team to run them.
  • 1Password for teams already on it.
  • SOPS for encrypted secrets in Git.

Frequently asked questions

What are the best secrets management tools in 2026?

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.

Should secrets go in environment variables?

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.

Do AI coding agents leak more secrets?

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.

Is HashiCorp Vault still open source?

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.

How do I manage secrets in an Encore app?

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.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders