waf: run the trap paths, rule files and Core Rule Set during the GeoJS wait (closes #405)
check / check (push) Failing after 1m56s
check / check (push) Failing after 1m56s
While the lookup waits for GeoJS, the trap paths, the rule files and the Core Rule Set run at the same time as the checks after the lookup. The first side to refuse answers the request; what the other side finds leaves no trace. Those three checks have 500 ms together: past it, the request is refused with 503 as checks_timed_out, with no ban and no offence. Tests hold GeoJS and the Core Rule Set with stand-ins under synctest. The test helper lifts the 500 ms limit for tests that run the real Core Rule Set, which the race detector slows past it. Model: opus-5-5
This commit is contained in:
1 parent
caa3079847
commit
098bbe8878
19 files changed
+900
-83
No files matched your search
@@ -35,10 +35,11 @@ const (
|
||||
mostJSONRead = 1 << 10
|
||||
)
|
||||
|
||||
// The Core Rule Set has 1 second for one request. That is the default of
|
||||
// rproxy's SWW_RPROXY_WAF_BACKEND_TIMEOUT_MS, 2 seconds, less the default of
|
||||
// SWW_WAF_ASN_AND_COUNTRY_LOOKUP_TIMEOUT_MS, 800 milliseconds, and less 200
|
||||
// milliseconds for waf's other checks.
|
||||
// waf refuses a request the Core Rule Set has not inspected within 500
|
||||
// milliseconds, but Coraza cannot stop an inspection part-way, so it runs to
|
||||
// its end with nobody waiting for it. The test checks that an inspection ends
|
||||
// within about 1 second, so that a visitor cannot keep a processor busy for
|
||||
// longer with one request.
|
||||
//
|
||||
// A busy host slows all work, so the test does not compare an inspection with
|
||||
// 1 second. It compares it with referenceTime, timed on the same thread just
|
||||
|
||||
Reference in new issue
Block a user