Skip to main content

Coraza Web Application Firewall

The Coraza WAF middleware in Traefik Hub API Gateway provides web application firewall capabilities.

The native middleware in Hub API Gateway provides at least 23 times more performance compared to the WASM-based Coraza plugin available with the open-source Traefik Proxy.

To learn how to write rules, please visit Coraza documentation and OWASP CRS documentation.


Configuration Examples

apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: waf
spec:
plugin:
coraza:
directives:
- SecRuleEngine On
- SecRule REQUEST_URI "@streq /admin" "id:101,phase:1,t:lowercase,log,deny"

Configuration Options

FieldDescriptionDefaultRequired
directivesList of WAF rules to enforce.Yes
crsEnabledEnable CRS rulesets.
Once the ruleset is enabled, it can be used in the middleware.
falseFalse