Skip to content

Commit

Permalink
✨ Allow to set the verbosity of the debug
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Godin <[email protected]>
  • Loading branch information
JGodin-C2C committed Jan 31, 2024
1 parent 9f159df commit 63389b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions manifests/mod/security.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
# @param modsec_secruleengine
# Configures the rules engine.
#
# @param debug_log_level
# Configures the debug log level.
#
# @param audit_log_relevant_status
# Configures which response status code is to be considered relevant for the purpose of audit logging.
#
Expand Down Expand Up @@ -140,6 +143,7 @@
Optional[Array[String]] $custom_rules_set = $apache::params::modsec_custom_rules_set,
Stdlib::Absolutepath $modsec_dir = $apache::params::modsec_dir,
String $modsec_secruleengine = $apache::params::modsec_secruleengine,
String $debug_log_level = '0',
String $audit_log_relevant_status = '^(?:5|4(?!04))',
String $audit_log_parts = $apache::params::modsec_audit_log_parts,
String $audit_log_type = $apache::params::modsec_audit_log_type,
Expand Down Expand Up @@ -258,6 +262,7 @@
'audit_log_type' => $audit_log_type,
'audit_log_storage_dir' => $audit_log_storage_dir,
'logroot' => $logroot,
'debug_log_level' => $debug_log_level,
}

file { 'security.conf':
Expand Down
2 changes: 1 addition & 1 deletion templates/mod/security.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
SecResponseBodyMimeType text/plain text/html text/xml
SecResponseBodyLimit 524288
SecResponseBodyLimitAction <%= $secresponsebodylimitaction %>
SecDebugLogLevel 0
SecDebugLogLevel <%= $debug_log_level %>
SecAuditEngine RelevantOnly
SecAuditLogRelevantStatus "<%= $audit_log_relevant_status %>"
SecAuditLogParts <%= $audit_log_parts %>
Expand Down

0 comments on commit 63389b1

Please sign in to comment.