Chef Compliance Waivers

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

This hands-on lab will test your ability to create an InSpec test and your ability to create a waiver file to exclude a specific control from testing. You will need to show a test failure, then mitigate that test using your waiver file.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Log In to the Provided Server
  1. Log in to the server as cloud_user with the provided password . The server has Chef Workstation installed.

NOTE: Server setup may take several minutes after the lab has started. Once server configuration has been completed, a file named SERVER-READY is generated.

Create and Edit a Chef InSpec Test Profile Named folder-check
  1. Using the appropriate command, create an InSpec test profile named folder-check.
  2. Accept necessary licenses.
  3. Move to the test profile.
  4. Find the appropriate InSpec test file and edit it to test if the /tmp2 folder exists.
  5. Run the InSpec test you just created. It should produce an error.
Create a Waiver File to Exclude /tmp2 from Testing
  1. Create a waiver file to exclude the test for /tmp2.
  2. Run the test again and the error should no longer exist, since the failing control has been excluded.

Additional Resources

InSpec allows you to exclude controls from being tested. You have been tasked with several actions to ensure this is possible.

  1. Create a test profile to test a condition if the /tmp2 folder exists. (NOTE: The /tmp2 folder does not exist and should not be created.)
  2. Run the test profile to confirm an alert indicates the folder does not exist.
  3. Create a waiver file to exclude the test control from running.
  4. Run the test profile again with the waiver file and ensure that it shows the control is being skipped.

    Note: You will be provided an environment with Chef Workstation and InSpec installed.

What are Hands-on Labs

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.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?