- Lab
- A Cloud Guru
Implement HashiCorp Vault API Authentication
The goal of this lab is to configure a HashiCorp vault in such a way that will provide authentication for a web application API. This can be achieved by creating a KV - Secrets Engine whose contents will be compared with what the user sends in the authentication header. If there is a positive match, the API GET request is authenticated by the secrets engine; if there is no positive match, then the request is classified as unauthorized.
Path Info
Table of Contents
-
Challenge
Unseal the Vault and Log in with the Root Token
- Unseal the vaults.
- Log in with the root token.
-
Challenge
Enable a `kv` Store and Limit its Access
- Enable a
kv
store. - Create a kv secret.
- Create a policy for an access token.
- Create an access token.
- Test the token out.
- Enable a
-
Challenge
Clone github repo, modify app code and then run the app on the web server
- Clone the GitHub repository.
- Install pip for python3.
- Install django framework.
- Add the
Web Server
host to the list of allowed hosts.
-
Challenge
Test out the API call
- Run the Django app.
- Make a test call from the
Client Server
.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.