Shun a client after repeated blocks #7
Loading…
Reference in a new issue
No description provided.
Delete branch "repeat-offender-shun"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on #5. This branch is built on
inline-reviewso that late verdicts count; until #5 merges, the diff here includes its commit. Merge #5 first.Problem
A shun needed one request severe enough to earn it (severity 2.9 under
balanced). On 8 October a scanner from 34.85.33.104 sent 88 requests to one host in 45 seconds. The model blocked 26 of them, the highest severity was 2.79, and the client was never shunned, so every later request was judged on its own and 59 failed open.Change
Two settings, off by default:
CENTINELA_SHUN_AFTER0(off)CENTINELA_SHUN_WINDOW1mThe shun lasts
CENTINELA_SHUN_TTL, as any other.What counts as a blocked request:
model) or late (review)What does not:
fail-closed: a model outage says nothing about the clientflagverdictsEach shun is logged as
client shunnedwith the count and window, and counted incentinela_repeat_offender_shunson/debug/vars.Limits
CENTINELA_CLIENT_IP_HEADER; users behind one NAT address share a count.Tests
0disables it.make vet,make buildandmake test(race detector) pass.🔎 ojo scan results
Details (7)