mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-21 22:51: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
|
||||
example.hcl
|
||||
example.vault.d
|
||||
|
||||
# Ruby
|
||||
website/vendor/ruby
|
||||
website/.bundle
|
||||
|
@ -1,3 +1,3 @@
|
||||
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
|
||||
remote: https://github.com/hashicorp/middleman-hashicorp
|
||||
revision: 0e21734c64afcf0c6d35b40b26840254227c1949
|
||||
remote: git://github.com/hashicorp/middleman-hashicorp.git
|
||||
revision: 5d1edbfa4ceec20b33b501f0162e2f881afadfa9
|
||||
specs:
|
||||
middleman-hashicorp (0.1.0)
|
||||
bootstrap-sass (~> 3.3)
|
||||
@ -26,7 +26,7 @@ GEM
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.1)
|
||||
tzinfo (~> 1.1)
|
||||
autoprefixer-rails (5.1.8.1)
|
||||
autoprefixer-rails (5.1.11)
|
||||
execjs
|
||||
json
|
||||
bootstrap-sass (3.3.4.1)
|
||||
@ -39,7 +39,7 @@ GEM
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.9.1)
|
||||
coffee-script-source (1.9.1.1)
|
||||
commonjs (0.2.7)
|
||||
compass (1.0.3)
|
||||
chunky_png (~> 1.2)
|
||||
@ -117,7 +117,7 @@ GEM
|
||||
middleman-syntax (2.0.0)
|
||||
middleman-core (~> 3.2)
|
||||
rouge (~> 1.0)
|
||||
minitest (5.5.1)
|
||||
minitest (5.6.0)
|
||||
multi_json (1.11.0)
|
||||
padrino-helpers (0.12.5)
|
||||
i18n (~> 0.6, >= 0.6.7)
|
||||
|
@ -17,7 +17,7 @@ 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
|
||||
of a policy is shown below:
|
||||
|
||||
```
|
||||
```javascript
|
||||
path "sys" {
|
||||
policy = "deny"
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ 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.
|
||||
An example configuration is shown below:
|
||||
|
||||
```
|
||||
```javascript
|
||||
backend "consul" {
|
||||
address = "demo.consul.io:80"
|
||||
path = "vault"
|
||||
|
@ -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
|
||||
will be returned with the following structure:
|
||||
|
||||
{
|
||||
```javascript
|
||||
{
|
||||
"help": "help text"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Error Response
|
||||
|
||||
A common JSON structure is always returned to return errors:
|
||||
|
||||
{
|
||||
```javascript
|
||||
{
|
||||
"errors": [
|
||||
"message",
|
||||
"another message"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This structure will be sent down for any HTTP status greater than
|
||||
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.
|
||||
- `503` - Vault is down for maintenance or is currently sealed.
|
||||
Try again later.
|
||||
|
||||
|
||||
|
@ -27,8 +27,8 @@ description: |-
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```
|
||||
{
|
||||
```javascript
|
||||
{
|
||||
"file": {
|
||||
"type: "file",
|
||||
"description: "Store logs in a file",
|
||||
@ -36,8 +36,9 @@ description: |-
|
||||
"path": "/var/log/file"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
@ -27,14 +27,15 @@ description: |-
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```
|
||||
{
|
||||
```javascript
|
||||
{
|
||||
"github": {
|
||||
"type": "github",
|
||||
"description": "GitHub auth"
|
||||
}
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
@ -20,18 +20,17 @@ description: |-
|
||||
<dd>GET</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
None
|
||||
</dd>
|
||||
<dd>None</dd>
|
||||
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```
|
||||
{
|
||||
"initialized": false
|
||||
}
|
||||
```
|
||||
```javascript
|
||||
{
|
||||
"initialize": true
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
@ -68,11 +67,12 @@ description: |-
|
||||
<dd>
|
||||
A JSON-encoded object including the master keys and initial root token:
|
||||
|
||||
```
|
||||
{
|
||||
```javascript
|
||||
{
|
||||
"keys": ["one", "two", "three"],
|
||||
"root_token": "foo"
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -25,12 +25,13 @@ description: |-
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```
|
||||
{
|
||||
```javascript
|
||||
{
|
||||
"ha_enabled": true,
|
||||
"is_self": false,
|
||||
"leader_address": "https://127.0.0.1:8200/"
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -27,8 +27,8 @@ description: |-
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```
|
||||
{
|
||||
```javascript
|
||||
{
|
||||
"aws": {
|
||||
"type": "aws",
|
||||
"description": "AWS keys"
|
||||
@ -38,8 +38,9 @@ description: |-
|
||||
"type": "system",
|
||||
"description": "system endpoint"
|
||||
}
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
@ -27,11 +27,12 @@ description: |-
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```
|
||||
{
|
||||
```javascript
|
||||
{
|
||||
"policies": ["root", "deploy"]
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
@ -31,11 +31,12 @@ description: |-
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```
|
||||
{
|
||||
```javascript
|
||||
{
|
||||
"value": "{'foo':'bar'}"
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
@ -23,15 +23,17 @@ description: |-
|
||||
</dd>
|
||||
|
||||
<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,
|
||||
"t": 3,
|
||||
"n": 5,
|
||||
"progress": 2
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
</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.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
|
@ -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.
|
||||
Once unsealed, each security deposit boxes still requires the owner provide a key, and similarly
|
||||
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.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
|
||||
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.
|
||||
|
||||
|
@ -28,7 +28,7 @@ Within a folder containing Vault configurations, create a subfolder
|
||||
the root folder containing the "child" folder, add this to one of the
|
||||
Vault files:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "child" {
|
||||
source = "./child"
|
||||
}
|
||||
@ -54,7 +54,7 @@ variables or outputs.
|
||||
|
||||
In the "child" module we created above, add the following:
|
||||
|
||||
```
|
||||
```javascript
|
||||
variable "memory" {}
|
||||
|
||||
output "received" {
|
||||
@ -67,7 +67,7 @@ that will simply be the value of the memory variable.
|
||||
|
||||
You can then configure the module and use the output like so:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "child" {
|
||||
source = "./child"
|
||||
|
||||
@ -98,7 +98,7 @@ the [path interpolated variables](/docs/configuration/interpolation.html).
|
||||
|
||||
An example is shown below:
|
||||
|
||||
```
|
||||
```javascript
|
||||
resource "aws_instance" "server" {
|
||||
...
|
||||
|
||||
|
@ -40,7 +40,7 @@ for example.
|
||||
|
||||
An example is shown below:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "./consul"
|
||||
}
|
||||
@ -56,7 +56,7 @@ automatically instantly available.
|
||||
Vault will automatically recognize GitHub URLs and turn them into
|
||||
the proper Git repository. The syntax is simple:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "github.com/hashicorp/example"
|
||||
}
|
||||
@ -64,7 +64,7 @@ module "consul" {
|
||||
|
||||
Subdirectories within the repository can also be referenced:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "github.com/hashicorp/example//subdir"
|
||||
}
|
||||
@ -86,7 +86,7 @@ Git repositories for more information.
|
||||
Vault will automatically recognize BitBucket URLs and turn them into
|
||||
the proper Git or Mercurial repository. An example:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "bitbucket.org/hashicorp/example"
|
||||
}
|
||||
@ -94,7 +94,7 @@ module "consul" {
|
||||
|
||||
Subdirectories within the repository can also be referenced:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "bitbucket.org/hashicorp/example//subdir"
|
||||
}
|
||||
@ -113,7 +113,7 @@ Generic Git repositories are also supported. The value of `source` in this
|
||||
case should be a complete Git-compatible URL. Using Git requires that
|
||||
Git is installed on your system. Example:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "git://hashicorp.com/module.git"
|
||||
}
|
||||
@ -123,7 +123,7 @@ 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
|
||||
Git:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "git::https://hashicorp.com/module.git"
|
||||
}
|
||||
@ -136,7 +136,7 @@ parameters:
|
||||
|
||||
An example of using these parameters is shown below:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "git::https://hashicorp.com/module.git?ref=master"
|
||||
}
|
||||
@ -148,7 +148,7 @@ Generic Mercurial repositories are supported. The value of `source` in this
|
||||
case should be a complete Mercurial-compatible URL. Using Mercurial requires that
|
||||
Mercurial is installed on your system. Example:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "hg::http://hashicorp.com/module.hg"
|
||||
}
|
||||
@ -191,7 +191,7 @@ one way or the other.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "git::http://hashicorp.com/foo.git"
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ description: Using modules in Vault is very similar to defining resources.
|
||||
|
||||
Using modules in Vault is very similar to defining resources:
|
||||
|
||||
```
|
||||
```javascript
|
||||
module "consul" {
|
||||
source = "github.com/hashicorp/consul/vault/aws"
|
||||
servers = 3
|
||||
@ -65,7 +65,7 @@ Modules can also specify their own [outputs](/docs/configuration/outputs.html).
|
||||
These outputs can be referenced in other places in your configuration.
|
||||
For example:
|
||||
|
||||
```
|
||||
```javascript
|
||||
resource "aws_instance" "client" {
|
||||
ami = "ami-123456"
|
||||
instance_type = "m1.small"
|
||||
|
@ -50,7 +50,7 @@ are defined is `~/.vaultrc` for Unix-like systems and
|
||||
|
||||
An example that configures a new provider is shown below:
|
||||
|
||||
```
|
||||
```javascript
|
||||
providers {
|
||||
privatecloud = "/path/to/privatecloud"
|
||||
}
|
||||
@ -83,7 +83,7 @@ the road.
|
||||
With the directory made, create a `main.go` file. This project will
|
||||
be a binary so the package is "main":
|
||||
|
||||
```
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -70,7 +70,7 @@ This structure implements the `ResourceProvider` interface. We
|
||||
recommend creating this structure in a function to make testing easier
|
||||
later. Example:
|
||||
|
||||
```
|
||||
```go
|
||||
func Provider() *schema.Provider {
|
||||
return &schema.Provider{
|
||||
...
|
||||
@ -100,7 +100,7 @@ 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
|
||||
an error if it is invalid. An example test is shown below:
|
||||
|
||||
```
|
||||
```go
|
||||
func TestProvider(t *testing.T) {
|
||||
if err := Provider().InternalValidate(); err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
@ -118,7 +118,7 @@ These resources are put into the `ResourcesMap` field of the provider
|
||||
structure. Again, we recommend creating functions to instantiate these.
|
||||
An example is shown below.
|
||||
|
||||
```
|
||||
```go
|
||||
func resourceComputeAddress() *schema.Resource {
|
||||
return &schema.Resource {
|
||||
...
|
||||
@ -202,7 +202,7 @@ subsequent `vault apply` fixes this resource.
|
||||
Most of the time, partial state is not required. When it is, it must be
|
||||
specifically enabled. An example is shown below:
|
||||
|
||||
<pre class="prettyprint">
|
||||
```go
|
||||
func resourceUpdate(d *schema.ResourceData, meta interface{}) error {
|
||||
// Enable partial state mode
|
||||
d.Partial(true)
|
||||
@ -230,7 +230,7 @@ func resourceUpdate(d *schema.ResourceData, meta interface{}) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
</pre>
|
||||
```
|
||||
|
||||
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
|
||||
|
@ -20,7 +20,7 @@ subsequent provisioners connect as a user with more limited permissions.
|
||||
|
||||
## Example usage
|
||||
|
||||
```
|
||||
```javascript
|
||||
# Copies the file as the root user using a password
|
||||
provisioner "file" {
|
||||
source = "conf/myapp.conf"
|
||||
@ -52,4 +52,3 @@ The following arguments are supported:
|
||||
|
||||
* `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".
|
||||
|
||||
|
@ -14,7 +14,7 @@ supports `ssh` type [connections](/docs/provisioners/connection.html).
|
||||
|
||||
## Example usage
|
||||
|
||||
```
|
||||
```javascript
|
||||
resource "aws_instance" "web" {
|
||||
...
|
||||
|
||||
@ -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,
|
||||
rsync may or may not be used.
|
||||
|
||||
|
@ -29,7 +29,7 @@ Policies in Vault are formatted with
|
||||
format that is also JSON-compatible, so you can use JSON as well. An example
|
||||
policy is shown below:
|
||||
|
||||
```
|
||||
```javascript
|
||||
path "sys" {
|
||||
policy = "deny"
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ Vault is configured using [HCL](https://github.com/hashicorp/hcl) files.
|
||||
As a reminder, these files are also JSON-compatible. The configuration
|
||||
file for Vault is relatively simple. An example is shown below:
|
||||
|
||||
```
|
||||
```javascript
|
||||
backend "consul" {
|
||||
address = "demo.consul.io:80"
|
||||
path = "vault"
|
||||
|
@ -81,7 +81,7 @@ 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
|
||||
many policies with the backend. Save a file named "policy.json" with the following contents:
|
||||
|
||||
```
|
||||
```javascript
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
|
Loading…
x
Reference in New Issue
Block a user