p0pr0ck5 / lua-resty-waf

High-performance WAF built on the OpenResty stack
GNU General Public License v3.0
1.28k stars 305 forks source link

Deprecate add_ruleset and add_ruleset_string #263

Open p0pr0ck5 opened 7 years ago

p0pr0ck5 commented 7 years ago

Need to start a deprecation cycle for reading JSON data and moving over exclusively to SecRules consumption.

p0pr0ck5 commented 7 years ago

Slating deprecation for v0.12. Will remove in v1.0.

tzumby commented 7 years ago

If I'm understanding this correctly, with this you load just one ruleset, right ? Something like REQUEST-903.9002-WORDPRESS-EXCLUSION-RULES.conf from the modsecurity rules.

lua_resty_waf.load_secrules("/path/to/secrules/ruleset_name")

How would waf:set_option("add_ruleset", {"rule1.conf", "rule2.conf}) work when you pass a table? Would you have multiple load_secrules for the different rules ?

p0pr0ck5 commented 7 years ago

Yeah, you can just call load_secrules multiple times. Or for convenience we can allow this to take a table, that's really Just syntactic sugar :)