- Lab
- A Cloud Guru
Implement a Logging Solution for HashiCorp Vault
As part of this hands-on lab, you will be required to configure HashiCorp logging, and set up log file syncing with a remote server.
Path Info
Table of Contents
-
Challenge
Enable HashiCorp Vault Logs
- In the Vault Server, retrieve the vault keys.
- Unseal the vaults.
- Log in with the
Initial Root Token
. - Enable logs.
- Access the logs.
-
Challenge
Enable Key-Based SSH Authentication to a Backup Server
- In the Vault Server, generate a new key.
- Copy the new
ssh-rsa
key. - In the Client Server, add the key to the
authorized_keys
file. - Save the file.
- Open the
sshd_config
file. - Enable key-based authentication by uncommenting the
PubKeyAuthentication Yes
line. - Save the file.
- Apply the changes.
-
Challenge
Use Rsync to Create Log Backups on the Vault Server
- In the
Vault Server
, make a new directory. - Create a test file in the directory.
- Populate the file with generic data.
- Using
rsync
, sync thetest
file between the two servers. - In the
Vault Server
, configure a trigger for file sync. - Add the
cloud_user
to theincron.allow
file. - Save the file.
- Create a directory on the
Client
server to hold the logs. - In the
Vault Server
, update the log permissions. - In the
Vault Server
, create a new job. - In the new file, paste the following.
- In the
Vault Server
, enable akv
secrets engine. - In the
Client
server, run the command to test the setup.
Note: You can find the Vault Server domain by running
cat Domain
.- Generate a GET request and check if the logs have been synced.
- In the
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.