* Adds cli options to enable audit log and configure the audit log
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Updated code to validate the audit log options. Audit log options are only valid for inspec exec and inspec shell command as those commands use the backend to execute commands and for file operations
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Updates cli options documentation for audit log options
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Disable audit log in test environment unless and until explicitly --enable-audit-log option is provided in test
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Rename enable-audit-log cli option to disable-audit-log
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* CHEF-8210 Enables feature preview flag for audit logging
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Revert "Disable audit log in test environment unless and until explicitly --enable-audit-log option is provided in test"
This reverts commit 50a42f0b44cf2fde6d927a00e444370cdd288a5d.
* Adds functional test for audit logging feature
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Updates cli doc for audit loggin feature flag
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Debug why audit log functional test fails in ci environment
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Revert "Rename enable-audit-log cli option to disable-audit-log"
This reverts commit d5169ec705.
* Revert "Debug why audit log functional test fails in ci environment"
This reverts commit 6f43898ad0.
* Removes the --enable-audit-log option from cli as feature flag will handle the enabling and disabling of audit log feature. And introduces few code changes after reverting renaming of --enable-audit-log option
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Updates the functional test for audit log
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* REVERT THIS ONCE THE TEST IS GREEN: This is just to test implementation of audit log against the train changes made for audit log
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Removes the right one
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Documentation for inspec audit logging feature
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Renames inspec audit log file
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Edits to audit log docs
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Remove --audit-log-rotation and --audit-log-size option to set from CLI
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Make sure we delete audit log file before running each test
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Appends timestamp and process id to generate audit log file per invocation/execution
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Updates functional test for audit logging feature
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Fix typo in audit logging docs
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Appends the timestamp and process id to user provided audit log file so that unique audit log file created per invocation
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Updates the audit log functional test
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Minor code improvements
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Adds exception class for invalid audit log options
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Revert "REVERT THIS ONCE THE TEST IS GREEN: This is just to test implementation of audit log against the train changes made for audit log"
This reverts commit a66137e70b.
* Upgrade train-core version pinning
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Docs review
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
* Fix titles
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
* Update the signature for features.yaml file
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
---------
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
Co-authored-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Co-authored-by: Ian Maddaus <ian.maddaus@progress.com>
* Add a pair of files describing the relationship between the Chef EULA and the Apache 2.0 license, intended to be referenced from rubygems.org
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Add message to rubygems.org description of all 4 gems describing relationship between the two licenses
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Insert the full text of the Apache 2.0 license into the gem description on the advice of Legal
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Update README with message clarifying relationship between the two licenses
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Removes the full text of the Apache 2 license, which after clarification is not
in fact required to be in the rubygems description.
This reverts commit 4d02573f59.
* LINTING - adjust text markers
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* LINTING - training whitespace
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Remove the word 'below' when refering to the inclusion of the Apache 2.0 license
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Add Chef-EULA to list of included files to inspec-core
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
---------
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
faraday_middleware was already DEPRECATED in 2022-01.
Only FaradayMiddleware::FollowRedirects from faraday_middleware has been
used, and so we can replace it with faraday-follow_redirects.
faraday-follow_redirects 0.3.0 requires faraday ~> 1.0, which is as same
as "faraday_middleware 1.0.0 or higher.
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
rspec 3.10 is causing issues with chef/chef tests due to changes in
rspec-mock that we're working to resolve. Right now we'd like to get the
latest inspec releases into chef/chef w/o the need for rspec 3.10. At
runtime inspec doesn't need 3.10, but it does need it for tests, so
let's make sure we bring it in via the gemfile, but allow the older 3.9
release at runtime.
Signed-off-by: Tim Smith <tsmith@chef.io>
The currently ruby requirement is going to break things when we pull
Ruby 3 into Chef Infra Client next year.
Signed-off-by: Tim Smith <tsmith@chef.io>
It looks like we're only using this in 3 test files and it conflicts
with new RuboCop releases, which is blocking us shipping that new
release in Chef Infra Client and Workstation
Signed-off-by: Tim Smith <tsmith@chef.io>
Fixes#5296
rspec 3.10.0 introduces text changes to test outputs. Let's keep it pinned - we don't need to keep rspec current.
Signed-off-by: James Stocks <jstocks@chef.io>
There are several outstanding issues about bumping faraday and
faraday_middleware. This gives us access to additional HTTP methods and
the versions we are pinned to are quite old.
Fixes#4234
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
We're just deleting this from chef and workstation anyways. It's buried deep in the install directory and doesn't do anyone any good.
Signed-off-by: Tim Smith <tsmith@chef.io>
The `method_source` dependency for inspec-core has not been bumped in
five years, and it is indirectly holding `pry` back elsewhere in the
ecosystem which is causing issues for ruby 2.7+ support.
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>