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

Allow to set SecAuditLog #1490

Merged
merged 1 commit into from
Aug 18, 2016
Merged

Allow to set SecAuditLog #1490

merged 1 commit into from
Aug 18, 2016

Conversation

sathieu
Copy link
Contributor

@sathieu sathieu commented Jun 21, 2016

No description provided.

@@ -397,6 +405,21 @@
}
}

if $modsec_audit_log_file {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sathieu This logic is confusing. You should always check the "manage" boolean first and determine path variables after. Something like:

if $mod_audit_log {
  if $modsec_audit_log_file {
    $modsec_audit_log_destination = "${logroot}/${modsec_audit_log_file}"
  } else if $modsec_audit_log_pipe { 
    $modsec_audit_log_destination = $modsec_audit_log_pipe
  } else {
    if $ssl {
       $modsec_audit_log_destination = "${logroot}/${name}_security_ssl.log"
     } else {
       $modsec_audit_log_destination = "${logroot}/${name}_security.log"
     }
} else {
    $modsec_audit_log_destination = undef
}

This way you only set variables/paths if $modsec_audit_log is set to true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intention was that you only need to set one attribute to enable logging.

I've changed the code a bit to improve this.

@bmjen bmjen merged commit 46753a6 into puppetlabs:master Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants