mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 07:01:09 +02:00
Merge pull request #23 from hashicorp/sethvargo/format
Update website whitespace and formatting
This commit is contained in:
commit
c7843ed09b
4
.gitignore
vendored
4
.gitignore
vendored
@ -30,3 +30,7 @@ pkg/
|
|||||||
# Vault-specific
|
# Vault-specific
|
||||||
example.hcl
|
example.hcl
|
||||||
example.vault.d
|
example.vault.d
|
||||||
|
|
||||||
|
# Ruby
|
||||||
|
website/vendor/ruby
|
||||||
|
website/.bundle
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
gem 'middleman-hashicorp', git: 'https://github.com/hashicorp/middleman-hashicorp'
|
gem 'middleman-hashicorp', github: 'hashicorp/middleman-hashicorp'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
GIT
|
GIT
|
||||||
remote: https://github.com/hashicorp/middleman-hashicorp
|
remote: git://github.com/hashicorp/middleman-hashicorp.git
|
||||||
revision: 0e21734c64afcf0c6d35b40b26840254227c1949
|
revision: 5d1edbfa4ceec20b33b501f0162e2f881afadfa9
|
||||||
specs:
|
specs:
|
||||||
middleman-hashicorp (0.1.0)
|
middleman-hashicorp (0.1.0)
|
||||||
bootstrap-sass (~> 3.3)
|
bootstrap-sass (~> 3.3)
|
||||||
@ -26,7 +26,7 @@ GEM
|
|||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
autoprefixer-rails (5.1.8.1)
|
autoprefixer-rails (5.1.11)
|
||||||
execjs
|
execjs
|
||||||
json
|
json
|
||||||
bootstrap-sass (3.3.4.1)
|
bootstrap-sass (3.3.4.1)
|
||||||
@ -39,7 +39,7 @@ GEM
|
|||||||
coffee-script (2.4.1)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.9.1)
|
coffee-script-source (1.9.1.1)
|
||||||
commonjs (0.2.7)
|
commonjs (0.2.7)
|
||||||
compass (1.0.3)
|
compass (1.0.3)
|
||||||
chunky_png (~> 1.2)
|
chunky_png (~> 1.2)
|
||||||
@ -117,7 +117,7 @@ GEM
|
|||||||
middleman-syntax (2.0.0)
|
middleman-syntax (2.0.0)
|
||||||
middleman-core (~> 3.2)
|
middleman-core (~> 3.2)
|
||||||
rouge (~> 1.0)
|
rouge (~> 1.0)
|
||||||
minitest (5.5.1)
|
minitest (5.6.0)
|
||||||
multi_json (1.11.0)
|
multi_json (1.11.0)
|
||||||
padrino-helpers (0.12.5)
|
padrino-helpers (0.12.5)
|
||||||
i18n (~> 0.6, >= 0.6.7)
|
i18n (~> 0.6, >= 0.6.7)
|
||||||
|
@ -36,7 +36,7 @@ An example, real world process for using this provider:
|
|||||||
system tells security operators a unique ID for this machine. This
|
system tells security operators a unique ID for this machine. This
|
||||||
process can be scripted, but the key is that it is out-of-band and
|
process can be scripted, but the key is that it is out-of-band and
|
||||||
out of reach of configuration management.
|
out of reach of configuration management.
|
||||||
(Path: map/user-id/<user-id>)
|
(Path: map/user-id/<user-id>)
|
||||||
|
|
||||||
4. A new server is provisioned. Configuration management configures the
|
4. A new server is provisioned. Configuration management configures the
|
||||||
app ID, the server itself detects its user ID. With both of these
|
app ID, the server itself detects its user ID. With both of these
|
||||||
|
@ -98,10 +98,10 @@ Data can be read using `vault read`. This command is very simple:
|
|||||||
|
|
||||||
```
|
```
|
||||||
$ vault read secret/password
|
$ vault read secret/password
|
||||||
Key Value
|
Key Value
|
||||||
lease_id secret/password/76c844fb-aeba-a766-0a50-2b907072233a
|
lease_id secret/password/76c844fb-aeba-a766-0a50-2b907072233a
|
||||||
lease_duration 2592000
|
lease_duration 2592000
|
||||||
value itsasecret
|
value itsasecret
|
||||||
```
|
```
|
||||||
|
|
||||||
You can use the `-format` flag to get various different formats out
|
You can use the `-format` flag to get various different formats out
|
||||||
|
@ -17,17 +17,17 @@ Policies are [HCL](https://github.com/hashicorp/hcl) or JSON documents
|
|||||||
that describe what parts of Vault a user is allowed to access. An example
|
that describe what parts of Vault a user is allowed to access. An example
|
||||||
of a policy is shown below:
|
of a policy is shown below:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
path "sys" {
|
path "sys" {
|
||||||
policy = "deny"
|
policy = "deny"
|
||||||
}
|
}
|
||||||
|
|
||||||
path "secret" {
|
path "secret" {
|
||||||
policy = "write"
|
policy = "write"
|
||||||
}
|
}
|
||||||
|
|
||||||
path "secret/foo" {
|
path "secret/foo" {
|
||||||
policy = "read"
|
policy = "read"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -12,15 +12,15 @@ Outside of development mode, Vault servers are configured using a file.
|
|||||||
The format of this file is [HCL](https://github.com/hashicorp/hcl) or JSON.
|
The format of this file is [HCL](https://github.com/hashicorp/hcl) or JSON.
|
||||||
An example configuration is shown below:
|
An example configuration is shown below:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
backend "consul" {
|
backend "consul" {
|
||||||
address = "demo.consul.io:80"
|
address = "demo.consul.io:80"
|
||||||
path = "vault"
|
path = "vault"
|
||||||
}
|
}
|
||||||
|
|
||||||
listener "tcp" {
|
listener "tcp" {
|
||||||
address = "127.0.0.1:8200"
|
address = "127.0.0.1:8200"
|
||||||
tls_disable = 1
|
tls_disable = 1
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -57,20 +57,24 @@ backends, credential providers, etc. then append `?help=1` to any
|
|||||||
URL. If you have valid permission to access the path, then the help text
|
URL. If you have valid permission to access the path, then the help text
|
||||||
will be returned with the following structure:
|
will be returned with the following structure:
|
||||||
|
|
||||||
{
|
```javascript
|
||||||
"help": "help text"
|
{
|
||||||
}
|
"help": "help text"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Error Response
|
## Error Response
|
||||||
|
|
||||||
A common JSON structure is always returned to return errors:
|
A common JSON structure is always returned to return errors:
|
||||||
|
|
||||||
{
|
```javascript
|
||||||
"errors": [
|
{
|
||||||
"message",
|
"errors": [
|
||||||
"another message"
|
"message",
|
||||||
]
|
"another message"
|
||||||
}
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
This structure will be sent down for any HTTP status greater than
|
This structure will be sent down for any HTTP status greater than
|
||||||
or equal to 400.
|
or equal to 400.
|
||||||
@ -94,5 +98,3 @@ The following HTTP status codes are used throughout the API.
|
|||||||
try again later. If the error persists, report a bug.
|
try again later. If the error persists, report a bug.
|
||||||
- `503` - Vault is down for maintenance or is currently sealed.
|
- `503` - Vault is down for maintenance or is currently sealed.
|
||||||
Try again later.
|
Try again later.
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,97 +11,98 @@ description: |-
|
|||||||
## GET
|
## GET
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Lists all the available policies.
|
Lists all the available policies.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>GET</dd>
|
<dd>GET</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
None
|
None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
{
|
{
|
||||||
"file": {
|
"file": {
|
||||||
"type: "file",
|
"type: "file",
|
||||||
"description: "Store logs in a file",
|
"description: "Store logs in a file",
|
||||||
"options": {
|
"options": {
|
||||||
"path": "/var/log/file"
|
"path": "/var/log/file"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</dd>
|
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## PUT
|
## PUT
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Enable an audit backend.
|
Enable an audit backend.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>PUT</dd>
|
<dd>PUT</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/audit/<name>`</dd>
|
<dd>`/sys/audit/<name>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">type</span>
|
<span class="param">type</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
The type of the audit backend.
|
The type of the audit backend.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">description</span>
|
<span class="param">description</span>
|
||||||
<span class="param-flags">optional</span>
|
<span class="param-flags">optional</span>
|
||||||
A description of the audit backend for operators.
|
A description of the audit backend for operators.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">options</span>
|
<span class="param">options</span>
|
||||||
<span class="param-flags">optional</span>
|
<span class="param-flags">optional</span>
|
||||||
An object of options to configure the backend. This is
|
An object of options to configure the backend. This is
|
||||||
dependent on the backend type. Please consult the documentation
|
dependent on the backend type. Please consult the documentation
|
||||||
for the backend type you intend to use.
|
for the backend type you intend to use.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` response code.
|
<dd>`204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## DELETE
|
## DELETE
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Disable the given audit backend.
|
Disable the given audit backend.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>DELETE</dd>
|
<dd>DELETE</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/audit/<name>`</dd>
|
<dd>`/sys/audit/<name>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>None
|
<dd>None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` response code.
|
<dd>`204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -11,91 +11,92 @@ description: |-
|
|||||||
## GET
|
## GET
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Lists all the enabled auth backends.
|
Lists all the enabled auth backends.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>GET</dd>
|
<dd>GET</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
None
|
None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
{
|
{
|
||||||
"github": {
|
"github": {
|
||||||
"type": "github",
|
"type": "github",
|
||||||
"description": "GitHub auth"
|
"description": "GitHub auth"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</dd>
|
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## POST
|
## POST
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Enable a new auth backend. The auth backend can be accessed
|
Enable a new auth backend. The auth backend can be accessed
|
||||||
and configured via the mount point specified in the URL. This
|
and configured via the mount point specified in the URL. This
|
||||||
mount point will be exposed under the `auth` prefix. For example,
|
mount point will be exposed under the `auth` prefix. For example,
|
||||||
enabling with the `/sys/auth/foo` URL will make the backend
|
enabling with the `/sys/auth/foo` URL will make the backend
|
||||||
available at `/auth/foo`.
|
available at `/auth/foo`.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>POST</dd>
|
<dd>POST</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/auth/<mount point>`</dd>
|
<dd>`/sys/auth/<mount point>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">type</span>
|
<span class="param">type</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
The name of the auth backend type, such as "github"
|
The name of the auth backend type, such as "github"
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">description</span>
|
<span class="param">description</span>
|
||||||
<span class="param-flags">optional</span>
|
<span class="param-flags">optional</span>
|
||||||
A human-friendly description of the auth backend.
|
A human-friendly description of the auth backend.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` response code.
|
<dd>`204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## DELETE
|
## DELETE
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Disable the auth backend at the given mount point.
|
Disable the auth backend at the given mount point.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>DELETE</dd>
|
<dd>DELETE</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/auth/<mount point>`</dd>
|
<dd>`/sys/auth/<mount point>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>None
|
<dd>None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` response code.
|
<dd>`204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -11,68 +11,68 @@ description: |-
|
|||||||
## GET
|
## GET
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Return the initialization status of a Vault.
|
Return the initialization status of a Vault.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>GET</dd>
|
<dd>GET</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>None</dd>
|
||||||
None
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
{
|
{
|
||||||
"initialized": false
|
"initialize": true
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</dd>
|
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## PUT
|
## PUT
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Initializes a new Vault. The Vault must've not been previously
|
Initializes a new Vault. The Vault must've not been previously
|
||||||
initialized.
|
initialized.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>PUT</dd>
|
<dd>PUT</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">secret_shares</span>
|
<span class="param">secret_shares</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
The number of shares to split the master key into.
|
The number of shares to split the master key into.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">secret_threshold</span>
|
<span class="param">secret_threshold</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
The number of shares required to reconstruct the master key.
|
The number of shares required to reconstruct the master key.
|
||||||
This must be less than or equal to <code>secret_shares</code>.
|
This must be less than or equal to <code>secret_shares</code>.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>
|
<dd>
|
||||||
A JSON-encoded object including the master keys and initial root token:
|
A JSON-encoded object including the master keys and initial root token:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
{
|
{
|
||||||
"keys": ["one", "two", "three"],
|
"keys": ["one", "two", "three"],
|
||||||
"root_token": "foo"
|
"root_token": "foo"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</dd>
|
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -9,28 +9,29 @@ description: |-
|
|||||||
# /sys/leader
|
# /sys/leader
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Returns the high availability status and current leader instance of Vault.
|
Returns the high availability status and current leader instance of Vault.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>GET</dd>
|
<dd>GET</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
None
|
None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
{
|
{
|
||||||
"ha_enabled": true,
|
"ha_enabled": true,
|
||||||
"is_self": false,
|
"is_self": false,
|
||||||
"leader_address": "https://127.0.0.1:8200/"
|
"leader_address": "https://127.0.0.1:8200/"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</dd>
|
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -11,92 +11,93 @@ description: |-
|
|||||||
## GET
|
## GET
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Lists all the mounted secret backends.
|
Lists all the mounted secret backends.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>GET</dd>
|
<dd>GET</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
None
|
None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
{
|
{
|
||||||
"aws": {
|
"aws": {
|
||||||
"type": "aws",
|
"type": "aws",
|
||||||
"description": "AWS keys"
|
"description": "AWS keys"
|
||||||
},
|
},
|
||||||
|
|
||||||
"sys": {
|
"sys": {
|
||||||
"type": "system",
|
"type": "system",
|
||||||
"description": "system endpoint"
|
"description": "system endpoint"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</dd>
|
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## POST
|
## POST
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Mount a new secret backend to the mount point in the URL.
|
Mount a new secret backend to the mount point in the URL.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>POST</dd>
|
<dd>POST</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/mounts/<mount point>`</dd>
|
<dd>`/sys/mounts/<mount point>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">type</span>
|
<span class="param">type</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
The name of the backend type, such as "aws"
|
The name of the backend type, such as "aws"
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">description</span>
|
<span class="param">description</span>
|
||||||
<span class="param-flags">optional</span>
|
<span class="param-flags">optional</span>
|
||||||
A human-friendly description of the mount.
|
A human-friendly description of the mount.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` response code.
|
<dd>`204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## DELETE
|
## DELETE
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Unmount the mount point specified in the URL.
|
Unmount the mount point specified in the URL.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>DELETE</dd>
|
<dd>DELETE</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/mounts/<mount point>`</dd>
|
<dd>`/sys/mounts/<mount point>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>None
|
<dd>None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` response code.
|
<dd>`204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -11,81 +11,82 @@ description: |-
|
|||||||
## GET
|
## GET
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Lists all the available policies.
|
Lists all the available policies.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>GET</dd>
|
<dd>GET</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
None
|
None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
{
|
{
|
||||||
"policies": ["root", "deploy"]
|
"policies": ["root", "deploy"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</dd>
|
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## PUT
|
## PUT
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Add or update a policy. Once a policy is updated, it takes effect
|
Add or update a policy. Once a policy is updated, it takes effect
|
||||||
immediately to all associated users.
|
immediately to all associated users.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>PUT</dd>
|
<dd>PUT</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/policy/<name>`</dd>
|
<dd>`/sys/policy/<name>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">rules</span>
|
<span class="param">rules</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
The policy document.
|
The policy document.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` respons code.
|
<dd>`204` respons code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## DELETE
|
## DELETE
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Delete the policy with the given name. This will immediately
|
Delete the policy with the given name. This will immediately
|
||||||
affect all associated users.
|
affect all associated users.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>DELETE</dd>
|
<dd>DELETE</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/policy/<name>`</dd>
|
<dd>`/sys/policy/<name>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>None
|
<dd>None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` respons code.
|
<dd>`204` respons code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -11,85 +11,86 @@ description: |-
|
|||||||
## GET
|
## GET
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Reads the value of the key at the given path. This is the raw path in the
|
Reads the value of the key at the given path. This is the raw path in the
|
||||||
storage packend and not the logical path that is exposed via the mount system.
|
storage packend and not the logical path that is exposed via the mount system.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>GET</dd>
|
<dd>GET</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/raw/<path>`</dd>
|
<dd>`/sys/raw/<path>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
None
|
None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
{
|
{
|
||||||
"value": "{'foo':'bar'}"
|
"value": "{'foo':'bar'}"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</dd>
|
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## PUT
|
## PUT
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Update the value of the key at the given path. This is the raw path in the
|
Update the value of the key at the given path. This is the raw path in the
|
||||||
storage packend and not the logical path that is exposed via the mount system.
|
storage packend and not the logical path that is exposed via the mount system.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>PUT</dd>
|
<dd>PUT</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/raw/<path>`</dd>
|
<dd>`/sys/raw/<path>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">value</span>
|
<span class="param">value</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
The value of the key.
|
The value of the key.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` response code.
|
<dd>`204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
## DELETE
|
## DELETE
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Delete the key with given path. This is the raw path in the
|
Delete the key with given path. This is the raw path in the
|
||||||
storage packend and not the logical path that is exposed via the mount system.
|
storage packend and not the logical path that is exposed via the mount system.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>DELETE</dd>
|
<dd>DELETE</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/raw/<path>`</dd>
|
<dd>`/sys/raw/<path>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>None
|
<dd>None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` response code.
|
<dd>`204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -9,31 +9,31 @@ description: |-
|
|||||||
# /sys/remount
|
# /sys/remount
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Remount an already-mounted backend to a new mount point.
|
Remount an already-mounted backend to a new mount point.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>POST</dd>
|
<dd>POST</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">from</span>
|
<span class="param">from</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
The previous mount point.
|
The previous mount point.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">to</span>
|
<span class="param">to</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
The new mount point.
|
The new mount point.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>`204` response code.
|
<dd>`204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -9,30 +9,30 @@ description: |-
|
|||||||
# /sys/renew
|
# /sys/renew
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Renew a secret, requesting to extend the lease.
|
Renew a secret, requesting to extend the lease.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>PUT</dd>
|
<dd>PUT</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/renew/<lease id>`</dd>
|
<dd>`/sys/renew/<lease id>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">increment</span>
|
<span class="param">increment</span>
|
||||||
<span class="param-flags">optional</span>
|
<span class="param-flags">optional</span>
|
||||||
A requested amount of time in seconds to extend the lease.
|
A requested amount of time in seconds to extend the lease.
|
||||||
This is advisory.
|
This is advisory.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>A secret structure.
|
<dd>A secret structure.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -9,21 +9,21 @@ description: |-
|
|||||||
# /sys/revoke-prefix
|
# /sys/revoke-prefix
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Revoke all secrets generated under a given prefix immediately.
|
Revoke all secrets generated under a given prefix immediately.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>PUT</dd>
|
<dd>PUT</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/revoke-prefix/<path prefix>`</dd>
|
<dd>`/sys/revoke-prefix/<path prefix>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>None</dd>
|
<dd>None</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>A `204` response code.
|
<dd>A `204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -9,21 +9,21 @@ description: |-
|
|||||||
# /sys/revoke
|
# /sys/revoke
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Revoke a secret immediately.
|
Revoke a secret immediately.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>PUT</dd>
|
<dd>PUT</dd>
|
||||||
|
|
||||||
<dt>URL</dt>
|
<dt>URL</dt>
|
||||||
<dd>`/sys/revoke/<lease id>`</dd>
|
<dd>`/sys/revoke/<lease id>`</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>None</dd>
|
<dd>None</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>A `204` response code.
|
<dd>A `204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -9,29 +9,31 @@ description: |-
|
|||||||
# /sys/seal-status
|
# /sys/seal-status
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Returns the seal status of the Vault.
|
Returns the seal status of the Vault.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>GET</dd>
|
<dd>GET</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
None
|
None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>The "t" parameter is the threshold, and "n" is the number of shares.
|
<dd>
|
||||||
|
The "t" parameter is the threshold, and "n" is the number of shares.
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
{
|
{
|
||||||
"sealed": true,
|
"sealed": true,
|
||||||
"t": 3,
|
"t": 3,
|
||||||
"n": 5,
|
"n": 5,
|
||||||
"progress": 2
|
"progress": 2
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
</dd>
|
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -9,20 +9,20 @@ description: |-
|
|||||||
# /sys/seal
|
# /sys/seal
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Seals the Vault.
|
Seals the Vault.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>PUT</dd>
|
<dd>PUT</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
None
|
None
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>A `204` response code.
|
<dd>A `204` response code.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -9,33 +9,33 @@ description: |-
|
|||||||
# /sys/unseal
|
# /sys/unseal
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Description</dt>
|
<dt>Description</dt>
|
||||||
<dd>
|
<dd>
|
||||||
Enter a single master key share to progress the unsealing of the Vault.
|
Enter a single master key share to progress the unsealing of the Vault.
|
||||||
If the threshold number of master key shares is reached, Vault
|
If the threshold number of master key shares is reached, Vault
|
||||||
will attempt to unseal the Vault. Otherwise, this API must be
|
will attempt to unseal the Vault. Otherwise, this API must be
|
||||||
called multiple times until that threshold is met.
|
called multiple times until that threshold is met.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt>Method</dt>
|
<dt>Method</dt>
|
||||||
<dd>PUT</dd>
|
<dd>PUT</dd>
|
||||||
|
|
||||||
<dt>Parameters</dt>
|
<dt>Parameters</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">secret_shares</span>
|
<span class="param">secret_shares</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
The number of shares to split the master key into.
|
The number of shares to split the master key into.
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span class="param">key</span>
|
<span class="param">key</span>
|
||||||
<span class="param-flags">required</span>
|
<span class="param-flags">required</span>
|
||||||
A single master share key.
|
A single master share key.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
<dt>Returns</dt>
|
<dt>Returns</dt>
|
||||||
<dd>The same result as `/sys/seal-status`.
|
<dd>The same result as `/sys/seal-status`.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -155,4 +155,3 @@ This has been a brief high-level overview of the architecture of Vault. There
|
|||||||
are more details available for each of the sub-systems.
|
are more details available for each of the sub-systems.
|
||||||
|
|
||||||
For other details, either consult the code, ask in IRC or reach out to the mailing list.
|
For other details, either consult the code, ask in IRC or reach out to the mailing list.
|
||||||
|
|
||||||
|
@ -47,4 +47,3 @@ then one of the standbys will take over and become the active instance.
|
|||||||
It is important to note that only _unsealed_ servers act as a standby.
|
It is important to note that only _unsealed_ servers act as a standby.
|
||||||
If a server is still in the sealed state, then it cannot act as a standby
|
If a server is still in the sealed state, then it cannot act as a standby
|
||||||
as it would be unable to serve any requests should the active server fail.
|
as it would be unable to serve any requests should the active server fail.
|
||||||
|
|
||||||
|
@ -146,5 +146,3 @@ prohibitively time consuming. Opening the bank vault requires two-factors: the k
|
|||||||
Similarly, Vault requires multiple shares be provided to reconstruct the master key.
|
Similarly, Vault requires multiple shares be provided to reconstruct the master key.
|
||||||
Once unsealed, each security deposit boxes still requires the owner provide a key, and similarly
|
Once unsealed, each security deposit boxes still requires the owner provide a key, and similarly
|
||||||
the Vault ACL system protects all the secrets stored.
|
the Vault ACL system protects all the secrets stored.
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,4 +46,3 @@ Below is sample output of a telemetry dump:
|
|||||||
[2015-04-20 12:24:30 -0700 PDT][S] 'vault.core.handle_request': Count: 2 Min: 0.097 Mean: 0.228 Max: 0.359 Stddev: 0.186 Sum: 0.457
|
[2015-04-20 12:24:30 -0700 PDT][S] 'vault.core.handle_request': Count: 2 Min: 0.097 Mean: 0.228 Max: 0.359 Stddev: 0.186 Sum: 0.457
|
||||||
[2015-04-20 12:24:30 -0700 PDT][S] 'vault.expire.register': Count: 1 Sum: 0.18
|
[2015-04-20 12:24:30 -0700 PDT][S] 'vault.expire.register': Count: 1 Sum: 0.18
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -51,4 +51,3 @@ a use count of one makes a _one time token_. This means the token can be used
|
|||||||
for a single request before being automatically revoked. This can be generalized
|
for a single request before being automatically revoked. This can be generalized
|
||||||
to any number of uses. Limited use tokens cannot be used to create sub-tokens,
|
to any number of uses. Limited use tokens cannot be used to create sub-tokens,
|
||||||
but they can be a powerful way to allow extremely limited access to Vault.
|
but they can be a powerful way to allow extremely limited access to Vault.
|
||||||
|
|
||||||
|
@ -28,9 +28,9 @@ Within a folder containing Vault configurations, create a subfolder
|
|||||||
the root folder containing the "child" folder, add this to one of the
|
the root folder containing the "child" folder, add this to one of the
|
||||||
Vault files:
|
Vault files:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "child" {
|
module "child" {
|
||||||
source = "./child"
|
source = "./child"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -54,11 +54,11 @@ variables or outputs.
|
|||||||
|
|
||||||
In the "child" module we created above, add the following:
|
In the "child" module we created above, add the following:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
variable "memory" {}
|
variable "memory" {}
|
||||||
|
|
||||||
output "received" {
|
output "received" {
|
||||||
value = "${var.memory}"
|
value = "${var.memory}"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -67,15 +67,15 @@ that will simply be the value of the memory variable.
|
|||||||
|
|
||||||
You can then configure the module and use the output like so:
|
You can then configure the module and use the output like so:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "child" {
|
module "child" {
|
||||||
source = "./child"
|
source = "./child"
|
||||||
|
|
||||||
memory = "1G"
|
memory = "1G"
|
||||||
}
|
}
|
||||||
|
|
||||||
output "child_memory" {
|
output "child_memory" {
|
||||||
value = "${module.child.received}"
|
value = "${module.child.received}"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -98,13 +98,13 @@ the [path interpolated variables](/docs/configuration/interpolation.html).
|
|||||||
|
|
||||||
An example is shown below:
|
An example is shown below:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
resource "aws_instance" "server" {
|
resource "aws_instance" "server" {
|
||||||
...
|
...
|
||||||
|
|
||||||
provisioner "remote-exec" {
|
provisioner "remote-exec" {
|
||||||
script = "${path.module}/script.sh"
|
script = "${path.module}/script.sh"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ for example.
|
|||||||
|
|
||||||
An example is shown below:
|
An example is shown below:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "./consul"
|
source = "./consul"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -56,17 +56,17 @@ automatically instantly available.
|
|||||||
Vault will automatically recognize GitHub URLs and turn them into
|
Vault will automatically recognize GitHub URLs and turn them into
|
||||||
the proper Git repository. The syntax is simple:
|
the proper Git repository. The syntax is simple:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "github.com/hashicorp/example"
|
source = "github.com/hashicorp/example"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Subdirectories within the repository can also be referenced:
|
Subdirectories within the repository can also be referenced:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "github.com/hashicorp/example//subdir"
|
source = "github.com/hashicorp/example//subdir"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -86,17 +86,17 @@ Git repositories for more information.
|
|||||||
Vault will automatically recognize BitBucket URLs and turn them into
|
Vault will automatically recognize BitBucket URLs and turn them into
|
||||||
the proper Git or Mercurial repository. An example:
|
the proper Git or Mercurial repository. An example:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "bitbucket.org/hashicorp/example"
|
source = "bitbucket.org/hashicorp/example"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Subdirectories within the repository can also be referenced:
|
Subdirectories within the repository can also be referenced:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "bitbucket.org/hashicorp/example//subdir"
|
source = "bitbucket.org/hashicorp/example//subdir"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -113,9 +113,9 @@ Generic Git repositories are also supported. The value of `source` in this
|
|||||||
case should be a complete Git-compatible URL. Using Git requires that
|
case should be a complete Git-compatible URL. Using Git requires that
|
||||||
Git is installed on your system. Example:
|
Git is installed on your system. Example:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "git://hashicorp.com/module.git"
|
source = "git://hashicorp.com/module.git"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -123,9 +123,9 @@ You can also use protocols such as HTTP or SSH, but you'll have to hint
|
|||||||
to Vault (using the forced source type syntax documented below) to use
|
to Vault (using the forced source type syntax documented below) to use
|
||||||
Git:
|
Git:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "git::https://hashicorp.com/module.git"
|
source = "git::https://hashicorp.com/module.git"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -136,9 +136,9 @@ parameters:
|
|||||||
|
|
||||||
An example of using these parameters is shown below:
|
An example of using these parameters is shown below:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "git::https://hashicorp.com/module.git?ref=master"
|
source = "git::https://hashicorp.com/module.git?ref=master"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -148,9 +148,9 @@ Generic Mercurial repositories are supported. The value of `source` in this
|
|||||||
case should be a complete Mercurial-compatible URL. Using Mercurial requires that
|
case should be a complete Mercurial-compatible URL. Using Mercurial requires that
|
||||||
Mercurial is installed on your system. Example:
|
Mercurial is installed on your system. Example:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "hg::http://hashicorp.com/module.hg"
|
source = "hg::http://hashicorp.com/module.hg"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -191,9 +191,9 @@ one way or the other.
|
|||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "git::http://hashicorp.com/foo.git"
|
source = "git::http://hashicorp.com/foo.git"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@ description: Using modules in Vault is very similar to defining resources.
|
|||||||
|
|
||||||
Using modules in Vault is very similar to defining resources:
|
Using modules in Vault is very similar to defining resources:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
module "consul" {
|
module "consul" {
|
||||||
source = "github.com/hashicorp/consul/vault/aws"
|
source = "github.com/hashicorp/consul/vault/aws"
|
||||||
servers = 3
|
servers = 3
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -65,11 +65,11 @@ Modules can also specify their own [outputs](/docs/configuration/outputs.html).
|
|||||||
These outputs can be referenced in other places in your configuration.
|
These outputs can be referenced in other places in your configuration.
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
resource "aws_instance" "client" {
|
resource "aws_instance" "client" {
|
||||||
ami = "ami-123456"
|
ami = "ami-123456"
|
||||||
instance_type = "m1.small"
|
instance_type = "m1.small"
|
||||||
availability_zone = "${module.consul.server_availability_zone}"
|
availability_zone = "${module.consul.server_availability_zone}"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -50,9 +50,9 @@ are defined is `~/.vaultrc` for Unix-like systems and
|
|||||||
|
|
||||||
An example that configures a new provider is shown below:
|
An example that configures a new provider is shown below:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
providers {
|
providers {
|
||||||
privatecloud = "/path/to/privatecloud"
|
privatecloud = "/path/to/privatecloud"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -83,15 +83,15 @@ the road.
|
|||||||
With the directory made, create a `main.go` file. This project will
|
With the directory made, create a `main.go` file. This project will
|
||||||
be a binary so the package is "main":
|
be a binary so the package is "main":
|
||||||
|
|
||||||
```
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/vault/plugin"
|
"github.com/hashicorp/vault/plugin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
plugin.Serve(new(MyPlugin))
|
plugin.Serve(new(MyPlugin))
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -70,11 +70,11 @@ This structure implements the `ResourceProvider` interface. We
|
|||||||
recommend creating this structure in a function to make testing easier
|
recommend creating this structure in a function to make testing easier
|
||||||
later. Example:
|
later. Example:
|
||||||
|
|
||||||
```
|
```go
|
||||||
func Provider() *schema.Provider {
|
func Provider() *schema.Provider {
|
||||||
return &schema.Provider{
|
return &schema.Provider{
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -100,11 +100,11 @@ As part of the unit tests, you should call `InternalValidate`. This is used
|
|||||||
to verify the structure of the provider and all of the resources, and reports
|
to verify the structure of the provider and all of the resources, and reports
|
||||||
an error if it is invalid. An example test is shown below:
|
an error if it is invalid. An example test is shown below:
|
||||||
|
|
||||||
```
|
```go
|
||||||
func TestProvider(t *testing.T) {
|
func TestProvider(t *testing.T) {
|
||||||
if err := Provider().InternalValidate(); err != nil {
|
if err := Provider().InternalValidate(); err != nil {
|
||||||
t.Fatalf("err: %s", err)
|
t.Fatalf("err: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -118,11 +118,11 @@ These resources are put into the `ResourcesMap` field of the provider
|
|||||||
structure. Again, we recommend creating functions to instantiate these.
|
structure. Again, we recommend creating functions to instantiate these.
|
||||||
An example is shown below.
|
An example is shown below.
|
||||||
|
|
||||||
```
|
```go
|
||||||
func resourceComputeAddress() *schema.Resource {
|
func resourceComputeAddress() *schema.Resource {
|
||||||
return &schema.Resource {
|
return &schema.Resource {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -202,35 +202,35 @@ subsequent `vault apply` fixes this resource.
|
|||||||
Most of the time, partial state is not required. When it is, it must be
|
Most of the time, partial state is not required. When it is, it must be
|
||||||
specifically enabled. An example is shown below:
|
specifically enabled. An example is shown below:
|
||||||
|
|
||||||
<pre class="prettyprint">
|
```go
|
||||||
func resourceUpdate(d *schema.ResourceData, meta interface{}) error {
|
func resourceUpdate(d *schema.ResourceData, meta interface{}) error {
|
||||||
// Enable partial state mode
|
// Enable partial state mode
|
||||||
d.Partial(true)
|
d.Partial(true)
|
||||||
|
|
||||||
if d.HasChange("tags") {
|
if d.HasChange("tags") {
|
||||||
// If an error occurs, return with an error,
|
// If an error occurs, return with an error,
|
||||||
// we didn't finish updating
|
// we didn't finish updating
|
||||||
if err := updateTags(d, meta); err != nil {
|
if err := updateTags(d, meta); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
d.SetPartial("tags")
|
d.SetPartial("tags")
|
||||||
}
|
}
|
||||||
|
|
||||||
if d.HasChange("name") {
|
if d.HasChange("name") {
|
||||||
if err := updateName(d, meta); err != nil {
|
if err := updateName(d, meta); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
d.SetPartial("name")
|
d.SetPartial("name")
|
||||||
}
|
}
|
||||||
|
|
||||||
// We succeeded, disable partial mode
|
// We succeeded, disable partial mode
|
||||||
d.Partial(false)
|
d.Partial(false)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
</pre>
|
```
|
||||||
|
|
||||||
In the example above, it is possible that setting the `tags` succeeds,
|
In the example above, it is possible that setting the `tags` succeeds,
|
||||||
but setting the `name` fails. In this scenario, we want to make sure
|
but setting the `name` fails. In this scenario, we want to make sure
|
||||||
|
@ -20,15 +20,15 @@ subsequent provisioners connect as a user with more limited permissions.
|
|||||||
|
|
||||||
## Example usage
|
## Example usage
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
# Copies the file as the root user using a password
|
# Copies the file as the root user using a password
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
source = "conf/myapp.conf"
|
source = "conf/myapp.conf"
|
||||||
destination = "/etc/myapp.conf"
|
destination = "/etc/myapp.conf"
|
||||||
connection {
|
connection {
|
||||||
user = "root"
|
user = "root"
|
||||||
password = "${var.root_password}"
|
password = "${var.root_password}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -52,4 +52,3 @@ The following arguments are supported:
|
|||||||
|
|
||||||
* `timeout` - The timeout to wait for the connection to become available. This defaults
|
* `timeout` - The timeout to wait for the connection to become available. This defaults
|
||||||
to 5 minutes. Should be provided as a string like "30s" or "5m".
|
to 5 minutes. Should be provided as a string like "30s" or "5m".
|
||||||
|
|
||||||
|
@ -14,21 +14,21 @@ supports `ssh` type [connections](/docs/provisioners/connection.html).
|
|||||||
|
|
||||||
## Example usage
|
## Example usage
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
resource "aws_instance" "web" {
|
resource "aws_instance" "web" {
|
||||||
...
|
...
|
||||||
|
|
||||||
# Copies the myapp.conf file to /etc/myapp.conf
|
# Copies the myapp.conf file to /etc/myapp.conf
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
source = "conf/myapp.conf"
|
source = "conf/myapp.conf"
|
||||||
destination = "/etc/myapp.conf"
|
destination = "/etc/myapp.conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Copies the configs.d folder to /etc/configs.d
|
# Copies the configs.d folder to /etc/configs.d
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
source = "conf/configs.d"
|
source = "conf/configs.d"
|
||||||
destination = "/etc"
|
destination = "/etc"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -63,4 +63,3 @@ If the source, however, is `/foo/` (a trailing slash is present), and the destin
|
|||||||
|
|
||||||
This behavior was adopted from the standard behavior of rsync. Note that under the covers,
|
This behavior was adopted from the standard behavior of rsync. Note that under the covers,
|
||||||
rsync may or may not be used.
|
rsync may or may not be used.
|
||||||
|
|
||||||
|
@ -29,17 +29,17 @@ Policies in Vault are formatted with
|
|||||||
format that is also JSON-compatible, so you can use JSON as well. An example
|
format that is also JSON-compatible, so you can use JSON as well. An example
|
||||||
policy is shown below:
|
policy is shown below:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
path "sys" {
|
path "sys" {
|
||||||
policy = "deny"
|
policy = "deny"
|
||||||
}
|
}
|
||||||
|
|
||||||
path "secret" {
|
path "secret" {
|
||||||
policy = "write"
|
policy = "write"
|
||||||
}
|
}
|
||||||
|
|
||||||
path "secret/foo" {
|
path "secret/foo" {
|
||||||
policy = "read"
|
policy = "read"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -22,15 +22,15 @@ Vault is configured using [HCL](https://github.com/hashicorp/hcl) files.
|
|||||||
As a reminder, these files are also JSON-compatible. The configuration
|
As a reminder, these files are also JSON-compatible. The configuration
|
||||||
file for Vault is relatively simple. An example is shown below:
|
file for Vault is relatively simple. An example is shown below:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
backend "consul" {
|
backend "consul" {
|
||||||
address = "demo.consul.io:80"
|
address = "demo.consul.io:80"
|
||||||
path = "vault"
|
path = "vault"
|
||||||
}
|
}
|
||||||
|
|
||||||
listener "tcp" {
|
listener "tcp" {
|
||||||
address = "127.0.0.1:8200"
|
address = "127.0.0.1:8200"
|
||||||
tls_disable = 1
|
tls_disable = 1
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -81,21 +81,21 @@ The AWS backend requires an IAM policy to associate created credentials
|
|||||||
with. For this example, we'll write just one policy, but you can associate
|
with. For this example, we'll write just one policy, but you can associate
|
||||||
many policies with the backend. Save a file named "policy.json" with the following contents:
|
many policies with the backend. Save a file named "policy.json" with the following contents:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
{
|
{
|
||||||
"Version": "2012-10-17",
|
"Version": "2012-10-17",
|
||||||
"Statement": [
|
"Statement": [
|
||||||
{
|
{
|
||||||
"Sid": "Stmt1426528957000",
|
"Sid": "Stmt1426528957000",
|
||||||
"Effect": "Allow",
|
"Effect": "Allow",
|
||||||
"Action": [
|
"Action": [
|
||||||
"ec2:*"
|
"ec2:*"
|
||||||
],
|
],
|
||||||
"Resource": [
|
"Resource": [
|
||||||
"*"
|
"*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -119,10 +119,10 @@ special path `aws/<NAME>` where `NAME` is the policy name:
|
|||||||
|
|
||||||
```
|
```
|
||||||
$ vault read aws/deploy
|
$ vault read aws/deploy
|
||||||
Key Value
|
Key Value
|
||||||
lease_id aws/deploy/0d042c53-aa8a-7ce7-9dfd-310351c465e5
|
lease_id aws/deploy/0d042c53-aa8a-7ce7-9dfd-310351c465e5
|
||||||
access_key AKIAJFN42DVCQWDHQYHQ
|
access_key AKIAJFN42DVCQWDHQYHQ
|
||||||
secret_key lkWB2CfULm9P+AqLtylnu988iPJ3vk7R2nIpY4dz
|
secret_key lkWB2CfULm9P+AqLtylnu988iPJ3vk7R2nIpY4dz
|
||||||
```
|
```
|
||||||
|
|
||||||
Success! The access and secret key can now be used to perform any EC2
|
Success! The access and secret key can now be used to perform any EC2
|
||||||
|
@ -57,9 +57,9 @@ As you might expect, secrets can be read with `vault read`:
|
|||||||
|
|
||||||
```
|
```
|
||||||
$ vault read secret/hello
|
$ vault read secret/hello
|
||||||
Key Value
|
Key Value
|
||||||
excited yes
|
excited yes
|
||||||
value world
|
value world
|
||||||
```
|
```
|
||||||
|
|
||||||
As you can see, the values we wrote are given back to us. Vault read
|
As you can see, the values we wrote are given back to us. Vault read
|
||||||
@ -73,12 +73,12 @@ a tool like `jq`, you can output the data in JSON format:
|
|||||||
```
|
```
|
||||||
$ vault read -format=json secret/hello
|
$ vault read -format=json secret/hello
|
||||||
{
|
{
|
||||||
"renewable": false,
|
"renewable": false,
|
||||||
"lease_duration": 2592000,
|
"lease_duration": 2592000,
|
||||||
"data": {
|
"data": {
|
||||||
"excited": "yes",
|
"excited": "yes",
|
||||||
"value": "world"
|
"value": "world"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user