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

Add support for Mod Security DetectionOnly Mode #443

Merged
merged 2 commits into from
Nov 11, 2019

Conversation

rikatz
Copy link
Contributor

@rikatz rikatz commented Nov 8, 2019

Signed-off-by: Ricardo Pchevuzinske Katz ricardo.katz@serpro.gov.br

This PR adds support for a DetectionOnly mode in Mod Security for each backend.

The idea here is when specifying the annotation 'waf-mode: "DetectionOnly"' it will send the requests to the ModSecurity filter to generate the appropriate logging, but no action will be taken.

To keep the compability with following versions, the behavior here is: if there's a waf annotation and no waf-mode annotation, it will block bad requests.

To enable DetectionOnly mode user must create the waf-mode annotation with DetectionOnly as its value

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>
Copy link
Owner

@jcmoraisjr jcmoraisjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, welcome back and thanks for this PR!

Some suggestions below.

pkg/converters/ingress/annotations/backend.go Outdated Show resolved Hide resolved
Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>
@jcmoraisjr
Copy link
Owner

Thanks! Merging.

@jcmoraisjr jcmoraisjr merged commit 40e2a51 into jcmoraisjr:master Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants