-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Feature request] Expose Modsecurity variables to ngx/LUA #234
Comments
That sounds like a great idea. We already exchange variables within Lua - We also exchange transformations - Alternatively, libModSecurity could be ported to Lua (bindings) and all the inspection could be held on a Lua script. |
Hello @zimmerle, any news on that feature ? |
Hi, @zimmerle, @fl0ppy-d1sk, @cbornet.
Having this, variable value can be obtained from Lua code using FFI function call:
I could provide patch and pull request for existing ModSecurity-nginx connector with Lua code to obtain variable in such way.
|
It would be nice to have the variables of Modsecurity exposed to ngx/LUA (ngx.var).
So we can do some treatment on the transaction (eg. increment a Prometheus counter, set headers, ...)
Something like having the variables
$modsecurity_tx
,$modsecurity_env
,$modsecurity_geo
available.Also having the possibility to get all the rules that matched and their metadata (I'm not sure in which var they are stored).
Do you think that's feasible ?
The text was updated successfully, but these errors were encountered: