Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create windows_audit_policy resource #9980

Merged
merged 24 commits into from Jun 15, 2020
Merged

Create windows_audit_policy resource #9980

merged 24 commits into from Jun 15, 2020

Conversation

chef-davin
Copy link
Contributor

@chef-davin chef-davin commented Jun 10, 2020

Description

This adds a new native resource for managing Windows Advanced Audit Policy configurations. A user can specify a subcategory of the advanced audit policy to edit either as a string or an array and can set the auditing to Success and/or Failure. It also takes user arguments to apply policies to specific users. There are options for the four Advanced Audit Policy options managed via auditpol as well. It is idempotent in my testing as well.

Some usage examples are below:
Set Logon and Logoff policy to "Success and Failure":

windows_audit_policy "Set Audit Policy for 'Logon and Logoff' actions to 'Success and Failure' do
  sub_category   %w(Logon Logoff)
  success        true
  failure        true
  action         :set
end

Set Credential Validation policy to "Success":

windows_audit_policy "Set Audit Policy for 'Credential Validation' actions to 'Success' do
  sub_category   'Credential Validation'
  success        true
  failure        false
  action         :set
end

Enable CrashOnAuditFail option:

windows_audit_policy "Enable CrashOnAuditFail option' do
  crash_on_audit_fail        true
  action                     :set
end

Related Issue

#8299

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
@chef-davin chef-davin requested review from a team as code owners June 10, 2020 19:43
@chef-davin chef-davin mentioned this pull request Jun 10, 2020
2 tasks
Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
… client run.

Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
cspell.json Outdated Show resolved Hide resolved
@chef-davin
Copy link
Contributor Author

@phiggins I appreciate all the comments. I'm slammed at the moment but will try to push some updates this weekend to incorporate your suggestions.

Signed-off-by: Davin Taddeo <davin@chef.io>
… as I can't change the name of the windows command.

Signed-off-by: Davin Taddeo <davin@chef.io>
…work, I guess I'll ask for help or something ;)

Signed-off-by: Davin Taddeo <davin@chef.io>
use provides instead of resource_name

Co-authored-by: Tim Smith <tsmith@chef.io>
…_AUDIT_SUBCATEGORIES constant

Signed-off-by: Davin Taddeo <davin@chef.io>
… guidance with @tas50

Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
Signed-off-by: Davin Taddeo <davin@chef.io>
@tas50 tas50 merged commit d34b10e into chef:master Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants