Secrets Engines are the heart of Vault. Each engine is mounted at a path, and the path determines what happens there (store, issue, or encrypt). This article walks through the categories you see most often on the exam — static, dynamic, and encryption/signing — covering behavior, use cases, and exam-relevant points.
At the Associate level, what matters is being able to tell apart static management with KV, dynamic credential issuance with engines like Database and AWS, and encryption/signing with Transit using concrete examples. We focus on the stable fundamentals: TTL/Lease, Revoke/Renew, policy application, and path design.
A Secrets Engine is a plugin mounted into Vault, with paths separated by purpose. For example, kv/ stores key-value pairs, database/ issues dynamic DB credentials, and transit/ provides data encryption/signing. Clients access paths with a token plus policy, and the engine performs the corresponding action.
The classification axes are: do you store the value (static), issue it on demand (dynamic), or hold no data and only perform operations on it (encryption/signing)? This split is the first decision point both in design and on the exam.
| Category | Representative Engine / Feature | Main Use Case | Exam Focus |
|---|---|---|---|
| Static | kv (kv-v2 is the common choice) | Storing app config, API keys, certificate material | Versioning/metadata, mapping paths to policies |
| Dynamic | database, aws, etc. | Achieve least privilege with short-lived, on-demand credentials | Lease/TTL, Renew/Revoke, role definitions, and the issuance flow |
| Encryption/Signing | transit (encrypt, decrypt, sign, verify) | Provides an "encryption service" without storing data | Plaintext is not stored, key management, use cases and limits (storage is separate) |
Authorization and engine dispatch flow in Vault
Enabling representative engines (example)
# Administrator enables engines at the required paths
vault secrets enable -path=kv kv-v2
vault secrets enable -path=database database
vault secrets enable -path=transit transit
# Check current mounts
vault secrets list -detailedStatic secrets follow a simple model: retrieve a value that was previously stored. The most common engine is kv, which holds app config, API keys, webhook tokens, and so on. At the Associate level, the key points are path design, granting least-privilege policies, and operations (update, delete, audit).
The versioned implementation of kv is widely used. With versioning, you get operations like retrieving the latest or a specific version, soft delete, and hard delete — all useful for audit and rollback. When the exam asks about versioning, the keywords to remember are metadata and history management.
KV fundamentals (store / retrieve / version management examples)
# Enable the engine first if it is not already enabled
vault secrets enable -path=kv kv-v2
# Store (create/update)
vault kv put kv/app/config api_key=xxx timeout=30
# Retrieve (latest)
vault kv get kv/app/config
# Overwrite (creates a new version)
vault kv put kv/app/config api_key=yyy timeout=30
# Retrieve a specific version (e.g., version 1)
vault kv get -version=1 kv/app/config
# Soft delete (deletes the latest)
vault kv delete kv/app/config
# Hard delete (erases the history itself)
vault kv destroy -versions=1 kv/app/configDynamic secrets issue short-lived credentials on every request, with Lease/TTL governing their lifetime. Because expiry or Revoke disables the credentials, they reduce leak risk and make least-privilege easy to implement. Canonical examples are database (issuing user/password for RDBMSs) and aws (issuing IAM credentials).
Issuance is role-based. A role defines the connection target, the permissions (e.g., DB GRANTs), the maximum TTL, and whether Renew is allowed. Clients just call read to get a fresh credential; the response carries metadata such as lease_id, lease_duration, and renewable.
From minimum Database engine setup through issuance and revocation
# Enable the engine
vault secrets enable -path=database database
# Connection (e.g., PostgreSQL). Register connection info with an admin user
vault write database/config/appdb \
plugin_name=postgresql-database-plugin \
connection_url="postgresql://{{username}}:{{password}}@db.example.com:5432/postgres?sslmode=disable" \
username="vault_admin" \
password="s3cr3t"
# Define a role (least privilege, TTL settings)
vault write database/roles/app \
db_name=appdb \
creation_statements="CREATE ROLE \"{{name}}\" WITH LOGIN PASSWORD '{{password}}' VALID UNTIL '{{expiration}}'; GRANT SELECT ON ALL TABLES IN SCHEMA public TO \"{{name}}\";" \
default_ttl=1h \
max_ttl=24h
# Issue dynamic credentials (read produces a fresh credential)
vault read database/creds/app
# -> receive username/password and lease_id/lease_duration
# Revoke (instant invalidation on leak, etc.)
vault lease revoke <lease_id>Transit does not store data. It is an "encryption service" that protects and operates on keys inside Vault, encrypting/decrypting plaintext sent by the client and signing/verifying data. The storage destination (DB, S3, etc.) is the application's responsibility.
The benefits are that applications never touch raw key material and that audit, rotation, and access control are centralized in Vault. Use cases include column-level encryption of sensitive data, transparent token signing, and message authentication between services.
Creating a Transit key and performing encrypt/decrypt and sign/verify
# Enable the engine
vault secrets enable -path=transit transit
# Create a key (symmetric key example)
vault write -f transit/keys/payroll
# Encrypt (Base64 in and out is the default)
PLAINTEXT=$(echo -n "card=4111111111111111" | base64)
vault write transit/encrypt/payroll plaintext="$PLAINTEXT"
# -> ciphertext: vault:v1:...
# Decrypt
CIPHERTEXT="vault:v1:..."
vault write transit/decrypt/payroll ciphertext="$CIPHERTEXT"
# -> plaintext: Base64 (client decodes to plaintext)
# Sign / verify (for asymmetric keys or HMAC use)
vault write transit/sign/payroll input="$PLAINTEXT"
# -> signature: vault:sha2-256:...
vault write transit/verify/payroll input="$PLAINTEXT" signature="vault:sha2-256:..."Vault controls per-path capabilities with policies and manages lifecycle by attaching TTLs to tokens and Leases. A token's expiry and a dynamic secret's Lease expiry are independent — when either expires, effective access is lost.
In operations, choose deliberately between Renew (extend) and Revoke (invalidate), enforce max TTLs, and periodically review roles and policies. Drive everything from audit logs (who read or issued what) and during incidents execute lease revoke and token revocation immediately.
A read-only policy plus token TTL/renewal
# Policy definition (read-only on kv/app/config)
cat > ro-app.hcl <<'POLICY'
path "kv/data/app/config" {
capabilities = ["read"]
}
POLICY
vault policy write ro-app ro-app.hcl
# Create a token with the policy (1-hour TTL, renewable)
vault token create -policy=ro-app -ttl=1h -renewable=true
# Renew the token (add 1 hour)
vault token renew <token>
# Revoke the token
vault token revoke <token>Practice deciding the category from a scenario on the fly. If storage is required, use kv. If short-lived credentials are required, use database/aws. If data is not stored and you only need encryption operations, use transit. Being able to articulate the relationships among Lease/TTL, Renew/Revoke, and roles/policies translates directly into points.
Versioning (kv) and Lease (dynamic) are easy to confuse. The essence of Transit is that it does not store data — never forget that storing ciphertext is the application's job.
Practice mapping categories (points you can confirm via commands)
# Which engines are enabled (the basis for classification)
vault secrets list -detailed
# Dynamic engines return Lease info on the read path (e.g., database/creds/...)
vault read -format=json database/creds/app | jq '.lease_id, .lease_duration, .renewable'
# Transit centers on encrypt/decrypt paths; unlike kv, it does not hold data
vault list transit/keysAssociate
問題 1
A development team wants the database credentials used by their app to stay least-privilege and short-lived in normal operation, and to be instantly revocable in case of leak. Which Vault design is most appropriate?
正解: A
Short-lived, least-privilege DB credentials are exactly what the database engine's dynamic issuance is for. The role defines permissions and TTLs, and lifecycle is governed by Renew/Revoke. kv is static storage, so instant revocation is hard; transit's essence is encryption, not storage; and the aws engine targets AWS resources, so it does not directly fit DB-login use cases.
What is the biggest difference between kv and dynamic secrets (database/aws)?
kv is storage-based and returns existing values. Dynamic secrets issue brand-new credentials on every request, with Lease/TTL handling automatic expiry and revocation. If you need instant revocation or short-lived credentials, dynamic engines are the right fit.
Does Transit store data? Where should the ciphertext be kept?
Transit does not store plaintext data. It only protects keys and performs encryption/signing operations. The application is responsible for storing the resulting ciphertext or signatures in external storage (DBs, object storage, etc.).
Does Lease revocation work against offline targets?
Revoke disables credentials on the target system. Once the revocation succeeds against the downstream system (e.g., a database), subsequent authentication is rejected even if a client is mid-session. When the change cannot be applied to the target, combine it with cut-offs at higher access layers (network or application).
Practice with certification-focused question sets
無料で問題を解いてみる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.
Vault Core Concepts: Sealed/Unsealed, Auth, Secrets (2026)
Vault fundamentals — sealed/unsealed state, auth methods, se...
Vault Operations Professional (VOP-003): Complete Guide (2026)
Pass the Vault Operations Professional exam — enterprise pat...
Vault Path-Based Routing: API URL Structure (2026)
How Vault's path-based routing works — mount points, sub-pat...
Vault Tokens: Auth Token Mechanics (2026)
Token fundamentals — service vs. batch tokens, accessor, ren...
Vault Token Types: Service, Batch, Periodic (2026)
Service vs. batch tokens compared — performance, ACL behavio...