Vault

Vault KV v1: Static Secret Management with a Simple Key/Value Engine

2026-04-19
NicheeLab Editorial Team

KV v1 is a simple key/value secret engine with no versioning or metadata. It focuses on read, write, and delete, and is well suited for initial bootstrap secrets and storing small configuration values.

In modern Vault deployments, KV v2 is typically the default, so to use v1 you must explicitly pass -version=1 at enable time. This difference and the path layout come up often on the exam.

KV v1 Overview and Design Principles

KV v1 is a static secret store that saves keys and values as-is under a specified mount. It keeps no version history or deletion history, and operations are essentially just PUT, GET, LIST, and DELETE. There are no leases or automatic expiration as with dynamic credentials.

Simplicity is the biggest advantage, making it a fit for app bootstrap API keys, webhook tokens, and small configuration values. Even though KV v2 tends to be the default today, when version management is unnecessary or low priority, v1 is lighter to operate and keeps policies and path design simpler.

  • Aimed at static secrets. No leases or automatic rotation
  • No versioning. Deletes are immediate and irreversible
  • Paths are <mount>/<path> (e.g., secret/app)
  • LIST requires the explicit list capability
  • Response Wrapping is available as a protocol feature (engine-agnostic)

KV v1 logical flow (authorize → store)

Client (App)capabilities (R/W)Vault Corepolicy check / token authStorage backende.g., RaftPUT/GET/LIST/DELETE <mount>/<path>; audit logs are recorded by Vault core

Enabling and Basic Operations (CLI and HTTP)

To use KV v1, pass -version=1 at mount time. From there you simply PUT/GET/LIST/DELETE against mount/path. Values are a simple key=value map, and the CLI can handle multiple k=v pairs at once.

LIST requires the dedicated HTTP method (LIST) and the policy capability=list. Deletion is immediate; there is no soft delete, undelete, or destroy operation as in v2.

  • Enable: vault secrets enable -version=1 kv
  • Write: vault kv put <mount>/<path> k=v ...
  • Read: vault kv get <mount>/<path>
  • List: vault kv list <mount>/<prefix>
  • Delete: vault kv delete <mount>/<path> (irreversible)

Minimal CLI and HTTP API workflow

# kv v1 を secret/ にマウント
vault secrets enable -path=secret -version=1 kv

# 書き込み(複数キー)
vault kv put secret/app api_key=s3cr3t env=prod

# 読み取り
vault kv get secret/app

# 一覧(末尾スラッシュに注意)
vault kv list secret/

# 削除(即時・不可逆)
vault kv delete secret/app

# HTTP API(書き込み)
curl \
  -H "X-Vault-Token: $VAULT_TOKEN" \
  -X PUT \
  -d '{"api_key":"s3cr3t","env":"prod"}' \
  "$VAULT_ADDR/v1/secret/app"

# HTTP API(読み取り)
curl -H "X-Vault-Token: $VAULT_TOKEN" "$VAULT_ADDR/v1/secret/app"

KV v1 vs v2 (Exam-Focused Comparison Table)

The Associate exam frequently asks about the differences between v1 and v2. In particular, lock in the path layouts (v1 is <mount>/<path>; v2 uses data/ and metadata/) and the presence or absence of delete/undelete and CAS.

The CLI auto-detects the mount version in many situations, but policy path expressions and HTTP API endpoints are clearly different.

  • v1 is simple, with no versioning and immediate delete
  • v2 supports versioning, CAS, and soft delete/undelete
  • Policy path expressions are the biggest pitfall
ItemKV v1KV v2
Data versioningNoneYes (version management, metadata retention)
API path (read/write)/v1/<mount>/<path>/v1/<mount>/data/<path>
API path (list)LIST /v1/<mount>/<prefix>LIST /v1/<mount>/metadata/<prefix>
Delete behaviorImmediate delete (no recovery)Soft delete with undelete; destroy for permanent removal
CAS (Check-And-Set)Not supportedSupported (prevents conflicts)
Example policy pathpath "secret/*" { ... }path "secret/data/*" (read/write), "secret/metadata/*" (list/manage)

Policy Design and Least Privilege (Do Not Forget LIST)

Vault is deny-by-default. With KV v1, grant read, write (create/update), delete, and list with least privilege. In particular, vault kv list will fail unless LIST is explicitly granted.

For v1, the path is <mount>/* (e.g., secret/*). Do not confuse this with v2's data/metadata paths. Carving prefixes by team or app makes it easier to scale in the future.

  • Default deny → explicitly grant least-privilege capabilities
  • LIST is a dedicated capability, separate from read
  • Split path granularity by app/environment (e.g., secret/prod/appA/*)
  • Separate write-only and read-only tokens

Sample ACL policy for KV v1 (HCL)

path "secret/appA/*" {
  capabilities = ["create", "read", "update", "delete", "list"]
}

# 読み取り専用の例
path "secret/appA/*" {
  capabilities = ["read", "list"]
}

# ルート一覧のみ(インベントリ用途)
path "secret/" {
  capabilities = ["list"]
}

Operational Best Practices and Pitfalls

Because KV v1 has no versioning, accidental deletes and overwrites hit you directly. Make the change flow explicit and put reviews and backups in place (for example, periodic exports stored encrypted) to stay safe.

Organize key naming with prefixes and structure them hierarchically by environment, app, and purpose. Large binaries or data that needs frequent updates are a poor fit; consider an external store or KV v2 in those cases. Always enable audit devices so you have a record of who read which path.

  • Deletes are irreversible → require pre-review and export mechanisms
  • Separate paths by environment and app (e.g., prod/stg/dev)
  • Avoid large data; keep values to the minimum required
  • Minimize exposure during handoff via Response Wrapping and short-lived tokens
  • Re-check whether v2 requirements (history/undelete/CAS) really do not apply

Associate Exam Prep Checklist

Differences in commands and paths and the use of policy capabilities are frequently tested. In particular, v1 vs v2 paths, whether LIST is granted, and delete behavior are easy to miss.

  • Enable: vault secrets enable -version=1 kv (use -path for a custom mount)
  • v1 API: /v1/<mount>/<path>; LIST is against /prefix
  • v1 has no versioning, CAS, or soft delete
  • Example v1 policy path: path "secret/*"
  • Without the LIST capability, kv list fails
  • Delete is immediate and unrecoverable → watch for exam trick questions

Check Your Understanding

Associate

問題 1

A team wants to handle simple static secrets in Vault. Which combination is the correct minimal procedure to enable KV v1 at secret/ and store a key set called myapp directly under it?

  1. A. vault secrets enable -path=secret -version=1 kv; vault kv put secret/myapp api_key=s123
  2. B. vault secrets enable -path=secret kv; vault kv put secret/data/myapp api_key=s123
  3. C. vault secrets enable -path=secret -version=2 kv; vault kv put secret/myapp api_key=s123
  4. D. vault secrets enable transit; vault write transit/myapp api_key=s123

正解: A

To use KV v1, specify -version=1 at enable time; the data path is <mount>/<path> (e.g., secret/myapp). B is wrong because it does not specify -version=1 and uses the v2 data path. C enables v2. D is the transit engine, which serves a different purpose.

Frequently Asked Questions

Can I recover a secret deleted from KV v1?

No. Deletion in KV v1 is immediate and irreversible. If you need recovery or soft delete, consider adopting KV v2.

Can I list secrets with only read permission?

No. LIST is a separate capability from read. Explicitly grant capabilities=["list"] on paths you need to enumerate (e.g., secret/).

Can Response Wrapping be used with KV v1?

Yes. Response Wrapping is a core Vault feature that is engine-agnostic. Specify X-Vault-Wrap-TTL to wrap a read response and hand it off securely via a short-lived wrapping token.

Check what you learned with practice questions

Practice with certification-focused question sets

無料で問題を解いてみる
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Vault

Vault Core Concepts: Sealed/Unsealed, Auth, Secrets (2026)

Vault fundamentals — sealed/unsealed state, auth methods, se...

Vault

Vault Operations Professional (VOP-003): Complete Guide (2026)

Pass the Vault Operations Professional exam — enterprise pat...

Vault

Vault Path-Based Routing: API URL Structure (2026)

How Vault's path-based routing works — mount points, sub-pat...

Vault

Vault Tokens: Auth Token Mechanics (2026)

Token fundamentals — service vs. batch tokens, accessor, ren...

Vault

Vault Token Types: Service, Batch, Periodic (2026)

Service vs. batch tokens compared — performance, ACL behavio...

Browse all Vault articles (101)
© 2026 NicheeLab All rights reserved.