How long does the Transit secrets engine store the resulting ciphertext by default?
Correct Answer: D
Comprehensive and Detailed in Depth Explanation:
The Transit secrets engine in Vault is designed for encryption-as-a-service, not data storage. Let's evaluate:
* Option A: 24 hoursTransit doesn't store ciphertext, so no TTL applies. Incorrect.
* Option B: 30 daysNo storage means no 30-day retention. Incorrect.
* Option C: 32 daysThis aligns with token TTLs, not Transit behavior. Incorrect.
* Option D: Transit does not store dataTransit encrypts data and returns the ciphertext to the caller without persisting it in Vault. Correct.
Detailed Mechanics:
When you run vault write transit/encrypt/mykey plaintext=<base64-data>, Vault uses the named key (e.g., mykey) to encrypt the input and returns a response like vault:v1:<ciphertext>. This ciphertext is not stored in Vault's storage backend (e.g., Consul, Raft); it's the client's responsibility to save it (e.g., in a database). This stateless design keeps Vault lightweight and secure, avoiding data retention risks.
Real-World Example:
Encrypt a credit card: vault write transit/encrypt/creditcard plaintext=$(base64 <<< "1234-5678-9012-3456").
Response: ciphertext=vault:v1:<data>. You store this in your app's database; Vault retains nothing.
Overall Explanation from Vault Docs:
"Vault does NOT store any data encrypted via the transit/encrypt endpoint... The ciphertext is returned to the caller for storage elsewhere." Reference:https://developer.hashicorp.com/vault/docs/secrets/transit