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.
मित्रांनो, chapter 91 मधलं Ansible Vault files encrypt करतं. HashiCorp Vault ही वेगळी चालणारी service आहे. ती caller कोण आहे ते तपासते, policy बघते आणि secret operations देते. हे फरक हळू हळू शिकू. इथले सगळे Vault commands आणि API outputs उदाहरणे आहेत, चालवलेले नाहीत. शेवटचा Python lab फक्त शिकण्यासाठी model आहे; तो Vault नाही, encryption नाही आणि credentials ठेवायची जागा नाही. खरे passwords, cloud database किंवा production server लागत नाही.
दोस्तों, chapter 91 का Ansible Vault files encrypt करता है. HashiCorp Vault अलग चलने वाली service है जो पहचान और policy जाँचकर secret operations देती है. यहाँ Vault commands और API results उदाहरण हैं, चलाए नहीं गए. पूरा Python lab सिर्फ teaching model है; Vault या encryption नहीं, credentials रखने की जगह नहीं. असली password, cloud database या production server नहीं चाहिए.
Learning route
- Understand identities and secret operations before running anything.
- Learn KV v2 paths, policies, tokens and leases.
- Study application delivery, transit and operations safety.
- 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
- 94.1Why a secrets service — not another encrypted file
- 94.2Architecture — client, API, storage and the barrier
- 94.3Seal, unseal and recovery boundaries
- 94.4Dev mode — a disposable local experiment only
- 94.5KV v2 — mounts, data paths and metadata paths
- 94.6Versions, check-and-set and deletion safety
- 94.7Authentication versus secrets engines
- 94.8Policies — capabilities, default deny and least privilege
- 94.9Tokens — TTL, renewal and revocation
- 94.10AppRole and workload identity — avoid the secret-zero trap
- 94.11Dynamic secrets and leases — not KV expiry
- 94.12Applications and CI — deliver without leaking
- 94.13Transit — encryption as a service, not a data store
- 94.14Audit, operations and backup safety
- 94.15Troubleshooting — path, identity, policy or state?
- 94.16Comparison — HashiCorp Vault, Ansible Vault, SOPS and cloud managers
- 94.17Entirely local practice — a model, not a Vault server
- 94.18Interview questions, revision and chapter quiz
The chapter recap is at the end of the last concept page.