File tree Expand file tree Collapse file tree 4 files changed +43
-12
lines changed Expand file tree Collapse file tree 4 files changed +43
-12
lines changed Original file line number Diff line number Diff line change 74
74
{{- end }}
75
75
{{- end }}
76
76
77
+ volumeMounts :
78
+ # allows to add extra directives
79
+ - name : waf-custom-config
80
+ mountPath : /etc/caddy/rules/custom.conf
81
+ subPath : custom.conf
82
+
77
83
ports :
78
84
- name : http-waf
79
85
containerPort : 8090
@@ -147,6 +153,13 @@ spec:
147
153
scheme : HTTP
148
154
port : http
149
155
{{- end }}
156
+ startupProbe :
157
+ httpGet :
158
+ path : /liveness.php
159
+ scheme : HTTP
160
+ port : http
161
+ failureThreshold : 10
162
+ periodSeconds : 5
150
163
resources :
151
164
{{- toYaml .Values.resources | nindent 20 }}
152
165
volumes :
@@ -160,3 +173,8 @@ spec:
160
173
persistentVolumeClaim :
161
174
claimName : {{ .Values.pv.wp_content.claimName }}
162
175
{{- end }}
176
+ {{- if .Values.waf.enabled }}
177
+ - name : waf-custom-config
178
+ configMap :
179
+ name : {{ include "wordpress-hardened.fullname" . }}-waf-custom-config
180
+ {{- end }}
Original file line number Diff line number Diff line change 8
8
{{ $_ := set $ingress.annotations "kubernetes.io/ingress.class" $ingress.className}}
9
9
{{ end }}
10
10
{{ end }}
11
- {{ if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion - }}
11
+ {{ if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
12
12
apiVersion : networking.k8s.io/v1
13
13
{{- else if semverCompare ">=1.14-0" $.Capabilities.KubeVersion.GitVersion -}}
14
14
apiVersion : networking.k8s.io/v1beta1
53
53
backend :
54
54
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
55
55
service :
56
- name : {{ if $.Values.waf.enabled }}{{ $fullName }}-waf-protected{{ else }}{ $fullName }}{{ end }}
56
+ name : {{ if $.Values.waf.enabled }}{{ $fullName }}-waf-protected{{ else }}{{ $fullName }}{{ end }}
57
57
port :
58
58
number : 80
59
59
{{- else }}
Original file line number Diff line number Diff line change
1
+ {{- if .Values.waf.enabled }}
2
+ ---
3
+ apiVersion : v1
4
+ kind : ConfigMap
5
+ metadata :
6
+ name : {{ include "wordpress-hardened.fullname" . }}-waf-custom-config
7
+ data :
8
+ custom.conf : |
9
+ {{ .Values.waf.directives }}
10
+ {{- end }}
Original file line number Diff line number Diff line change @@ -114,20 +114,23 @@ waf:
114
114
enabled : true
115
115
image :
116
116
repository : ghcr.io/riotkit-org/waf-proxy
117
- tag : 2.5.1-coraza-v1.2.0-bv0.0.10
117
+ tag : snapshot
118
118
env :
119
119
ENABLE_RULE_WORDPRESS : true
120
- WP_CLIENT_IP : x-forwarded-for
121
- WP_ENABLE_BRUTEFORCE_MITIGATION : true
122
- WP_BRUTEFORCE_TIMESPAN : 300
123
- WP_BRUTEFORCE_THRESHOLD : 5
124
- WP_BRUTEFORCE_BAN_PERIOD : 300
125
- WP_ENABLE_XMLRPC : true
126
- WP_ENABLE_USER_ENUMERATION : false
127
- WP_ENABLE_DOS_PROTECTION : true
128
- WP_HARDENED : true
129
120
ENABLE_CRS : true
121
+ ENABLE_RATE_LIMITER : true
122
+ RATE_LIMIT_EVENTS : " 30"
123
+ RATE_LIMIT_WINDOW : " 5s"
130
124
125
+ # due to bug temporarily the CORAZA WAF is disabled, it will be enabled by default in future releases
126
+ ENABLE_CORAZA_WAF : false
127
+
128
+ directives : |
129
+ #SecDefaultAction "phase:4,allow,log"
130
+ #SecAction "id:1,pass,log"
131
+ #SecAuditLog /dev/stdout
132
+ #SecDebugLog /dev/stdout
133
+ #SecDebugLogLevel 5
131
134
health :
132
135
liveness :
133
136
enabled : true
You can’t perform that action at this time.
0 commit comments