|
98 | 98 | # @param secrequestbodyaccess
|
99 | 99 | # Toggle SecRequestBodyAccess On or Off
|
100 | 100 | #
|
| 101 | +# @param secrequestbodylimitaction |
| 102 | +# Controls what happens once a request body limit, configured with |
| 103 | +# SecRequestBodyLimit, is encountered |
| 104 | +# |
101 | 105 | # @param secresponsebodyaccess
|
102 | 106 | # Toggle SecResponseBodyAccess On or Off
|
| 107 | +# |
| 108 | +# @param secresponsebodylimitaction |
| 109 | +# Controls what happens once a response body limit, configured with |
| 110 | +# SecResponseBodyLimitAction, is encountered. |
103 | 111 | #
|
104 | 112 | # @param manage_security_crs
|
105 | 113 | # Toggles whether to manage ModSecurity Core Rule Set
|
|
124 | 132 | # @see https://coreruleset.org/docs/ for addional documentation
|
125 | 133 | #
|
126 | 134 | class apache::mod::security (
|
127 |
| - Stdlib::Absolutepath $logroot = $apache::params::logroot, |
128 |
| - Integer $version = $apache::params::modsec_version, |
129 |
| - Optional[String] $crs_package = $apache::params::modsec_crs_package, |
130 |
| - Array[String] $activated_rules = $apache::params::modsec_default_rules, |
131 |
| - Boolean $custom_rules = $apache::params::modsec_custom_rules, |
132 |
| - Optional[Array[String]] $custom_rules_set = $apache::params::modsec_custom_rules_set, |
133 |
| - Stdlib::Absolutepath $modsec_dir = $apache::params::modsec_dir, |
134 |
| - String $modsec_secruleengine = $apache::params::modsec_secruleengine, |
135 |
| - String $audit_log_relevant_status = '^(?:5|4(?!04))', |
136 |
| - String $audit_log_parts = $apache::params::modsec_audit_log_parts, |
137 |
| - String $audit_log_type = $apache::params::modsec_audit_log_type, |
138 |
| - Optional[Stdlib::Absolutepath] $audit_log_storage_dir = undef, |
139 |
| - Integer $secpcrematchlimit = $apache::params::secpcrematchlimit, |
140 |
| - Integer $secpcrematchlimitrecursion = $apache::params::secpcrematchlimitrecursion, |
141 |
| - String $allowed_methods = 'GET HEAD POST OPTIONS', |
142 |
| - String $content_types = 'application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf', |
143 |
| - String $restricted_extensions = '.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx/', |
144 |
| - String $restricted_headers = '/Proxy-Connection/ /Lock-Token/ /Content-Range/ /Translate/ /via/ /if/', |
145 |
| - String $secdefaultaction = 'deny', |
146 |
| - Integer $inbound_anomaly_threshold = 5, |
147 |
| - Integer $outbound_anomaly_threshold = 4, |
148 |
| - Integer $critical_anomaly_score = 5, |
149 |
| - Integer $error_anomaly_score = 4, |
150 |
| - Integer $warning_anomaly_score = 3, |
151 |
| - Integer $notice_anomaly_score = 2, |
152 |
| - Integer $secrequestmaxnumargs = 255, |
153 |
| - Integer $secrequestbodylimit = 13107200, |
154 |
| - Integer $secrequestbodynofileslimit = 131072, |
155 |
| - Integer $secrequestbodyinmemorylimit = 131072, |
156 |
| - Integer[1,4] $paranoia_level = 1, |
157 |
| - Integer[1,4] $executing_paranoia_level = $paranoia_level, |
158 |
| - Enum['On', 'Off'] $secrequestbodyaccess = 'On', |
159 |
| - Enum['On', 'Off'] $secresponsebodyaccess = 'Off', |
160 |
| - Boolean $manage_security_crs = true, |
161 |
| - Boolean $enable_dos_protection = true, |
162 |
| - Integer[1, default] $dos_burst_time_slice = 60, |
163 |
| - Integer[1, default] $dos_counter_threshold = 100, |
164 |
| - Integer[1, default] $dos_block_timeout = 600, |
| 135 | + Stdlib::Absolutepath $logroot = $apache::params::logroot, |
| 136 | + Integer $version = $apache::params::modsec_version, |
| 137 | + Optional[String] $crs_package = $apache::params::modsec_crs_package, |
| 138 | + Array[String] $activated_rules = $apache::params::modsec_default_rules, |
| 139 | + Boolean $custom_rules = $apache::params::modsec_custom_rules, |
| 140 | + Optional[Array[String]] $custom_rules_set = $apache::params::modsec_custom_rules_set, |
| 141 | + Stdlib::Absolutepath $modsec_dir = $apache::params::modsec_dir, |
| 142 | + String $modsec_secruleengine = $apache::params::modsec_secruleengine, |
| 143 | + String $audit_log_relevant_status = '^(?:5|4(?!04))', |
| 144 | + String $audit_log_parts = $apache::params::modsec_audit_log_parts, |
| 145 | + String $audit_log_type = $apache::params::modsec_audit_log_type, |
| 146 | + Optional[Stdlib::Absolutepath] $audit_log_storage_dir = undef, |
| 147 | + Integer $secpcrematchlimit = $apache::params::secpcrematchlimit, |
| 148 | + Integer $secpcrematchlimitrecursion = $apache::params::secpcrematchlimitrecursion, |
| 149 | + String $allowed_methods = 'GET HEAD POST OPTIONS', |
| 150 | + String $content_types = 'application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf', |
| 151 | + String $restricted_extensions = '.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx/', |
| 152 | + String $restricted_headers = '/Proxy-Connection/ /Lock-Token/ /Content-Range/ /Translate/ /via/ /if/', |
| 153 | + String $secdefaultaction = 'deny', |
| 154 | + Integer $inbound_anomaly_threshold = 5, |
| 155 | + Integer $outbound_anomaly_threshold = 4, |
| 156 | + Integer $critical_anomaly_score = 5, |
| 157 | + Integer $error_anomaly_score = 4, |
| 158 | + Integer $warning_anomaly_score = 3, |
| 159 | + Integer $notice_anomaly_score = 2, |
| 160 | + Integer $secrequestmaxnumargs = 255, |
| 161 | + Integer $secrequestbodylimit = 13107200, |
| 162 | + Integer $secrequestbodynofileslimit = 131072, |
| 163 | + Integer $secrequestbodyinmemorylimit = 131072, |
| 164 | + Integer[1,4] $paranoia_level = 1, |
| 165 | + Integer[1,4] $executing_paranoia_level = $paranoia_level, |
| 166 | + Enum['On', 'Off'] $secrequestbodyaccess = 'On', |
| 167 | + Enum['On', 'Off'] $secresponsebodyaccess = 'Off', |
| 168 | + Enum['Reject', 'ProcessPartial'] $secrequestbodylimitaction = 'Reject', |
| 169 | + Enum['Reject', 'ProcessPartial'] $secresponsebodylimitaction = 'ProcessPartial', |
| 170 | + Boolean $manage_security_crs = true, |
| 171 | + Boolean $enable_dos_protection = true, |
| 172 | + Integer[1, default] $dos_burst_time_slice = 60, |
| 173 | + Integer[1, default] $dos_counter_threshold = 100, |
| 174 | + Integer[1, default] $dos_block_timeout = 600, |
165 | 175 | ) inherits apache::params {
|
166 | 176 | include apache
|
167 | 177 |
|
|
228 | 238 | # - secrequestbodyinmemorylimit
|
229 | 239 | # - secrequestbodyaccess
|
230 | 240 | # - secresponsebodyaccess
|
| 241 | + # - secrequestbodylimitaction |
| 242 | + # - secresponsebodylimitaction |
231 | 243 | file { 'security.conf':
|
232 | 244 | ensure => file,
|
233 | 245 | content => template('apache/mod/security.conf.erb'),
|
|
0 commit comments