Saltstack Official Apache Formula
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

mod_security_spec.rb 1.0KB

1234567891011121314151617181920212223242526272829
  1. require_relative '../../../kitchen/data/spec_helper'
  2. describe 'apache.mod_security' do
  3. case os[:family]
  4. when 'redhat'
  5. modspec_file = '/etc/httpd/conf.d/mod_security.conf'
  6. when 'debian', 'ubuntu'
  7. modspec_file = '/etc/modsecurity/modsecurity.conf-recommended'
  8. else
  9. # No other supported ATM
  10. end
  11. describe file(modspec_file) do
  12. it { should exist }
  13. it { should be_mode 644 }
  14. it { should be_owned_by 'root' }
  15. it { should be_grouped_into 'root' }
  16. its(:content) { should match /SecRuleEngine On/ }
  17. its(:content) { should match /SecRequestBodyAccess On/ }
  18. its(:content) { should match /SecRequestBodyLimit 14000000/ }
  19. its(:content) { should match /SecRequestBodyNoFilesLimit 114002/ }
  20. its(:content) { should match /SecRequestBodyInMemoryLimit 114002/ }
  21. its(:content) { should match /SecRequestBodyLimitAction Reject/ }
  22. its(:content) { should match /SecPcreMatchLimit 15000/ }
  23. its(:content) { should match /SecPcreMatchLimitRecursion 15000/ }
  24. its(:content) { should match /SecDebugLogLevel 3/ }
  25. end
  26. end