Lockwell

Secrets and environments

Every secret versioned, every environment a folder

Keep API keys, database URLs and certificates as KV v2 secrets in folders your team names. Each write is a new version; nothing is lost to a typo.

The secrets editor On Lockwell

Open Secrets in the console and your environments are your top-level folders: dev/, staging/, prod/. Each folder lists its secrets with their current version and when they last changed. No value is read to draw the list.

  • Reveal shows one secret's fields for you, answered no-store so no browser or proxy keeps it. A value is never in a URL.
  • Write sets a field as a new version. A change made by someone else in between is refused rather than overwritten.
  • Delete is a soft delete you can undo. Destroy removes every version for good, after you type the secret's name.
  • New environment starts with its first secret.

Owners and admins change secrets in the editor. Members can list and reveal app/ and shared/.

Environments / prod / lw-<team>/prod/

NameVersionUpdatedActions
DATABASE_URLv72 hours ago RevealDelete
STRIPE_KEYv3yesterday RevealDelete
SESSION_SECRETv123 days ago RevealDelete
SENTRY_DSN deletedv25 Dec Undelete

DATABASE_URL v7 revealed for you, not cached

valuepostgres://app:••••••••@db.internal:5432/app

An environment's secrets with their versions and when each changed; values stay hidden until someone allowed reveals one.

Versions, check-and-set and rollback On Lockwell

Each path keeps its last 10 versions unless you set max_versions. Read any of them by number, undelete a soft-deleted one, or write an old value back as the newest. With "options": {"cas": N} a write names the version it replaces, so two deploys can't silently overwrite each other.

# a new version of prod/DATABASE_URL (KV v2); "cas": 0 means "only if it doesn't exist yet"
curl -sf -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/lw-<team>/data/prod/DATABASE_URL" \
  -d '{"data": {"value": "postgres://app:…@db.internal/app"}, "options": {"cas": 0}}'

# read the current version, or any of the last ten
curl -sf -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/lw-<team>/data/prod/DATABASE_URL" | jq -r .data.data.value
curl -sf -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/lw-<team>/data/prod/DATABASE_URL?version=2"

Change one field, see what changed On Lockwell

A merge patch changes some fields and keeps the rest. A diff names the fields a version added, removed or changed, including nested ones like tls.key, without showing a value. Subkeys show a secret's shape to someone who doesn't need its values.

# change one field, keep the rest: a JSON merge patch, check-and-set inside Vault
curl -sf -X PATCH -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/lw-<team>/data/prod/db" \
  -d '{"data": {"password": "…"}}'
# which fields version 4 changed against 3, never a value
curl -sf -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/lw-<team>/diff/prod/db?from=3&to=4" | jq .data
# the shape of a secret (field names, values null) for a reader who doesn't need the values
curl -sf -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/lw-<team>/subkeys/prod/db" | jq .data.subkeys

References: one value made of others On Lockwell

Write a connection string once from its parts with ${lw-<team>/path#field}. It follows the parts when they change. References are filled in only when a read asks for ?resolve=true, and only for a reader who may read each secret they name. A writer can't name a secret they can't read.

# a value made of other secrets' fields, written once, following them when they change
curl -sf -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/lw-<team>/data/prod/DATABASE_URL" \
  -d '{"data": {"value": "postgres://app:${lw-<team>/prod/db#password}@db.internal/app"}}'
# filled in only when a read asks, each reference checked and audited as the reader
curl -sf -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/lw-<team>/data/prod/DATABASE_URL?resolve=true"

Short-lived versions On Lockwell

Set delete_version_after on a secret's metadata (24h, 7d) and each new version is soft-deleted that long after it's written. Use it for a CI token or a one-off password that shouldn't outlive its use.

Restore a folder as of a time On Lockwell

A script overwrote half of prod/ at 09:05? Preview what the folder held at 09:00, then put it back. Each secret's version from then comes back as a new version. Secrets made since are soft-deleted, and nothing is destroyed, so a restore can itself be undone. More in Undo a bad change.

Environments and your plan

An environment is a top-level folder, and folders can nest inside it (the editor opens them up to eight deep). Vault itself enforces your plan's numbers. At the limit, a new secret or a new top-level folder is refused with the reason, while changing a secret you already have never is. Deleting a secret for good makes room. See pricing.

Layering environments

Keep what every environment shares in shared/ and only what differs in prod/, then read both with later folders winning. The lw_env shell function does exactly that.

Move your first app's secrets in an afternoon.

Free for up to 100 secrets and 2 machine identities. Every teammate is free on every plan.