003 · Domain 7: Vault architecture fundamentals · 8% of the exam
Task 7.2: Explain how to seal and unseal Vault
Starting sealed, unsealing with key shares or auto unseal, recovery keys, sealing in an emergency, and what each node in a cluster needs.
Study it
Sealing and unsealing: Shamir shares, auto unseal and recovery keys
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the HashiCorp documentation page that proves it.
Question 1 · choose 2
During an incident an operator seals an auto-unsealed Vault node with vault operator seal. Which two statements about that node are true? (Choose TWO.)
AIt stays sealed until it is restarted or unsealed through the unseal API with recovery key shares
BThe root key has been removed from its memory
CIt unseals itself again within a minute through the KMS
DIt keeps answering reads from secrets it already had in memory
ESealing it needed a quorum of recovery key holders
Show the answer and why
AIt stays sealed until it is restarted or unsealed through the unseal API with recovery key shares
Correct
After an API seal, an auto-unseal node remains sealed until restart or an unseal call, which takes recovery key fragments.
BThe root key has been removed from its memory
Correct
Sealing deletes the root key from memory, so a new unseal is needed to restore it.
CIt unseals itself again within a minute through the KMS
Incorrect
Auto unseal acts at startup; a node sealed through the API stays sealed.
DIt keeps answering reads from secrets it already had in memory
Incorrect
A sealed node can only report status and be unsealed.
ESealing it needed a quorum of recovery key holders
Incorrect
Sealing needs only a single operator with root privileges.
Sealing is the emergency brake: one privileged operator can do it, and the node then holds no root key until it is unsealed again.
A three-node integrated storage cluster with a Shamir seal (threshold 3) restarts after maintenance. The operators enter three key shares on node 1, which unseals. Nodes 2 and 3 still report Sealed true. What is needed?
AEnter three key shares on node 2, then three key shares on node 3
BNothing; the standbys get the root key from node 1 over Raft
CEnter one more of the key shares on each standby, because node 1 already reached the threshold
DRun vault operator unseal -migrate on node 1 to unseal the other nodes from it
Show the answer and why
AEnter three key shares on node 2, then three key shares on node 3
Correct
With the Shamir seal, each node must be unsealed with the threshold of shares; a partly unsealed state is not shared.
BNothing; the standbys get the root key from node 1 over Raft
Incorrect
Vault does not distribute an unsealed root key to other nodes under the Shamir seal.
CEnter one more of the key shares on each standby, because node 1 already reached the threshold
Incorrect
Every node needs the full threshold of shares.
DRun vault operator unseal -migrate on node 1 to unseal the other nodes from it
Incorrect
Nothing run on node 1 unseals the other nodes.
Shamir unsealing is per node. Auto unseal removes this manual step because each node asks the trusted service to decrypt the root key at start.
Vault servers on EC2 use the awskms seal with a dedicated KMS key, and the instances' IAM role grants the permissions. Which KMS permissions on that key does HashiCorp list for the seal?
Akms:Encrypt, kms:Decrypt and kms:DescribeKey on the key
Bkms:Decrypt only, since Vault never encrypts with the key
Ckms:CreateKey and kms:ScheduleKeyDeletion, to manage the key
Dkms:GenerateDataKey and kms:ReEncrypt, for each restart
Show the answer and why
Akms:Encrypt, kms:Decrypt and kms:DescribeKey on the key
Correct
The awskms seal documentation lists exactly these, granted through IAM, the key policy or KMS grants.
Bkms:Decrypt only, since Vault never encrypts with the key
Incorrect
The documented list includes kms:Encrypt and kms:DescribeKey as well.
Ckms:CreateKey and kms:ScheduleKeyDeletion, to manage the key
Incorrect
Vault uses an existing key and needs no rights to create keys or schedule their deletion.
Dkms:GenerateDataKey and kms:ReEncrypt, for each restart
Incorrect
These are not on the documented list for the awskms seal.
The awskms seal can also take its key ID and credentials from environment variables, and the permissions can be granted through IAM, the key policy or KMS grants.