Ravindra BagaleCourses & study guides मराठी

DevOps

Chapter 94: HashiCorp Vault and Secrets Management

Friends, Ansible Vault in chapter 91 encrypts files. HashiCorp Vault is a separate running service that authenticates callers, checks policy, and serves secret operations. We learn those differences slowly. All Vault commands and API results here are illustrative, not executed. The complete local Python lab is a teaching model only: not Vault, not encryption, not a place for credentials. No account, real password, cloud database or production server is required.

Learning route

  1. Understand identities and secret operations before running anything.
  2. Learn KV v2 paths, policies, tokens and leases.
  3. Study application delivery, transit and operations safety.
  4. Test a harmless local model, then answer the chapter quiz.

Existing course coverage: chapter 82.3 is a HashiCorp Vault project; chapters 11, 79 and 91 cover Ansible Vault. This chapter explains the service underneath the project, not another copy of that deployment. Official references were fetched on 6 November 2026; no current-release version is claimed.

Vocabulary: CLI means command-line interface, the program you type commands into. API means the request interface applications use. HTTP GET reads, POST submits, and LIST lists where supported. JSON is a structured text format of named fields; HCL is a configuration language used for policy rules. These words describe interfaces, not permission grants.

Safety first: every CLI example assumes a teacher-controlled disposable local Vault, never a real remote cluster. Never paste a real token, unseal share or secret into a screenshot, chat, source file or terminal history. This chapter does not run such commands for you.

Concepts in this chapter

  1. 94.1Why a secrets service — not another encrypted file
  2. 94.2Architecture — client, API, storage and the barrier
  3. 94.3Seal, unseal and recovery boundaries
  4. 94.4Dev mode — a disposable local experiment only
  5. 94.5KV v2 — mounts, data paths and metadata paths
  6. 94.6Versions, check-and-set and deletion safety
  7. 94.7Authentication versus secrets engines
  8. 94.8Policies — capabilities, default deny and least privilege
  9. 94.9Tokens — TTL, renewal and revocation
  10. 94.10AppRole and workload identity — avoid the secret-zero trap
  11. 94.11Dynamic secrets and leases — not KV expiry
  12. 94.12Applications and CI — deliver without leaking
  13. 94.13Transit — encryption as a service, not a data store
  14. 94.14Audit, operations and backup safety
  15. 94.15Troubleshooting — path, identity, policy or state?
  16. 94.16Comparison — HashiCorp Vault, Ansible Vault, SOPS and cloud managers
  17. 94.17Entirely local practice — a model, not a Vault server
  18. 94.18Interview questions, revision and chapter quiz

The chapter recap is at the end of the last concept page.