Getting started with Vault

Vault provides a command line interface, which may be used for adding new values to the server and reading them from the server. Examples of calling those commands are shown here. However, we have run Vault as a Docker container, so the most convenient way to manage the secrets is through the HTTP API:

$ vault write secret/hello value=world$ vault read secret/hello

The HTTP API is available for our instance of Vault under the http://192.168.99.100:8200/v1/secret address. When calling every method of that API, you need to pass a token as the request header X-Vault-Token. Because we set that value in the VAULT_DEV_ROOT_TOKEN_ID environment parameter while launching a Docker container, it is equal to client. Otherwise, ...

Get Mastering Spring Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.