Ravindra BagaleCourses & study guides मराठी

Chapter 94: HashiCorp Vault and Secrets Management

DevOps

94.1 Why a secrets service — not another encrypted file

Story (fictional teaching scenario). Priya in Pune and Daniel in Lisbon build a fictional bakery app. A copied database password lives in three CI jobs and six servers. Changing it means finding every copy. They need one controlled way to obtain credentials, not another spreadsheet.

Why a secrets service — not another encrypted file
Why a secrets service — not another encrypted file

Why

An encrypted file protects a stored copy. It does not by itself identify each running application, expire access or revoke a live database credential.

What

  • Secret is sensitive information such as a password or private key.
  • Secrets management is the lifecycle: store or generate, authorize access, deliver, rotate and revoke.
  • Static secret is an existing value stored for later retrieval.
  • Dynamic secret is a credential generated on demand with a limited lifetime; it needs a configured provider.

How

  1. Inventory where sensitive values are used, without recording their values.

  2. Separate humans, CI jobs and application identities.

  3. Decide which values should be stored and which credentials could be generated.

Example 1: A lifecycle, without a password

  1. Read the command or request.
Application -> authenticate -> read permitted path -> use in memory
Rotation -> publish replacement -> refresh clients -> retire old credential
  1. Read the result.

Output (illustrative; NOT executed against Vault)

Each caller gets only the access its job requires.
  1. Line by line: The arrows describe a delivery plan, not a network test. Rotation means changing the underlying credential too, not just renaming a variable. A fictional shop may spend ₹5000 or €60 on a training budget; those are story amounts, not a Vault license/hosting quote.

Ravindra Bagale's Tip

Central storage is only useful with scoped identities and a tested refresh plan.

Did you understand? Let us try it once more.