8000 Improve sampling efficiency2 by 53cur3M3 · Pull Request #2094 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improve sampling efficiency2 #2094

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

Merged
merged 3 commits into from
Jul 2, 2021

Conversation

53cur3M3
Copy link
Contributor

Simplify sampling rules, and improve efficiency, as per : #2091
Tested in apache modsec2, but requires testing in modsec3 to validate leading zeros are handled gracefully; and preferably also what happens if TX.sampling_rnd100 is undefined

@azurit
Copy link
Member
azurit commented May 21, 2021

Looks good to me. Maybe @airween can test modsec 3 compatiblity? 😄

@dune73
Copy link
Member
dune73 commented Jun 6, 2021

We need somebody to test this for ModSec3. If these tests pass, the conflict with 901 has to be resolved, afterwards, we are ready to merge.

Tests for ModSec3:

  • Do we get roughly 50:50 CRS execution when the the sampling rate is set to 50%
  • Does ModSec3 handle leading 0s in TX.sampling_rnd100 gracefully (e.g.: 04 should be handled identically to 4)

@franbuehler
Copy link
Contributor

Meeting decision June (#2074 (comment)):
@theMiddleBlue will review this PR.

@dune73
Copy link
Member
dune73 commented Jul 2, 2021

Hey @theMiddleBlue did you have time to test this on ModSec3? If yes, we would like to merge this. Ideally before the chat on Monday.

@dune73
Copy link
Member
dune73 commented Jul 2, 2021

Nevermind. I fired up my nginx and tested this on ModSec3. Works like a charm. No further testing necessary.

@dune73
Copy link
Member
dune73 commented Jul 2, 2021

I resolved the conflict in 901 and the PR is ready to be merged now.

Thank you for the cleanup @53cur3M3.

@dune73 dune73 merged commit 4e4a409 into coreruleset:v3.4/dev Jul 2, 2021
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.

Rule 901410 uses @rx, when an @unconditionalMatch would work the same way
4 participants
0