Documentation
¶
Overview ¶
Package rules defines the interface between the inspection pipeline and a rule engine. Coraza is the first implementation (package rules/coraza); the interface keeps a different engine possible without touching adapters.
Evaluation currently takes a whole request with its buffered body prefix. Streaming evaluation (headers, then body chunks, then response) arrives with the Envoy ext_proc adapter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evaluator ¶
Evaluator evaluates requests against a compiled rule set. Implementations must be safe for concurrent use.
type Result ¶
type Result struct {
// Interrupted reports that a rule asked to block the request.
Interrupted bool
// Status is the HTTP status the blocking rule asked for (0 if unset).
Status int
// RuleID is the rule that interrupted the request, if any.
RuleID int
// MatchedRuleIDs lists every rule that matched request data, including
// rules that only contributed to an anomaly score.
MatchedRuleIDs []int
}
Result is the outcome of evaluating one request.