Files
zeekay efee4c9fb1 Add the WAF middleware
OWASP Coraza with the Core Rule Set v4 embedded, declared as `waf` on
every provider: file, labels and the Middleware CR. Rules load Core Rule
Set, then files, then inline directives.

The engine state is written after every rule. The Core Rule Set's own
recommended configuration opens with SecRuleEngine DetectionOnly, so a
state written first is overridden by the rules it governs and the
firewall loads all of CRS and refuses nothing; detectionOnly on the
middleware is the one place the mode is decided.

geoBlock rode along: it was declared in dynamic config only, absent from
MiddlewareSpec, both deep copies and the CRD schema, so a Middleware CR
carrying it produced a middleware without it. The +groupName marker now
matches the registered group, which is what makes controller-gen's output
land where code-gen.sh reads it; the stale traefik.io_*.yaml dumps go.

CI asks for the arm64 runner git.hanzo.ai actually has and builds both
platforms.
2026-09-03 16:14:35 -07:00

68 lines
1.1 KiB
YAML

apiVersion: v1
kind: Secret
metadata:
name: authsecret
namespace: default
data:
users: |2
dGVzdDokYXByMSRINnVza2trVyRJZ1hMUDZld1RyU3VCa1RycUU4d2ovCnRlc3QyOiRhcHIxJGQ5
aHI5SEJCJDRIeHdnVWlyM0hQNEVzZ2dQL1FObzAK
---
apiVersion: v1
kind: Secret
metadata:
name: casecret
namespace: default
data:
ca: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
---
apiVersion: v1
kind: Secret
metadata:
name: tlssecret
namespace: default
data:
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
---
apiVersion: hanzo.ai/v1alpha1
kind: Middleware
metadata:
name: basicauth
namespace: default
spec:
basicAuth:
secret: authsecret
---
apiVersion: hanzo.ai/v1alpha1
kind: Middleware
metadata:
name: digestauth
namespace: default
spec:
digestAuth:
secret: authsecret
---
apiVersion: hanzo.ai/v1alpha1
kind: Middleware
metadata:
name: forwardauth
namespace: default
spec:
forwardAuth:
address: test.com
headerField: X-Header-Field
tls:
certSecret: tlssecret
caSecret: casecret