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

Stream inspection #171

Closed
rcbarnett-zz opened this issue Oct 17, 2013 · 7 comments
Closed

Stream inspection #171

rcbarnett-zz opened this issue Oct 17, 2013 · 7 comments
Assignees
Labels
2.x Related to ModSecurity version 2.x 3.x Related to ModSecurity version 3.x pending feedback RIP - Type - Feature

Comments

@rcbarnett-zz
Copy link
Contributor

MODSEC-18: Go beyond the discrete inspection model we currently have implemented, and toward streaming inspection. The idea is that the code would generate a number of streams, each streaming transaction data but in a slightly different way. Examples include:

  • Request body (after dechunking and decompression)
  • Response body (before dechunking and decompression)
  • File content (one stream per uploaded file)

Implementation:

  • SecStreamingInspection On|Off - on by default.
  • SecStreamMatch TARGETS PATTERNS ACTIONS
  • We would reuse variable names for TARGETS.
  • PATTERNS is a list of @pm patterns.
  • The ACTIONS part would support a limited set of actions (e.g. no flow control ones, no phases).
  • We would initially support inspection of raw streams, but, at a later date, we can implement streaming transformation operators to allow for streaming transformation pipelines.
  • All instances of SecStreamMatch targeting the same stream (and, later, using the same tfn operators) would be combined into a single matching tree.

Stream inspection would occur in real-time, as the content is being processed. There are two advantages of this approach:

  1. We can block on streaming-only mode (MODSEC-17).
  2. Makes pre-qualification easier (and faster).
@ghost ghost assigned zimmerle Oct 17, 2013
@rcbarnett-zz
Copy link
Contributor Author

Original reporter: ivanr

@rcbarnett-zz
Copy link
Contributor Author

ivanr: A more generic implementation would probably be a better choice. For example:

SecStreamInspect REQUEST_BODY "@pm one two" log,pass,t:none

@csanders-git
Copy link

You are not understanding what stream inspection means

@victorhora
Copy link
Contributor

victorhora commented May 20, 2017

Thank you @csanders-git. Could you please clarify the meaning of stream inspection on this issue? And please let us know if this a feature that the community is missing.

@victorhora victorhora reopened this May 20, 2017
@csanders-git
Copy link

@zimmerle could also easily explain what this means, this means treating HTTP requests incoming as a stream instead of assembling them into a buffered request.

@victorhora
Copy link
Contributor

Nice. Thanks for clarifying @csanders-git. Is this something that the CRS and / or the community are currently missing? If yes, I'll happily tag it for libModSecurity and see if we get some traction, otherwise it should be treated as #304 as it had no update / interest or for the past 5 years.

Thanks for letting us know.

@victorhora victorhora added 2.x Related to ModSecurity version 2.x 3.x Related to ModSecurity version 3.x pending feedback labels Nov 14, 2018
@zimmerle zimmerle closed this as completed Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to ModSecurity version 2.x 3.x Related to ModSecurity version 3.x pending feedback RIP - Type - Feature
Projects
None yet
Development

No branches or pull requests

4 participants