ソースを参照

feat(pillar.example,test/): add example and test for richrule ratelimit

Document and test the accept rate limiting of the rich rule.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
tags/v1.2.0
Arnaud Patard 3年前
コミット
f25852637a
14個のファイルの変更99行の追加0行の削除
  1. +8
    -0
      pillar.example
  2. +7
    -0
      test/integration/default/controls/zones_spec.rb
  3. +7
    -0
      test/integration/default/files/_mapdata/amazonlinux-2.yaml
  4. +7
    -0
      test/integration/default/files/_mapdata/arch-base-latest.yaml
  5. +7
    -0
      test/integration/default/files/_mapdata/centos-7.yaml
  6. +7
    -0
      test/integration/default/files/_mapdata/centos-8.yaml
  7. +7
    -0
      test/integration/default/files/_mapdata/debian-10.yaml
  8. +7
    -0
      test/integration/default/files/_mapdata/debian-9.yaml
  9. +7
    -0
      test/integration/default/files/_mapdata/fedora-31.yaml
  10. +7
    -0
      test/integration/default/files/_mapdata/fedora-32.yaml
  11. +7
    -0
      test/integration/default/files/_mapdata/opensuse-15.yaml
  12. +7
    -0
      test/integration/default/files/_mapdata/ubuntu-16.yaml
  13. +7
    -0
      test/integration/default/files/_mapdata/ubuntu-18.yaml
  14. +7
    -0
      test/integration/default/files/_mapdata/ubuntu-20.yaml

+ 8
- 0
pillar.example ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http

ports: ports:
# {%- if grains['id'] == 'salt.example.com' %} # {%- if grains['id'] == 'salt.example.com' %}
- comment: salt-master - comment: salt-master

+ 7
- 0
test/integration/default/controls/zones_spec.rb ファイルの表示

<source ipset="fail2ban-ssh" /> <source ipset="fail2ban-ssh" />
<reject type="icmp-port-unreachable" /> <reject type="icmp-port-unreachable" />
</rule> </rule>
<rule>
<service name="http" />
<log prefix="http fw limit 3/m" level="warning">
<limit value="3/m"/>
</log>
<accept> <limit value="3/m"/></accept>
</rule>
</zone> </zone>
ZONE_XML ZONE_XML
end end

+ 7
- 0
test/integration/default/files/_mapdata/amazonlinux-2.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/arch-base-latest.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/centos-7.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/centos-8.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/debian-10.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/debian-9.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/fedora-31.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/fedora-32.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/opensuse-15.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/ubuntu-16.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/ubuntu-18.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

+ 7
- 0
test/integration/default/files/_mapdata/ubuntu-20.yaml ファイルの表示

name: fail2ban-ssh name: fail2ban-ssh
reject: reject:
type: icmp-port-unreachable type: icmp-port-unreachable
- accept:
limit: "3/m"
log:
level: warning
limit: "3/m"
prefix: "http fw limit 3/m"
service: http
services: services:
- http - http
- https - https

読み込み中…
キャンセル
保存