Using the Vault RESTful API

Remember that we are running a dev Vault server instance and so we can run curl as a REST client to the Vault API on our local machine. Let's us run the following curl command to check whether our Vault instance has been initialized, which it should be at this point:

curl http://127.0.0.1:8200/v1/sys/init

We need to create a file called config.hcl in order to bypass TLS defaults for Vault with the following content:

backend "file" { path = "vault"}listener "tcp" { tls_disable = 1}

We will need to unseal the Vault and log in, as the following screenshot shows:

Notice here that we get a token, which is what we will ...

Get Hands-On Continuous Integration and Delivery 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.