Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parsing caddyfile tokens for 'coraza_waf': invalid key for filter directive: load_owasp_crs #105

Open
rmGFW opened this issue Nov 25, 2023 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@rmGFW
Copy link

rmGFW commented Nov 25, 2023

{"level":"info","ts":1700875769.2244117,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
Error: adapting config using caddyfile: parsing caddyfile tokens for 'coraza_waf': invalid key for filter directive: load_owasp_crs, at /etc/caddy/Caddyfile:7
{
    order coraza_waf first
}

http://127.0.0.1:8080 {
 coraza_waf {
    load_owasp_crs
    directives `
    Include @coraza.conf-recommended
    Include @crs-setup.conf.example
    Include @owasp_crs/*.conf
    SecRuleEngine On
    `
  }
  reverse_proxy http://127.0.0.1:5173
}

command output of caddy list-modules

  Standard modules: 106

dns.providers.alidns
http.handlers.waf

  Non-standard modules: 2

  Unknown modules: 0

build command

    xcaddy build v2.7.5 --with github.com/caddy-dns/alidns --with github.com/corazawaf/coraza-caddy
@jptosso
Copy link
Member

jptosso commented Nov 25, 2023

You missed /v2
xcaddy build v2.7.5 --with github.com/caddy-dns/alidns --with github.com/corazawaf/coraza-caddy/v2

@jcchavezs
Copy link
Member

Can we close this?

@Simbiat
Copy link

Simbiat commented Jul 6, 2024

This should be somewhere in the documentation, that you need to use /v2 or it should be the version picked up by default, I believe. I had the same issue and googling was not really finding anything for me.

@M4tteoP
Copy link
Member

M4tteoP commented Aug 26, 2024

This should be somewhere in the documentation

Hey, the command provided in the readme under Build Caddy with Coraza WAF already shows it, what we can do it adding an extra note line close to that command trying to catch the reader's attention.

@M4tteoP M4tteoP added the documentation Improvements or additions to documentation label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants