In this hands-on lab, we will be required to create a token along with a policy allowing us to create and work with secrets at specific paths. We achieve this by making various requests to the API endpoints.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Log in with Root Token and Unseal Vault
To make sure the lab is fully provisioned, please give the lab an extra 3-4 minutes before starting the lab activity.
- Unseal vault.
- Log in with root token.
- Enable kv Secrets Engine on Multiple Arbitrary Paths
- Enable
kv
secrets engine atsecrets-kv-X
path. - Enable
kv
secrets engine atsecrets-kv-Y
path. - Enable
kv
secrets engine atsecrets-kv-Z
path.
- Enable
- Create a Policy for All the Previously Created Paths: CREATE, READ, DELETE
- Create a policy file.
- Populate a policy file.
- Write a policy.
- Create a Token with the Previously Created Policy and Test Out the API Calls with curl
- Create token and assign the newly created policy.
- Create secrets.
- Get a secret.
- Delete a secret.
- Try to get a deleted secret.