Exam objective 5.2 on the VA-003 exam focuses on how Vault protects its own deepest secrets: the keys that unlock its core storage. This chapter explains why Vault starts in a 'sealed' state and what an administrator must do to make it operational. Understanding this process is essential for passing the exam because it tests your knowledge of Vault's core security model, which is unlike most other systems.
Jump to a section
A simple way to picture Seal/Unseal Process and Key Management
A bank vault is a secure storage container designed to protect valuables from theft, fire, and unauthorised access. The vault itself is incredibly strong, but when it is first built or after a major security event, the vault door is left open. Inside, it is empty and ready to be filled. The bank cannot function as a secure storage facility until the vault door is sealed shut and locked. This sealing process is not automatic; it requires a deliberate action by a trusted person, the branch manager. The manager holds a single, unique key that, when turned, engages the massive locking mechanisms and seals the vault. Only the branch manager is allowed to possess this master key. If the manager is unavailable, the vault cannot be opened, even with a hundred other employees present.
To take something out of the vault, the manager must insert their key again and turn it, which disengages the locks and allows the vault door to swing open. After retrieving the item, the manager must turn the key again to re-lock the vault. The life of the vault revolves around this seal/unseal cycle. The manager's key is the most critical piece of the entire system; if it is lost, the vault becomes a permanent, impenetrable tomb. The bank can have the most advanced alarms and security guards in the world, but without that single key, it cannot function securely. The key itself is split into two halves for safety: one half is kept in the manager's personal safe, and the other half is stored in a secure envelope at the bank's headquarters. This separation prevents any single person from unlocking the vault on their own without authorisation. The vault's security is entirely dependent on the careful management, storage, and distribution of those two halves of the key.
Let’s start with the biggest problem Vault solves: protecting secrets even from itself. A secret, in this context, is any piece of sensitive data you want to keep safe, such as a database password, an API key, or an encryption key. Vault’s job is to store and manage these secrets. But here is the key paradox: if Vault stores the master key that encrypts all your other secrets, what encrypts that master key? If an attacker breaks into the server running Vault, they can read that master key from memory and decrypt everything. This is a chicken-and-egg problem. HashiCorp Vault’s solution is to never store the master key in a usable form. Instead, Vault uses a process called 'sealing' and 'unsealing' to protect this master key.
A Vault server starts in a 'sealed' state. When sealed, Vault’s entire storage backend (the place where secrets are saved) is encrypted using encryption keys that Vault itself does not know. It is like a locked suitcase where Vault has lost the combination. The server can accept HTTP requests, but it cannot read or write any secrets. It simply refuses all requests that require access to secrets. The sealed state is Vault’s default security posture after a restart, a shutdown, or a suspected intrusion. You can even manually seal Vault if you suspect an attack. Sealing effectively destroys Vault’s ability to access its own secret data, which means an attacker cannot read anything even if they gain full access to the running server.
The unsealing process is the recovery action. It makes Vault operational again. This process is built around a cryptographic key called the 'master key'. When Vault is initialised for the first time, it generates this master key. However, Vault never stores the master key in a single place. Instead, it uses a technique called 'Shamir's Secret Sharing' to split the master key into multiple pieces, called 'unseal keys' or 'key shares'. This splitting is a mathematical trick: you have a secret (the master key), and you can split it into N pieces. You can then configure Vault to require only K of those pieces to reconstruct the original secret. This is known as the (K, N) threshold scheme. For example, a common configuration is (3, 5): you generate five unseal key shares, but you only need three of them (any three) to unseal Vault.
During the unsealing process, an administrator must provide a different physical unseal key each time. Each key is entered using the 'vault operator unseal' command or via the web UI. Each unseal key piece is useless on its own; it reveals nothing about the master key. The administrator enters one key share, then another, and so on. Once the threshold number of key shares has been provided (for instance, three out of five), Vault’s internal algorithm mathematically recombines them to reconstruct the master key. With the master key in memory, Vault can now decrypt its storage backend and begin reading and writing secrets. From that moment, Vault is 'unsealed' and fully operational.
Why go through this elaborate process? It protects against a single point of compromise. If one administrator’s unseal key is stolen, an attacker cannot unseal Vault alone. They would need to steal multiple keys from multiple people. This is called 'separation of duties'. It also provides resilience: you can distribute keys to different team members, and you can still unseal Vault even if one or two members are on holiday or unreachable, as long as the threshold is met.
Because the master key is only held in memory (not on disk) after unsealing, any action that clears memory — such as restarting the server or a manual seal — forces you to go through the unsealing process again. This is by design. This means an attacker who steals the hard drive of a Vault server cannot unseal it; they have no unseal keys. The master key is gone. The attacker is left with an encrypted, useless storage file.
The seal/unseal process is separate from authentication. Even after Vault is unsealed, you still need to log in with a valid token or authentication method (like LDAP, Microsoft Entra ID, or a username/password) to access secrets. The seal/unseal process only controls whether Vault itself can read its own encrypted storage, not who is allowed to read secrets.
There is an advanced option called 'auto-unseal' where Vault can delegate unsealing to a trusted external service, like a hardware security module (HSM) or cloud KMS. This removes the need for human interaction after a restart but is a more advanced topic for the Associate exam. The core concept you need for the VA-003 is the manual, multi-key unseal process using Shamir's Secret Sharing.
Initialise Vault
When Vault is first installed, it has no encryption keys. An administrator runs 'vault operator init' to generate a master key and split it into unseal key shares using Shamir's Secret Sharing. This step outputs the unseal keys and an initial root token. This must be done only once per Vault cluster.
Distribute Unseal Keys
The administrator securely distributes the printed or encrypted unseal key shares to different trusted individuals, such as team leads or security officers. No single person should hold all shares. The root token is also stored securely but separately. This step establishes separation of duties.
Start Vault Server
After the initial setup, when the Vault server is started or restarted, it automatically enters the sealed state. The server's memory is empty of any encryption keys, and its storage backend is encrypted. It cannot serve any secret-related requests. This is the default safer state.
Provide First Unseal Key
The first operator executes 'vault operator unseal' and enters their key share. Vault records that one key share has been provided but remains sealed because the threshold has not been met. The operator sees a status message like '1/3 keys provided'. Nothing changes functionally; Vault still refuses all secret requests.
Provide Remaining Required Key Shares
A second, third, and any further operators (up to the threshold number) each enter their unique key share using the same command. Each share is different and must be entered correctly. After the threshold number of valid shares is entered, Vault's internal algorithm mathematically reconstructs the master key. The storage backend is decrypted, and Vault is now fully unsealed and operational. It can accept authentication requests and serve secrets.
Perform Authentication and Access Secrets
Once Vault is unsealed, users and applications must authenticate using a valid token, username/password, or other auth method (like Microsoft Entra ID or LDAP). Only after successful authentication can they access secrets. This step ensures that unsealing alone does not grant anyone access to data.
Seal Vault (Optional or Automatic)
If a security incident happens, an administrator can run 'vault seal' to immediately re-encrypt the storage backend and destroy the master key from memory. The server will refuse all requests until it is unsealed again. This can also happen automatically on restart or via a manual trigger script.
Consider a real-world scenario at a fintech company called PayFlow. PayFlow uses Vault to store database credentials for its payment processing systems. The company has five senior engineers on a 'vault operations' team, each responsible for guarding one of the five unseal key shares. The threshold is set to 3. Here is what happens step by step in a realistic business context:
One morning, the company’s data centre experiences a power outage that causes the Vault server to restart. When the server comes back online, Vault is automatically sealed and completely non-functional. The payment processing system cannot connect to the database because it cannot retrieve the password from Vault. An alert is sent to the on-call engineer, Priya. She is the first to arrive at the console.
Priya executes the 'vault operator unseal' command and enters her unseal key share, but nothing happens. That is normal: one share alone is insufficient. The command line shows a progress indicator: '1/3 keys provided'. She then calls two other engineers, Raj and Mei, who are on standby. They each log into the Vault CLI from their laptops and enter their own unseal key shares. After the third key is entered, the command line shows 'Vault is unsealed'. The payment system immediately begins functioning again.
During a quarterly security review, the company decides to improve its key management. They implement the following practices:
- They store each unseal key share in a separate physical safe at different office locations, ensuring no single location has more than one key. - They set up an emergency 'break-glass' procedure: the company CFO holds a sealed envelope containing a printed copy of one of the key shares, for use only in an emergency when no engineer is available. - They perform a 'rekeying' operation once a year to generate new unseal key shares, in case any existing shares have been compromised. - They train all new vault operations engineers on the unsealing process using a non-production environment, so they can practise without risking real secrets. - They configure Vault to automatically seal itself if it detects an unusual number of failed authentication attempts, preventing an attacker from brute-forcing their way past the seal. The IT team’s monthly runbook includes a scheduled 'seal/unseal drill' where they intentionally restart a test Vault instance and practise the multi-person unseal workflow, timing how fast they can restore service. This ensures that the process is well understood and can be executed quickly under pressure. In production, they monitor Vault’s seal status with a dashboard alert; if Vault remains sealed for more than five minutes, an automated PagerDuty notification is sent to the entire operations team. The team uses 'vault status' to check seal state remotely. They also keep a detailed log of every unseal event, recording which key shares were used and by whom, to provide an audit trail for compliance with financial regulations.
The VA-003 exam tests your understanding of the seal/unseal process with specific, practical questions. You will not be asked to type commands, but you will be expected to know the concepts behind them. Here is exactly what the exam tests and what traps to watch for:
The exam frequently asks questions that require you to distinguish between the 'master key' and 'unseal keys'. A typical question might phrase it as: 'What is the purpose of the unseal keys?' The correct answer is: 'They are used to reconstruct the master key to decrypt the storage backend.' The trap answer is something like: 'They are used to authenticate users.' This is wrong; authentication is handled separately by auth methods. Another trap is: 'They encrypt the data at rest.' That is also incorrect; the master key encrypts the storage backend, and the unseal keys are shards of that master key.
Another favourite exam topic is the threshold scheme. You will see questions like: 'A Vault operator initialises Vault with key shares = 5 and key threshold = 3. How many unseal keys are needed to unseal Vault?' The correct answer is 3, because the threshold is the minimum number required. A trap might say 'all 5' or 'only 1'. Remember that the key shares count is the total number of pieces created, but the threshold is the number needed to unseal.
The exam also tests what happens after a server restart. A typical question: 'After a Vault server is restarted, what is the first step required to make it operational?' The answer is: 'Provide the threshold number of unseal keys.' The trap answer is: 'Log in with a root token.' That is incorrect because even the root token cannot unseal a sealed Vault. Sealing is a lower-level protection than authentication.
You should memorise these key definitions for the exam:
- Seal: The state where Vault’s storage backend is encrypted and inaccessible. Vault refuses secret read/write operations. - Unseal: The process of providing the threshold number of key shares to reconstruct the master key, which decrypts the storage backend, making Vault operational. - Master key: The single key that encrypts the storage backend. Never stored by Vault; reconstructed from key shares. - Unseal key (key share): One of N pieces of the master key, generated by Shamir’s Secret Sharing. - Shamir’s Secret Sharing: The cryptographic algorithm used to split a secret into pieces that can be recombined. - Key shares: Total number of pieces generated (N). - Key threshold: Minimum number of pieces needed to reconstruct the master key (K). Traps to watch for:
Do not confuse sealing with a server crash. Sealing is a deliberate security feature, not an error state. A sealed Vault is working correctly; it is just in a protected mode.
Do not think that the root token can unseal Vault. The root token is only valid inside an already unsealed Vault for authentication purposes.
Do not assume that providing all key shares is better. The threshold is the minimum; providing more does not speed up the process and is extra work.
Remember that the unseal process is time-consuming. The exam might ask: 'What happens if a server is restarted overnight and no one is available to unseal it?' The answer is that Vault remains sealed until a human provides the keys; there is no automatic recovery.
Be aware that only someone who has passed the unsealing process can then authenticate. The exam might give a scenario where a junior admin tries to access a secret before unsealing, and you need to know that the request will be rejected with an error indicating Vault is sealed.
The exam will also test your understanding that the seal/unseal process is separate from the initialization process. Initialization happens once to generate the master key and key shares. After that, the server just needs to be unsealed on each restart. Initialization does not happen again unless you deliberately reinitialize, which destroys all existing secrets.
Vault starts in a sealed state after every restart, requiring human intervention to become operational.
The master key is a single key that encrypts Vault's storage backend, but it is never stored on disk.
Unseal keys are fragments of the master key generated by Shamir's Secret Sharing, each useless on its own.
The threshold is the minimum number of unseal keys needed to reconstruct the master key and unseal Vault.
Sealing Vault protects its secrets from being read by anyone who gains access to the server's memory or hard drive.
Unsealing only makes the storage backend accessible; authentication is a separate step required to read secrets.
You can manually seal Vault at any time with a single command, which is a useful emergency response to a suspected breach.
The rekeying operation changes the master key and generates new unseal keys, effectively invalidating old ones for security compliance.
These come up on the exam all the time. Here's how to tell them apart.
Sealing
Encrypts the storage backend and destroys the master key from memory.
Can be done by a single administrator with a single command.
Makes Vault refuse all secret-related requests.
Unsealing
Decrypts the storage backend by reconstructing the master key from threshold number of key shares.
Requires multiple operators with distinct key shares.
Makes Vault operational and able to accept secret requests after authentication.
Master Key
A single encryption key used to encrypt/decrypt Vault's storage backend.
Never stored by Vault on disk; only held in memory during runtime.
Cannot be used directly by any user.
Unseal Key (Key Share)
One of N cryptographic fragments of the master key.
Stored securely by individual administrators outside Vault.
Useless on its own; must be combined with other shares to form the master key.
Initialization
Creates the master key and generates key shares for the first time.
Produces a root token with superuser privileges.
Only needs to be done once, unless you deliberately reinitialize.
Unsealing
Reconstructs the existing master key from stored key shares.
Does not generate any new tokens or keys.
Must be done after every restart or manual seal.
Seal (Action)
Requires only a single administrative action (one command).
Immediately destroys the master key from memory.
Does not require any special number of people.
Unseal (Action)
Requires a coordinated multi-person effort (threshold number of operators).
Reconstructs the master key in memory.
Is a deliberate process that can take minutes to complete.
Locked Vault (Sealed State)
No secret operations possible; all read/write requests fail.
Storage is encrypted; cannot be read even if attacker has disk access.
Is the default state after start (safe state).
Unlocked Vault (Unsealed State)
Secret operations are possible after authentication.
Storage is decrypted in memory; attacker with memory access could read secrets.
Is the desired operational state for daily use.
Mistake
Once Vault is unsealed, it stays unsealed forever until you manually seal it.
Correct
Vault becomes sealed whenever the server restarts, or if a process crashes, or if you run the seal command. It does not stay unsealed indefinitely.
This mistake is common because people compare Vault to a typical database or web server that retains its state after a restart. Vault is unusual in that it deliberately loses its master key on restart.
Mistake
The unseal keys are the same as the master key, just stored separately.
Correct
Unseal keys are mathematical fragments of the master key, generated by Shamir's Secret Sharing. No single unseal key reveals anything about the master key; only when combined with the threshold number do they reconstruct it.
This common misunderstanding arises because people think of a physical key being cut into pieces that each show part of the key. In cryptography, the pieces are designed to be useless alone.
Mistake
You need to provide all five unseal keys to unseal a Vault that was initialised with five key shares.
Correct
You only need the number of keys equal to the 'threshold' value, which can be less than the total number of shares. For example, with 5 shares and threshold 3, only 3 keys are required.
People assume that if you have five pieces, you need all five to reassemble, similar to a physical puzzle. The threshold concept is counterintuitive because it is designed for resilience, not for full collection.
Mistake
The unseal process authenticates you to Vault, so after unsealing, you can immediately read any secret.
Correct
Unsealing only makes Vault's storage accessible. After that, you still need to authenticate with a valid token or auth method to read secrets. The unseal process does not grant you access to secrets.
This misconception arises because people confuse 'access to the server' with 'authorisation to read data.' They think that if you can make Vault work, you must have full access, which is incorrect.
Mistake
The seal/unseal process is a security measure to protect against internet attacks from outside the organisation.
Correct
The seal/unseal process is designed to protect against a physical compromise of the server or the storage backend, such as stolen hard drives or memory dumps. It does not prevent nor react to remote attacks like SQL injection.
Beginners tend to think of 'sealing' as a firewall-like feature that stops hackers. In reality, it protects against a very specific threat: an attacker who gains physical access to the server's hardware or files.
Mistake
You can use a single unseal key to temporarily open Vault and then quickly seal it again, like opening a window.
Correct
You must provide the full threshold number of keys to unseal Vault. You cannot partially unseal it. Once unsealed, it remains unsealed until a seal action or restart. There is no 'partially unsealed' state.
This confusion comes from thinking of the seal as a toggle switch. Vault's model is an all-or-nothing approach: the storage is either fully encrypted (sealed) or fully decrypted (unsealed), with no middle ground.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
You need the number of keys equal to the 'threshold' set during initialisation. If the threshold is 3, you need exactly 3 keys, not all of them. The remaining keys are backups.
If you lose all unseal keys, Vault becomes permanently sealed. There is no backdoor or recovery mechanism. Your secrets are effectively lost forever. This is why distributing keys and storing backups is critical.
No, the root token is only usable after Vault is unsealed. It is an authentication token for managing Vault, not an unseal tool. The root token cannot repair a sealed Vault.
Vault seals on restart because it never stores the master key on disk. After a restart, the master key is gone from memory, so Vault must be unsealed again using the key shares. This prevents an attacker who stole the server from reading secrets.
Sealing is the act of encrypting Vault's storage and destroying the master key from memory, making data inaccessible. Unsealing is the act of providing enough key shares to reconstruct the master key and decrypt the storage.
Yes, you can perform a 'rekey' operation using the 'vault operator rekey' command. This generates a new master key and new unseal key shares, but all existing secrets remain intact because they are re-encrypted with the new master key.
Shamir's Secret Sharing is a cryptographic algorithm that splits a secret (the master key) into N pieces, such that any K of them can reconstruct the original secret. It allows you to create a threshold scheme for the unseal process.
You've finished Seal/Unseal Process and Key Management. Continue through the VA-003 study guide to build a complete picture of the exam.
Done with this chapter?