Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
puppet-puppetlabs-apache
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Infrastructure
Puppet
Dependencies
puppet-puppetlabs-apache
Commits
e273907f
Unverified
Commit
e273907f
authored
2 months ago
by
Romain Tartière
Committed by
GitHub
2 months ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #2523 from JGodin-C2C/main
parents
97449e4a
4a392e54
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
manifests/mod/security.pp
+5
-0
5 additions, 0 deletions
manifests/mod/security.pp
spec/classes/mod/security_spec.rb
+2
-0
2 additions, 0 deletions
spec/classes/mod/security_spec.rb
templates/mod/security.conf.epp
+1
-1
1 addition, 1 deletion
templates/mod/security.conf.epp
with
8 additions
and
1 deletion
manifests/mod/security.pp
+
5
−
0
View file @
e273907f
...
...
@@ -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.
#
...
...
@@ -143,6 +146,7 @@ class apache::mod::security (
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
,
Integer
[
0
,
9
]
$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
,
...
...
@@ -262,6 +266,7 @@ class apache::mod::security (
'audit_log_type'
=>
$audit_log_type
,
'audit_log_format'
=>
$audit_log_format
,
'audit_log_storage_dir'
=>
$audit_log_storage_dir
,
'debug_log_level'
=>
$debug_log_level
,
'logroot'
=>
$logroot
,
}
...
...
This diff is collapsed.
Click to expand it.
spec/classes/mod/security_spec.rb
+
2
−
0
View file @
e273907f
...
...
@@ -104,6 +104,7 @@ describe 'apache::mod::security', type: :class do
audit_log_type:
'Concurrent'
,
audit_log_format:
'JSON'
,
audit_log_storage_dir:
'/var/log/httpd/audit'
,
debug_log_level:
3
,
secdefaultaction:
'deny,status:406,nolog,auditlog'
,
secrequestbodyaccess:
'Off'
,
secresponsebodyaccess:
'On'
,
...
...
@@ -118,6 +119,7 @@ describe 'apache::mod::security', type: :class do
it
{
is_expected
.
to
contain_file
(
'security.conf'
).
with_content
%r{^
\s
+SecAuditLogFormat JSON$}
}
it
{
is_expected
.
to
contain_file
(
'security.conf'
).
with_content
%r{^
\s
+SecAuditLogStorageDir /var/log/httpd/audit$}
}
it
{
is_expected
.
to
contain_file
(
'security.conf'
).
with_content
%r{^
\s
+SecRequestBodyAccess Off$}
}
it
{
is_expected
.
to
contain_file
(
'security.conf'
).
with_content
%r{^
\s
+SecDebugLogLevel 3$}
}
it
{
is_expected
.
to
contain_file
(
'security.conf'
).
with_content
%r{^
\s
+SecResponseBodyAccess On$}
}
it
{
is_expected
.
to
contain_file
(
'security.conf'
).
with_content
%r{^
\s
+SecRequestBodyLimitAction ProcessPartial$}
}
it
{
is_expected
.
to
contain_file
(
'security.conf'
).
with_content
%r{^
\s
+SecResponseBodyLimitAction Reject$}
}
...
...
This diff is collapsed.
Click to expand it.
templates/mod/security.conf.epp
+
1
−
1
View file @
e273907f
...
...
@@ -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
%>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment