|
79 | 79 | audit_log_type: 'Concurrent',
|
80 | 80 | audit_log_storage_dir: '/var/log/httpd/audit',
|
81 | 81 | secdefaultaction: 'deny,status:406,nolog,auditlog',
|
| 82 | + secrequestbodyaccess: 'Off', |
| 83 | + secresponsebodyaccess: 'On', |
82 | 84 | }
|
83 | 85 | end
|
84 | 86 |
|
85 | 87 | it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecAuditLogRelevantStatus "\^\(\?:5\|4\(\?!01\|04\)\)"$} }
|
86 | 88 | it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecAuditLogParts ABCDZ$} }
|
87 | 89 | it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecAuditLogType Concurrent$} }
|
88 | 90 | it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecAuditLogStorageDir /var/log/httpd/audit$} }
|
| 91 | + it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecRequestBodyAccess Off$} } |
| 92 | + it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecResponseBodyAccess On$} } |
89 | 93 | it { is_expected.to contain_file('/etc/httpd/modsecurity.d/security_crs.conf').with_content %r{^\s*SecDefaultAction "phase:2,deny,status:406,nolog,auditlog"$} }
|
90 | 94 | it {
|
91 | 95 | is_expected.to contain_file('bar.conf').with(
|
|
227 | 231 | audit_log_type: 'Concurrent',
|
228 | 232 | audit_log_storage_dir: '/var/log/httpd/audit',
|
229 | 233 | secdefaultaction: 'deny,status:406,nolog,auditlog',
|
| 234 | + secrequestbodyaccess: 'Off', |
| 235 | + secresponsebodyaccess: 'On', |
230 | 236 | }
|
231 | 237 | end
|
232 | 238 |
|
|
235 | 241 | it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecAuditLogRelevantStatus "\^\(\?:5\|4\(\?!01\|04\)\)"$} }
|
236 | 242 | it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecAuditLogParts ABCDZ$} }
|
237 | 243 | it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecAuditLogStorageDir /var/log/httpd/audit$} }
|
| 244 | + it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecRequestBodyAccess Off$} } |
| 245 | + it { is_expected.to contain_file('security.conf').with_content %r{^\s+SecResponseBodyAccess On$} } |
238 | 246 | it { is_expected.to contain_file('/etc/modsecurity/security_crs.conf').with_content %r{^\s*SecDefaultAction "phase:2,deny,status:406,nolog,auditlog"$} }
|
239 | 247 | it {
|
240 | 248 | is_expected.to contain_file('bar.conf').with(
|
|
0 commit comments