2017-03-15 06:40:33 +00:00
|
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
|
layout: api
|
|
|
|
|
page_title: /sys/unseal - HTTP API
|
|
|
|
|
description: The `/sys/unseal` endpoint is used to unseal the Vault.
|
2017-03-15 06:40:33 +00:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# `/sys/unseal`
|
|
|
|
|
|
2020-08-05 12:33:47 +00:00
|
|
|
|
The `/sys/unseal` endpoint is used to unseal the Vault.
|
2017-03-15 06:40:33 +00:00
|
|
|
|
|
|
|
|
|
## Submit Unseal Key
|
|
|
|
|
|
|
|
|
|
This endpoint is used to enter a single master key share to progress the
|
|
|
|
|
unsealing of the Vault. If the threshold number of master key shares is reached,
|
|
|
|
|
Vault will attempt to unseal the Vault. Otherwise, this API must be called
|
|
|
|
|
multiple times until that threshold is met.
|
|
|
|
|
|
|
|
|
|
Either the `key` or `reset` parameter must be provided; if both are provided,
|
|
|
|
|
`reset` takes precedence.
|
|
|
|
|
|
2020-01-18 00:18:09 +00:00
|
|
|
|
| Method | Path |
|
|
|
|
|
| :----- | :------------ |
|
2022-02-25 14:52:24 +00:00
|
|
|
|
| `POST` | `/sys/unseal` |
|
2017-03-15 06:40:33 +00:00
|
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
|
|
|
|
- `key` `(string: "")` – Specifies a single master key share. This is required
|
|
|
|
|
unless `reset` is true.
|
|
|
|
|
|
|
|
|
|
- `reset` `(bool: false)` – Specifies if previously-provided unseal keys are
|
|
|
|
|
discarded and the unseal process is reset.
|
|
|
|
|
|
2019-03-18 23:38:54 +00:00
|
|
|
|
- `migrate` `(bool: false)` - Available in 1.0 - Used to migrate the seal
|
2020-01-18 00:18:09 +00:00
|
|
|
|
from shamir to autoseal or autoseal to shamir. Must be provided on all unseal
|
2018-10-26 17:04:51 +00:00
|
|
|
|
key calls.
|
2018-10-25 23:44:53 +00:00
|
|
|
|
|
2017-03-15 06:40:33 +00:00
|
|
|
|
### Sample Payload
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"key": "abcd1234..."
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Sample Request
|
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
|
```shell-session
|
2017-03-15 06:40:33 +00:00
|
|
|
|
$ curl \
|
2022-02-25 14:52:24 +00:00
|
|
|
|
--request POST \
|
2017-03-15 06:40:33 +00:00
|
|
|
|
--data @payload.json \
|
2018-03-23 15:41:51 +00:00
|
|
|
|
http://127.0.0.1:8200/v1/sys/unseal
|
2017-03-15 06:40:33 +00:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Sample Response
|
|
|
|
|
|
|
|
|
|
The "t" parameter is the threshold, and "n" is the number of shares.
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"sealed": true,
|
|
|
|
|
"t": 3,
|
|
|
|
|
"n": 5,
|
|
|
|
|
"progress": 2,
|
|
|
|
|
"version": "0.6.2"
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Sample response when Vault is unsealed.
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"sealed": false,
|
|
|
|
|
"t": 3,
|
|
|
|
|
"n": 5,
|
|
|
|
|
"progress": 0,
|
|
|
|
|
"version": "0.6.2",
|
|
|
|
|
"cluster_name": "vault-cluster-d6ec3c7f",
|
|
|
|
|
"cluster_id": "3e8b3fec-3749-e056-ba41-b62a63b997e8"
|
|
|
|
|
}
|
|
|
|
|
```
|