Skip to content
Tutorials Center
My learning

Topics

HashiCorp Vault Tutorial

Learn HashiCorp Vault step by step: 36 lessons in 9 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting Started

  1. 1 What Is HashiCorp Vault? Understand what HashiCorp Vault is, what problems it solves and its main features: secrets, dynamic credentials, encryption as a service, identity and audit.
  2. 2 The Secrets Problem and Secret Sprawl See how secrets leak through code, config and logs, why rotation is hard, and how a secrets manager fixes it. Includes a runnable secret scanner model.
  3. 3 Installing Vault and Using Dev Mode Install the Vault binary on Windows, macOS and Linux, start the in-memory dev server, set VAULT_ADDR and VAULT_TOKEN, and learn what dev mode does and does not do.
  4. 4 Your First Secrets with the KV Engine Write, read, list and delete your first secrets with vault kv commands, understand KV paths and the data/ prefix, and use JSON, fields and curl.

Concepts and Setup

  1. 5 Vault Architecture: Barrier, Storage and Paths Learn how Vault is built: the cryptographic barrier, storage backends, the router with mounted engines and auth methods, tokens, audit devices and the key hierarchy.
  2. 6 Seal, Unseal and Shamir's Secret Sharing Understand why Vault starts sealed, how Shamir's Secret Sharing splits the root key into shares with a threshold, and how auto-unseal differs. Runnable Shamir demo.
  3. 7 Initializing and Unsealing Vault Follow the first-run workflow of a real Vault: vault operator init, distributing key shares, unsealing, using and then revoking the initial root token.
  4. 8 The Vault HTTP API and CLI Learn how the Vault HTTP API is organised, how the CLI maps onto it, common headers, status codes, namespaces and output formats, with runnable request-building models.
  5. 9 The Vault Configuration File Learn the Vault server config file in HCL: the storage, listener, seal, api_addr and cluster_addr stanzas, UI and telemetry, with a runnable config checker.

Secrets Engines

  1. 10 Secrets Engines Overview Learn what Vault secrets engines are, the main types (KV, database, transit, PKI, SSH, AWS), how to enable, tune, move and disable mounts, and how leases fit in.
  2. 11 KV Version 2 and Secret Versioning Learn KV version 2 features: versions, rollback, delete versus destroy, undelete, max_versions, check-and-set and custom metadata, with a runnable versioned store model.
  3. 12 Cubbyhole and Response Wrapping Learn Vault's cubbyhole engine and response wrapping: single-use wrapping tokens, the unwrap flow, TTLs, lookup and rewrap, with a runnable single-use token model.
  4. 13 The PKI Secrets Engine Use Vault as an internal certificate authority: root and intermediate CAs, roles, issuing short-lived certificates, revocation and CRLs, with runnable policy checks.
  5. 14 The SSH Secrets Engine Learn how Vault controls SSH access with signed SSH certificates and one-time passwords, how to configure a CA, roles and servers, and the trade-offs of each mode.

Authentication Methods

  1. 15 Authentication Methods Overview Understand how Vault authenticates users and machines: the login flow, the token as the result, human versus machine methods, and how to enable and list auth methods.
  2. 16 Userpass and LDAP Authentication Set up username and password login (userpass) and directory login (LDAP) in Vault: creating users, mapping LDAP groups to policies, and logging in with the CLI.
  3. 17 AppRole Authentication Learn the AppRole auth method for machines: role ID versus secret ID, creating roles, delivering secret IDs with response wrapping, TTLs and use limits, and the pull and push models.
  4. 18 Kubernetes and Cloud Authentication Authenticate workloads to Vault with platform identity: Kubernetes service account tokens, AWS IAM and EC2, Azure managed identity, GCP service accounts, with role bindings explained.

Policies and Tokens

  1. 19 Vault Policies: Writing Your First ACL Policy Learn how Vault policies grant access: path rules, the capabilities list, default and root policies, writing HCL, attaching policies and checking them with a tiny evaluator.
  2. 20 Vault Policy Path Matching: Globs, Plus Segments and Priority Understand how Vault picks a policy rule: exact paths, the trailing glob, the + segment wildcard, priority between rules, multiple policies and common matching mistakes.
  3. 21 Vault Tokens: Types, TTLs, Hierarchy and Revocation Learn how Vault tokens work: service vs batch vs periodic tokens, TTL and max TTL, renewal, parent and child tokens, orphans, accessors, use limits and revoking a token tree.
  4. 22 Vault Identity: Entities, Aliases, Groups and Templated Policies Learn the Vault identity system: entities, aliases per auth method, internal and external groups, policy inheritance through groups and templated policies using identity data.

Dynamic Secrets and Encryption

  1. 23 Vault Dynamic Secrets and Leases Explained Understand why dynamic secrets beat static passwords: how Vault creates credentials on demand, attaches leases, renews and revokes them, and how to model the lifecycle in code.
  2. 24 Vault Database Secrets Engine: Dynamic Database Credentials Configure the Vault database secrets engine: connection config, roles with creation statements, dynamic and static roles, root credential rotation, and a statement template previewer.
  3. 25 Vault Transit Engine: Encryption as a Service Use the Vault transit engine to encrypt data without storing keys in your app: create keys, encrypt and decrypt, understand vault:v1 ciphertext, sign, hash and generate data keys.
  4. 26 Vault Transit Key Rotation, Rewrap and Key Versions Rotate Vault transit keys without downtime: key versions, min_decryption_version, min_encryption_version, rewrapping old ciphertext, auto rotation and a version timeline simulator.

Deployment and HA

  1. 27 Vault Production Server Configuration: HCL, Listener and TLS Write a production Vault server config file: listener with TLS, storage, api_addr and cluster_addr, UI, telemetry, mlock, hardening checklist and a config checker stand-in.
  2. 28 Vault Integrated Storage (Raft): Clusters, Quorum and Snapshots Understand Vault Integrated Storage based on Raft: leader election, quorum math, cluster sizes, retry_join, adding and removing peers, autopilot and snapshots.
  3. 29 Vault High Availability, Failover and Auto-Unseal Learn how Vault high availability works: active and standby nodes, request forwarding, load balancers and health checks, plus auto-unseal with cloud KMS, recovery keys and seal migration.

Operations and Integration

  1. 30 Vault Audit Devices: Logging Every Request Safely Learn how Vault audit devices record every request and response: enabling file, syslog and socket devices, HMAC-hashed sensitive values, fail-closed behaviour and a log parser stand-in.
  2. 31 Vault Backup, Disaster Recovery and Monitoring Plan Vault operations: Raft snapshots and restore, RPO and RTO, replication for disaster recovery, key metrics and health checks to alert on, and upgrade and maintenance routines.
  3. 32 Vault Agent: Auto-Auth, Caching and Secret Templates Use Vault Agent so applications need no Vault code: auto-auth, token sinks, caching, rendering secrets into files with templates, exec mode and a template renderer stand-in.
  4. 33 Vault Integration: CI/CD Pipelines, Kubernetes and the HTTP API Connect Vault to real workloads: CI/CD with JWT/OIDC, Kubernetes auth with Agent Injector, CSI provider and Vault Secrets Operator, plus the HTTP API and client libraries.

Projects and Practice

  1. 34 Project: Secure a Web App End to End with Vault Design and rehearse a complete Vault workflow for a web app: KV secrets, dynamic database credentials, transit encryption, AppRole login, least-privilege policies, TTLs and a verification script.
  2. 35 Project: Build a Vault Policy Linter Build a small linter that parses Vault HCL policies and flags risky rules: wildcards on sys, sudo, missing data paths for KV v2, root-like access and overly broad globs, step by step.
  3. 36 Vault Troubleshooting, Common Errors and Practice Questions Fix the most common Vault problems: permission denied, sealed vault, missing token, KV v2 path mistakes, TLS and address errors, lease and TTL surprises, plus practice scenarios and a quiz.