• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.circleci/H25-Jul-2019-

.github/H25-Jul-2019-

.hooks/H25-Jul-2019-

api/H25-Jul-2019-

audit/H25-Jul-2019-

builtin/H25-Jul-2019-

command/H25-Jul-2019-

helper/H25-Jul-2019-

http/H25-Jul-2019-

physical/H25-Jul-2019-

plugins/database/H25-Jul-2019-

scripts/H25-Jul-2019-

sdk/H25-Jul-2019-

shamir/H25-Jul-2019-

terraform/aws/H25-Jul-2019-

ui/H03-May-2022-

vault/H25-Jul-2019-

vendor/H03-May-2022-

website/H25-Jul-2019-

.gitattributesH A D25-Jul-201960

.gitignoreH A D25-Jul-20191.3 KiB

CHANGELOG.mdH A D25-Jul-2019221.2 KiB

CONTRIBUTING.mdH A D25-Jul-20193 KiB

LICENSEH A D25-Jul-201915.5 KiB

MakefileH A D25-Jul-20199.5 KiB

README.mdH A D25-Jul-20196.6 KiB

go.modH A D25-Jul-20196.8 KiB

go.sumH A D25-Jul-201972.3 KiB

main.goH A D25-Jul-2019161

main_test.goH A D25-Jul-2019153

make.batH A D25-Jul-20193.1 KiB

README.md

1# Vault [![CircleCI](https://circleci.com/gh/hashicorp/vault.svg?style=svg)](https://circleci.com/gh/hashicorp/vault) [![Join the chat at https://gitter.im/hashicorp-vault/Lobby](https://badges.gitter.im/hashicorp-vault/Lobby.svg)](https://gitter.im/hashicorp-vault/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![vault enterprise](https://img.shields.io/badge/vault-enterprise-yellow.svg?colorB=7c8797&colorA=000000)](https://www.hashicorp.com/products/vault/?utm_source=github&utm_medium=banner&utm_campaign=github-vault-enterprise)
2
3----
4
5**Please note**: We take Vault's security and our users' trust very seriously. If you believe you have found a security issue in Vault, _please responsibly disclose_ by contacting us at [security@hashicorp.com](mailto:security@hashicorp.com).
6
7----
8
9-	Website: https://www.vaultproject.io
10-	IRC: `#vault-tool` on Freenode
11-	Announcement list: [Google Groups](https://groups.google.com/group/hashicorp-announce)
12-	Discussion list: [Google Groups](https://groups.google.com/group/vault-tool)
13
14<img width="300" alt="Vault Logo" src="https://github.com/hashicorp/vault/blob/f22d202cde2018f9455dec755118a9b84586e082/Vault_PrimaryLogo_Black.png">
15
16Vault is a tool for securely accessing secrets. A secret is anything that you want to tightly control access to, such as API keys, passwords, certificates, and more. Vault provides a unified interface to any secret, while providing tight access control and recording a detailed audit log.
17
18A modern system requires access to a multitude of secrets: database credentials, API keys for external services, credentials for service-oriented architecture communication, etc. Understanding who is accessing what secrets is already very difficult and platform-specific. Adding on key rolling, secure storage, and detailed audit logs is almost impossible without a custom solution. This is where Vault steps in.
19
20The key features of Vault are:
21
22* **Secure Secret Storage**: Arbitrary key/value secrets can be stored
23  in Vault. Vault encrypts these secrets prior to writing them to persistent
24  storage, so gaining access to the raw storage isn't enough to access
25  your secrets. Vault can write to disk, [Consul](https://www.consul.io),
26  and more.
27
28* **Dynamic Secrets**: Vault can generate secrets on-demand for some
29  systems, such as AWS or SQL databases. For example, when an application
30  needs to access an S3 bucket, it asks Vault for credentials, and Vault
31  will generate an AWS keypair with valid permissions on demand. After
32  creating these dynamic secrets, Vault will also automatically revoke them
33  after the lease is up.
34
35* **Data Encryption**: Vault can encrypt and decrypt data without storing
36  it. This allows security teams to define encryption parameters and
37  developers to store encrypted data in a location such as SQL without
38  having to design their own encryption methods.
39
40* **Leasing and Renewal**: All secrets in Vault have a _lease_ associated
41  with it. At the end of the lease, Vault will automatically revoke that
42  secret. Clients are able to renew leases via built-in renew APIs.
43
44* **Revocation**: Vault has built-in support for secret revocation. Vault
45  can revoke not only single secrets, but a tree of secrets, for example
46  all secrets read by a specific user, or all secrets of a particular type.
47  Revocation assists in key rolling as well as locking down systems in the
48  case of an intrusion.
49
50For more information, see the [getting started guide](https://learn.hashicorp.com/vault/)
51on Hashicorp's learning platform.
52
53Getting Started & Documentation
54-------------------------------
55
56All documentation is available on the [Vault website](https://www.vaultproject.io).
57
58Developing Vault
59--------------------
60
61If you wish to work on Vault itself or any of its built-in systems, you'll
62first need [Go](https://www.golang.org) installed on your machine (version
631.12.1+ is *required*).
64
65For local dev first make sure Go is properly installed, including setting up a
66[GOPATH](https://golang.org/doc/code.html#GOPATH). Ensure that `$GOPATH/bin` is in
67your path as some distributions bundle old version of build tools. Next, clone this
68repository. Vault uses [Go Modules](https://github.com/golang/go/wiki/Modules),
69so it is recommended that you clone the repository ***outside*** of the GOPATH.
70You can then download any required build tools by bootstrapping your environment:
71
72```sh
73$ make bootstrap
74...
75```
76
77To compile a development version of Vault, run `make` or `make dev`. This will
78put the Vault binary in the `bin` and `$GOPATH/bin` folders:
79
80```sh
81$ make dev
82...
83$ bin/vault
84...
85```
86
87To compile a development version of Vault with the UI, run `make static-dist dev-ui`. This will
88put the Vault binary in the `bin` and `$GOPATH/bin` folders:
89
90```sh
91$ make static-dist dev-ui
92...
93$ bin/vault
94...
95```
96
97To run tests, type `make test`. Note: this requires Docker to be installed. If
98this exits with exit status 0, then everything is working!
99
100```sh
101$ make test
102...
103```
104
105If you're developing a specific package, you can run tests for just that
106package by specifying the `TEST` variable. For example below, only
107`vault` package tests will be run.
108
109```sh
110$ make test TEST=./vault
111...
112```
113
114### Acceptance Tests
115
116Vault has comprehensive [acceptance tests](https://en.wikipedia.org/wiki/Acceptance_testing)
117covering most of the features of the secret and auth methods.
118
119If you're working on a feature of a secret or auth method and want to
120verify it is functioning (and also hasn't broken anything else), we recommend
121running the acceptance tests.
122
123**Warning:** The acceptance tests create/destroy/modify *real resources*, which
124may incur real costs in some cases. In the presence of a bug, it is technically
125possible that broken backends could leave dangling data behind. Therefore,
126please run the acceptance tests at your own risk. At the very least,
127we recommend running them in their own private account for whatever backend
128you're testing.
129
130To run the acceptance tests, invoke `make testacc`:
131
132```sh
133$ make testacc TEST=./builtin/logical/consul
134...
135```
136
137The `TEST` variable is required, and you should specify the folder where the
138backend is. The `TESTARGS` variable is recommended to filter down to a specific
139resource to test, since testing all of them at once can sometimes take a very
140long time.
141
142Acceptance tests typically require other environment variables to be set for
143things such as access keys. The test itself should error early and tell
144you what to set, so it is not documented here.
145
146For more information on Vault Enterprise features, visit the [Vault Enterprise site](https://www.hashicorp.com/products/vault/?utm_source=github&utm_medium=referral&utm_campaign=github-vault-enterprise).
147