lua-resty-waf icon indicating copy to clipboard operation
lua-resty-waf copied to clipboard

Deprecate add_ruleset and add_ruleset_string

Open p0pr0ck5 opened this issue 7 years ago • 3 comments

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

p0pr0ck5 avatar Feb 22 '17 19:02 p0pr0ck5

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

p0pr0ck5 avatar Feb 22 '17 19:02 p0pr0ck5

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 ?

tzumby avatar Jun 03 '17 16:06 tzumby

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 :)

p0pr0ck5 avatar Jun 05 '17 01:06 p0pr0ck5