corazawaf / coraza-caddy

OWASP Coraza middleware for Caddy. It provides Web Application Firewall capabilities
https://www.coraza.io/
Apache License 2.0
345 stars 41 forks source link

provision http.handlers.waf: invalid WAF config from string: failed to readfile: open path: invalid argument #58

Closed vladget closed 1 year ago

vladget commented 1 year ago

here is Caddyfile:

/coraza # cat Caddyfile
{
    debug
    auto_https off
    order coraza_waf first
}

10.10.10.10:443 {
    tls internal

    coraza_waf {
        directives `
        Include /ruleset/coraza.conf
        Include /ruleset/sites/test/*.conf
        Include /ruleset/coreruleset/rules/*.conf
        `
    }
    reverse_proxy 10.10.10.10:4443 {
    }
}

config file exists:

/coraza # ls /ruleset/coraza.conf
/ruleset/coraza.conf

caddy doesn't see config:

/coraza # caddy reload
2023/04/26 08:01:04.459 INFO    using adjacent Caddyfile
Error: sending configuration to instance: caddy responded with error: HTTP 400: {"error":"loading config: loading new config: loading http app module: provision http: server srv0: setting up route handlers: route 0: loading handler modules: position 0: loading module 'subroute': provision http.handlers.subroute: setting up subroutes: route 0: loading handler modules: position 0: loading module 'waf': provision http.handlers.waf: invalid WAF config from string: failed to readfile: open path: invalid argument"}
M4tteoP commented 1 year ago

Hi, thanks for the report. Just sharing that most likely it is the same (open) issue reported https://github.com/corazawaf/coraza/discussions/662#discussioncomment-5493467 🧐

jcchavezs commented 1 year ago

Please retry @vladget

jcchavezs commented 1 year ago

Any feedback @vladget ?

github-actions[bot] commented 1 year ago

This issue has been open 30 days waiting for feedback. Remove the stale label or comment, or this will be closed in 14 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.