github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/website/source/docs/concepts/seal.html.md (about) 1 --- 2 layout: "docs" 3 page_title: "Seal/Unseal" 4 sidebar_current: "docs-concepts-seal" 5 description: |- 6 A Vault must be unsealed before it can access its data. Likewise, it can be sealed to lock it down. 7 --- 8 9 # Seal/Unseal 10 11 When a Vault server is started, it starts in a _sealed_ state. In this 12 state, Vault is configured to know where and how to access the physical 13 storage, but doesn't know how to decrypt any of it. 14 15 _Unsealing_ is the process of constructing the master key necessary to 16 read the decryption key to decrypt the data, allowing access to the Vault. 17 18 Prior to unsealing, almost no operations are possible with Vault. For 19 example authentication, managing the mount tables, etc. are all not possible. 20 The only possible operations are to unseal the Vault and check the status 21 of the unseal. 22 23 ## Why? 24 25 The data stored by Vault is stored encrypted. Vault needs the 26 _encryption key_ in order to decrypt the data. The encryption key is 27 also stored with the data, but encrypted with another encryption key 28 known as the _master key_. The master key isn't stored anywhere. 29 30 Therefore, to decrypt the data, Vault must decrypt the encryption key 31 which requires the master key. Unsealing is the process of reconstructing 32 this master key. 33 34 Instead of distributing this master key as a single key to an operator, 35 Vault uses an algorithm known as 36 [Shamir's Secret Sharing](http://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing) 37 to split the key into shards. A certain threshold of shards is required to 38 reconstruct the master key. 39 40 This is the _unseal_ process: the shards are added one at a time (in any 41 order) until enough shards are present to reconstruct the key and 42 decrypt the data. 43 44 ## Unsealing 45 46 The unseal process is done by running `vault unseal` or via the API. 47 This process is stateful: each key can be entered via multiple mechanisms 48 on multiple computers and it will work. This allows each shard of the master 49 key to be on a distinct machine for better security. 50 51 Once a Vault is unsealed, it remains unsealed until one of two things happens: 52 53 1. It is resealed via the API (see below). 54 55 2. The server is restarted. 56 57 -> **Note:** Unsealing makes the process of automating a Vault install 58 difficult. Automated tools can easily install, configure, and start Vault, 59 but unsealing it is a very manual process. We have plans in the future to 60 make it easier. For the time being, the best method is to manually unseal 61 multiple Vault servers in [HA mode](/docs/concepts/ha.html). Use a tool such 62 as Consul to make sure you only query Vault servers that are unsealed. 63 64 ## Sealing 65 66 There is also an API to seal the Vault. This will throw away the encryption 67 key and require another unseal process to restore it. Sealing only requires 68 a single operator with root privileges. 69 70 This way, if there is a detected intrusion, the Vault data can be locked 71 quickly to try to minimize damages. It can't be accessed again without 72 access to the master key shards.