Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Raise exception if no token is set when using the chef-automate fetcher #249
The chef-automate fetcher uses the data_collector token settings but does not check to ensure it's set before passing it to InSpec for Fetcher purposes. This causes InSpec to create a data-collector-token header with a nil value, and then Net::HTTP will toss an ugly error when trying to call
InSpec should validate inputs too, but this will help catch this issue in the audit cookbook and provide a better error message. This was found in the Chef sales demo environments.