Most Asked Vault Interview Questions for Freshers (2027)

60 most asked HashiCorp Vault interview questions for freshers: seal and unseal, tokens, leases, dynamic secrets, policies and CLI commands, with answers.

Sep 25, 2025 - 10:59
Nov 10, 2026 - 01:31
 0  142
Most Asked Vault Interview Questions for Freshers (2027)

The most asked HashiCorp Vault interview questions for freshers cover what Vault is, how sealing and unsealing work, the difference between static and dynamic secrets, tokens and leases, auth methods, secrets engines, policies written in HCL, and the basic CLI commands. Learn these 60 answers and you can handle any entry-level Vault round.

This page is the beginner's companion to our scenario-based Vault interview questions, which are for people who already run Vault. It also sits under our DevOps interview questions hub. Answers were checked against the Vault documentation on developer.hashicorp.com in November 2026.

Key takeaways

  • Freshers are asked definitions first: secret, secrets engine, auth method, token, lease, policy, seal.
  • Know that a new Vault server starts sealed, and that vault operator init splits the unseal key into 5 shares with a threshold of 3 by default.
  • Dynamic secrets are created on request and expire with a lease. Interviewers ask this in almost every round.
  • Policies deny by default. You grant capabilities such as read, create, update, delete and list on paths.
  • Practise the CLI on a dev server: vault server -dev, vault kv put, vault kv get, vault secrets enable, vault auth enable, vault policy write.
  • IBM completed its acquisition of HashiCorp on 27 February 2025. Vault is still sold and documented under the HashiCorp name.

How the questions are organised

SectionQuestionsWhat it tests
Freshers: core concepts1 to 22Vocabulary and the basic model of how Vault works
2 to 5 years: everyday use23 to 44Auth methods, engines, policies, tokens and the CLI in real work
Senior: design basics45 to 52Storage, HA, audit and operations a lead should explain simply
Beginner scenarios53 to 60Short practical problems often given to juniors

If you already work with Vault daily, the scenario-based Vault guide will stretch you more than this page.

Freshers: core Vault concepts

1. What is HashiCorp Vault?

Vault is a tool for storing and controlling access to secrets such as passwords, API keys, certificates and encryption keys. Clients authenticate, receive a token, and the token's policies decide which secret paths they may use. Every request can be written to an audit log.

2. What counts as a secret?

Anything that grants access or must stay confidential: database passwords, cloud credentials, TLS private keys, SSH keys, tokens for third-party APIs, and encryption keys. Configuration values that are not sensitive do not need Vault.

3. Why not keep secrets in environment variables or Git?

Secrets in Git stay in history forever and are copied to every clone. Environment variables leak through process listings, crash dumps and logs. Neither gives you access control per secret, an audit trail, or automatic rotation. Vault gives all three.

4. What does "sealed" mean?

A sealed Vault can reach its storage but cannot decrypt anything in it. Every Vault server starts sealed. Until it is unsealed, the only things you can do are unseal it and check its status.

5. How does unsealing work by default?

By default Vault uses Shamir's Secret Sharing. The unseal key is split into shares, and a set number of them (the threshold) must be entered to rebuild it. vault operator init creates 5 shares with a threshold of 3 unless you pass -key-shares and -key-threshold.

6. What is auto unseal?

Auto unseal hands protection of the unseal key to a trusted service such as a cloud KMS, an HSM, or another Vault's Transit engine. Vault unseals itself on startup. Operations that would normally need unseal shares, like generating a root token, use recovery keys instead.

7. What are the root key, keyring and unseal key?

The keyring holds the encryption key that protects most stored data. The root key encrypts the keyring. The unseal key encrypts the root key. Unsealing means recovering the root key so Vault can open the keyring.

8. What is a secrets engine?

A secrets engine is a component mounted at a path that stores, generates or encrypts data. Examples: KV stores static secrets, the database engine creates database users on demand, PKI issues certificates, and Transit encrypts data without storing it.

9. What is an auth method?

An auth method checks who a client is and returns a Vault token. Humans often use OIDC, LDAP or userpass. Machines use AppRole, Kubernetes, AWS, Azure, GCP, JWT or TLS certificates.

10. What is a token?

A token is the credential a client sends with every request after logging in. It carries policies, a TTL and optional metadata. Tokens are the core auth mechanism: every auth method ends by issuing one.

11. What is the root token?

The root token has the root policy and can do anything. Vault creates one at initialisation. HashiCorp recommends using it only for initial setup or emergencies, then revoking it and generating a new one later with vault operator generate-root if needed.

12. What is a policy?

A policy is a set of rules, written in HCL or JSON, that grants capabilities on paths. Vault denies everything that no policy allows. A token can carry several policies, and their permissions combine.

13. What capabilities can a policy grant?

The common ones are create, read, update, delete and list. There are also patch, sudo for root-protected paths, and deny, which overrides any other grant on the same path.

14. What is a static secret?

A static secret is a value you write and Vault stores, such as an API key in the KV engine. It stays the same until someone changes it.

15. What is a dynamic secret?

A dynamic secret is generated when a client asks for it, for example a fresh database username and password valid for one hour. It has a lease, and Vault revokes it when the lease ends. If it leaks, the damage is limited to that short window and to that one client.

16. What is a lease?

A lease is the metadata Vault attaches to dynamic secrets and some tokens: an ID, a duration, and whether it can be renewed. Clients can renew a lease before it expires, and operators can revoke it early.

17. What is TTL and max TTL?

TTL is how long a token or lease is valid before it must be renewed. Max TTL is the hard limit after which it cannot be renewed any further and must be replaced.

18. What is the KV secrets engine?

KV (key/value) stores arbitrary static secrets. Version 1 keeps only the latest value. Version 2 keeps a configurable number of versions, supports soft delete and undelete, and adds metadata.

19. What port does Vault listen on?

The API and UI listen on TCP 8200 by default. In a cluster, servers talk to each other on 8201 for request forwarding and replication.

20. What is the Vault dev server?

vault server -dev starts an in-memory, already unsealed server with a printed root token. It is for learning and testing only, because data is lost on restart and TLS is off.

21. Is Vault open source?

Vault Community Edition is free to use, but since August 2023 HashiCorp releases it under the Business Source License, not an OSI open source licence. OpenBao is a community fork of the earlier open source code. Enterprise and HCP Vault Dedicated are the paid offerings.

22. Who owns HashiCorp now?

IBM completed its acquisition of HashiCorp on 27 February 2025. Vault, Terraform and the other products continue under the HashiCorp brand.

2 to 5 years: everyday Vault use

23. How do you write and read a KV secret?

With KV v2 mounted at secret/:

vault kv put secret/app/db username=app password='s3cr3t'
vault kv get secret/app/db
vault kv get -field=password secret/app/db

The vault kv commands handle the v2 data/ path prefix for you.

24. Why does a KV v2 policy use secret/data/?

In KV v2 the API path for secret values is secret/data/<path> and metadata lives under secret/metadata/<path>. Policies match API paths, so a rule on secret/app/* does nothing for v2. Beginners lose a lot of time on this.

25. Write a read-only policy for one application.

path "secret/data/app/*" {
  capabilities = ["read"]
}

path "secret/metadata/app/*" {
  capabilities = ["list"]
}

Load it with vault policy write app-read app-read.hcl.

26. How do you enable a secrets engine?

vault secrets enable -path=kv kv-v2 mounts KV v2 at kv/. vault secrets list shows what is mounted. Each engine lives at its own path, so you can mount the same type more than once.

27. How do you enable an auth method?

vault auth enable approle or vault auth enable kubernetes, then configure it with vault write auth/<path>/config .... vault auth list shows enabled methods.

28. What is AppRole?

AppRole is an auth method for machines. A role has a RoleID (like a username) and a SecretID (like a password). The application logs in with both and gets a token with the role's policies. Deliver the SecretID through a separate, trusted channel so no single system holds both parts long term.

29. How does the Kubernetes auth method work?

The pod sends its service account JWT to Vault. Vault checks it with the Kubernetes TokenReview API and maps the service account and namespace to a Vault role, which sets the policies on the returned token.

30. What is the difference between a service token and a batch token?

Service tokens are stored in Vault, can be renewed and revoked, and can create child tokens. Batch tokens are encrypted blobs that are not stored, so they are cheap at high volume, but they cannot be renewed or revoked individually.

31. What is a token accessor?

An accessor is a reference to a token that lets you look it up, renew it or revoke it without knowing the token itself. Audit logs and admins use accessors so the real token is never exposed.

32. What happens to child tokens when a parent is revoked?

They are revoked too. Tokens form a tree. Orphan tokens have no parent and survive a parent's revocation, which is useful for long-running services.

33. How do you renew and revoke?

vault token renew extends a token, vault lease renew <lease_id> extends a lease, vault lease revoke <lease_id> ends one, and vault lease revoke -prefix database/creds/app revokes everything under a path.

34. How does the database secrets engine create credentials?

You configure a connection with a privileged Vault user, then define a role with SQL statements to create a user. When a client reads database/creds/<role>, Vault runs the statements, returns a new username and password, and drops the user when the lease ends.

35. What is the Transit engine?

Transit is encryption as a service. Applications send plaintext and get ciphertext back, but the key never leaves Vault and Vault does not store the data. It supports key rotation and rewrapping ciphertext to the newest key version.

36. What is the PKI engine used for?

It runs a certificate authority inside Vault and issues short-lived X.509 certificates on request. Short certificate lifetimes reduce the need for revocation lists.

37. What is Vault Agent?

Vault Agent is a client-side daemon that logs in for the application, keeps the token renewed, caches responses, and renders secrets into files using templates. The application then reads a file instead of calling the Vault API.

38. What is the Vault Agent Injector for Kubernetes?

A mutating admission webhook that adds a Vault Agent sidecar or init container to pods based on annotations. The agent writes secrets to a shared in-memory volume the app can read.

39. How do you check who you are logged in as?

vault token lookup shows the current token's policies, TTL and metadata. vault token capabilities <path> shows what you can do on a path, which is the fastest way to debug a "permission denied".

40. Which environment variables does the CLI use?

VAULT_ADDR sets the server address, VAULT_TOKEN the token, VAULT_NAMESPACE the namespace in Enterprise, and VAULT_CACERT the CA file for TLS checks.

41. What are response wrapping and cubbyhole?

Cubbyhole is a private storage area that belongs to one token. Response wrapping puts a response into a single-use token's cubbyhole, so you can hand over a secret (often a SecretID) where only the intended recipient can unwrap it once.

42. What are namespaces?

Namespaces are isolated tenants inside one Vault cluster, each with its own mounts, policies and tokens. They are an Enterprise and HCP feature.

43. How does Terraform read secrets from Vault?

The Vault provider exposes data sources such as vault_kv_secret_v2. Values read this way end up in Terraform state, so state must be encrypted and access controlled.

44. How do you keep secrets out of CI logs?

Authenticate the pipeline with a short-lived identity such as JWT/OIDC from the CI system, fetch only the secrets the job needs, mask them in the CI tool, and avoid printing them in scripts. Our guide on secret management in CI/CD pipelines covers placement in more detail.

Senior: design basics explained simply

45. Which storage should a production cluster use?

HashiCorp recommends Integrated Storage, which is built on Raft and runs inside Vault with no external database. It replicates data across the cluster's servers.

46. How does high availability work?

One server is active and handles requests. Standbys forward requests to it or redirect clients. If the active server fails, a standby takes over. With Raft, use an odd number of servers, typically 3 or 5, so a majority can still agree.

47. What are audit devices?

Audit devices record every request and response, with secret values hashed using HMAC. Types include file, syslog and socket. If Vault cannot write to any enabled audit device, it refuses the request. Enable at least two so one failure does not stop Vault.

48. How do you back up Vault with Integrated Storage?

vault operator raft snapshot save backup.snap takes a snapshot, and snapshot restore brings it back. A snapshot is useless without the unseal or recovery keys, so protect those separately.

49. Why should humans not use long-lived tokens?

Long-lived tokens are hard to track and stay valid after people change roles. Log in through OIDC or LDAP so access follows group membership, and keep TTLs to a working day or less.

50. What is the identity system?

Vault links logins from different auth methods to one entity, and entities can belong to groups. Policies attached to a group apply to every member, whatever method they used.

51. How do you rotate the encryption key?

vault operator rotate adds a new keyring encryption key for new writes. vault operator rekey changes the unseal key shares. They solve different problems: one protects data, the other changes who can unseal.

52. What should you monitor?

Seal status, leader changes, request latency, token and lease counts, audit device errors and certificate expiry. Vault exposes telemetry for Prometheus and other systems.

Beginner scenarios

53. Your app gets "permission denied" reading a KV v2 secret. What do you check?

Run vault token capabilities secret/data/app/db with the app's token. The usual cause is a policy written for secret/app/* instead of secret/data/app/*, or the wrong policy attached to the role.

54. Vault restarted and every request fails. Why?

It is probably sealed. vault status shows Sealed true. Unseal with the key shares or check that the auto-unseal KMS is reachable and the server's identity can use the key.

55. A teammate pasted a root token into chat. What do you do?

Revoke it straight away with vault token revoke, check the audit log for its use, and generate a new root token only when needed. Then explain why daily work should use named logins.

56. Someone overwrote a KV v2 secret by mistake. Can you recover it?

Yes, if versions are kept. vault kv get -version=3 secret/app/db reads an old version, and vault kv rollback -version=3 secret/app/db writes it back as the newest version.

57. Database credentials from Vault stop working after an hour. Why?

The lease expired and Vault dropped the user. The app must renew the lease or request new credentials before expiry. Vault Agent can handle this automatically.

58. How would you give a new microservice its first secret?

Create a policy for its paths, create an auth role (Kubernetes or AppRole) bound to that policy, write the secret, and let the service fetch it at startup or through Vault Agent. Never bake the value into the image.

59. The audit log disk fills up and Vault stops responding. Why?

Vault blocks requests when it cannot write to any audit device. Rotate and ship logs, add disk space, and enable a second audit device so one failure does not halt service.

60. Your manager asks if Vault is worth adding for a small team. How do you answer?

Weigh the problem against the operational cost. If secrets sit in many places with no audit or rotation, Vault helps. If the team runs on one cloud, the cloud's own secret manager may be simpler. Say which you would pick and why, rather than defending Vault by default.

How to prepare in a week

  1. Run a dev server and complete the KV, policy and AppRole steps from the official tutorials.
  2. Mount the database engine against a local PostgreSQL container and watch users appear and disappear.
  3. Write three policies from memory and test them with vault token capabilities.
  4. Read the seal, tokens and leases concept pages once more the day before.

Related reading: storing secrets safely in Git repositories and when to rotate secrets automatically. Vault and secrets handling are part of our DevSecOps course, taught in the Kharadi, Pune classroom and live online, and Terraform with Vault is covered in the Terraform course.

FAQ

What are the most asked Vault interview questions for freshers?

What Vault is, sealing and unsealing, static versus dynamic secrets, tokens and leases, auth methods, secrets engines and policies. Expect at least one CLI question such as writing and reading a KV secret.

What is the difference between static and dynamic secrets?

Static secrets are stored values that change only when someone updates them. Dynamic secrets are generated per request with a lease and revoked automatically when it expires.

How many unseal keys does Vault create by default?

Five shares with a threshold of three, unless you change them with the -key-shares and -key-threshold flags on vault operator init.

What port does Vault use?

TCP 8200 for the API and UI, and 8201 for cluster traffic between servers.

Is Vault still open source?

No. Since August 2023 Vault Community Edition uses the Business Source License. OpenBao is a community fork of the earlier open source code.

Do I need the Vault Associate certification as a fresher?

It is not required. It shows structured knowledge, but a working lab you can explain counts for a lot in interviews. Check HashiCorp's certification page for the current exam version.

How is this page different from the scenario-based Vault questions?

This page teaches the concepts and commands. The scenario guide assumes you know them and tests how you handle production problems.

References

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.