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

waf-fail-closed=true rejects all requests #962

Closed
mac-chaffee opened this issue Nov 16, 2022 · 1 comment · Fixed by #963
Closed

waf-fail-closed=true rejects all requests #962

mac-chaffee opened this issue Nov 16, 2022 · 1 comment · Fixed by #963

Comments

@mac-chaffee
Copy link
Contributor

Description of the problem

See haproxy/spoa-modsecurity#3 (comment)

While testing, I discovered that this comment is not entirely true:
https://github.com/haproxy/spoa-modsecurity/blob/3c895f3e7dd291dba19d57ba054b277e6fb80ca4/spoa.c#L93

When spoa-modsecurity approves a request, it actually sets txn.modsec.code to -1, meaning my changes in #954 aren't correct.

But there's a bigger problem: you can't actually tell the difference between spoa-modsecurity throwing certain errors and approving a request since the response is -1 either way.

Expected behavior

waf-fail-closed=true still lets in valid requests.

This might end up being hard to fix since we might need the upstream spoa-modsecurity to change the behavior of the return code. Maybe just a revert of #954 is the best bet for now. Thoughts?

Environment information

HAProxy Ingress version: master branch

@jcmoraisjr
Copy link
Owner

Hi, that makes sense, good catch. I share the opinion that the best option is to fix that upstream and reintroduce the feature as soon as we can say it works. The job isn't lost since we're using version control =) Merging the revert and look forward any news on this subject. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants