2017-09-08 02:14:30 +00:00
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: unwrap - Command
|
2017-09-08 02:14:30 +00:00
|
|
|
description: |-
|
|
|
|
The "unwrap" command unwraps a wrapped secret from Vault by the given token.
|
|
|
|
The result is the same as the "vault read" operation on the non-wrapped
|
|
|
|
secret. If no token is given, the data in the currently authenticated token is
|
|
|
|
unwrapped.
|
|
|
|
---
|
|
|
|
|
|
|
|
# unwrap
|
|
|
|
|
|
|
|
The `unwrap` command unwraps a wrapped secret from Vault by the given token. The
|
|
|
|
result is the same as the "vault read" operation on the non-wrapped secret. If
|
|
|
|
no token is given, the data in the currently authenticated token is unwrapped.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Unwrap the data in the cubbyhole secrets engine for a token:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-08 02:14:30 +00:00
|
|
|
$ vault unwrap 3de9ece1-b347-e143-29b0-dc2dc31caafd
|
|
|
|
```
|
|
|
|
|
|
|
|
Unwrap the data in the active token:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2017-09-13 01:48:52 +00:00
|
|
|
$ vault login 848f9ccf-7176-098c-5e2b-75a0689d41cd
|
2017-09-08 02:14:30 +00:00
|
|
|
$ vault unwrap # unwraps 848f9ccf...
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
The following flags are available in addition to the [standard set of
|
2023-01-26 00:12:15 +00:00
|
|
|
flags](/vault/docs/commands) included on all commands.
|
2017-09-08 02:14:30 +00:00
|
|
|
|
|
|
|
### Output Options
|
|
|
|
|
|
|
|
- `-field` `(string: "")` - Print only the field with the given name. Specifying
|
|
|
|
this option will take precedence over other formatting directives. The result
|
2018-02-12 23:12:16 +00:00
|
|
|
will not have a trailing newline making it ideal for piping to other processes.
|
2017-09-08 02:14:30 +00:00
|
|
|
|
|
|
|
- `-format` `(string: "table")` - Print the output in the given format. Valid
|
|
|
|
formats are "table", "json", or "yaml". This can also be specified via the
|
|
|
|
`VAULT_FORMAT` environment variable.
|