You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Persist BotD verdict/kind/confidence/request_id in the public session table and propagate the cached verdict plus age back to HAProxy.
Document that match.botd.* rules run against the cached session snapshot so detections survive beyond Cookie Guard's 5-minute cache.
Copy file name to clipboardExpand all lines: README.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ Decision maintains an in‑memory "public" session entry keyed by a durable iden
20
20
-`session.public.rate` (logged as `rate`): per‑second rate over the rolling window, computed as `recent_hits / rate_window_seconds`. For per‑minute, multiply by 60.
21
21
-`session.public.idle_seconds`: time since this key last appeared.
22
22
-`session.public.first_path` + `first_path_deep`: first path seen for the key and a boolean indicating whether it looks like a "deep" path.
23
+
-`session.public.botd_*`: the most recent FingerprintJS BotD verdict (`verdict`, `kind`, `confidence`, `request_id`) plus `botd_age_seconds`, captured whenever Cookie Guard shares telemetry. Decision keeps this alongside the session so verdicts persist beyond Cookie Guard’s 5‑minute cache, and any `match.botd.*` condition reads this cached snapshot rather than requiring the live `cookieguard.*` vars to be present on the current request.
23
24
24
25
Configuration knobs:
25
26
@@ -278,6 +279,10 @@ The tables below list the request/response variables exchanged between HAProxy a
278
279
|`cookieguard_age`| Optional |`var(txn.cookieguard.age_seconds)`| Age of the verified token |
279
280
|`cookieguard_level`| Optional |`var(txn.cookieguard.challenge_level)`| Challenge tier just issued (only set during challenge) |
|`botd_request_id`| Optional |`var(txn.cookieguard.botd_request_id)`| Fingerprint BotD `requestId` for correlating detections. |
281
286
|`session.public.key`*(response → request handoff)*| Optional | Resent by HAProxy if you capture it between calls | Keeps session continuity through restarts |
282
287
|`res.hdrs`*(response message)*| Optional | Full response headers on `decide_response`| context.yml allowlist (special/public tables) |
283
288
@@ -298,8 +303,10 @@ Each output becomes `var(txn.decision.<name>)` because the SPOE agent uses `opti
|`session.public.suspicious_score`| Decision-managed score that accumulates via `session.suspicious.increment/reset`. Use it to gate ALTCHA re-challenges or hard denies once a threshold is reached. |
300
305
|`session.public.suspicious_ignored`|`true` when the session is marked via `session.suspicious.ignore: true` (no further increments). Helpful for gating rules so trusted bots/networks are exempt. |
306
+
|`session.public.botd_verdict`, `.botd_kind`, `.botd_confidence`, `.botd_request_id`, `.botd_age_seconds`| Last BotD verdict stored in Decision’s session tracker (age expresses seconds since telemetry was seen). Lets HAProxy/policy rules reuse detections even after Cookie Guard evicts its 5‑minute cache, and `match.botd.*` rules evaluate against this cached state. |
301
307
|`session.special.role`, `.groups`, `.idle_seconds`| Trusted user hints (from context.yml). Skip challenges or grant bypass for known roles. |
|`cookieguard.botd_verdict`, `.botd_kind`, `.botd_confidence`, `.botd_request_id`| Mirror of Cookie Guard’s BotD verdict cache so HAProxy ACLs can reuse Decision’s normalized view (`cookieguard.botd_tool` aliases `.botd_kind`). |
303
310
304
311
All outputs are optional except the ones your HAProxy logic relies on; use `-m bool`/`-m found` guards before acting on them. Defaults + fallback in `policy.yml` ensure the variables you care about are always present.
305
312
@@ -409,6 +416,11 @@ This section documents every supported field in `policy.yml` and how matches are
409
416
- `valid`: boolean
410
417
- `age_seconds`: numeric comparator map
411
418
- `challenge_level`: array of levels (strings)
419
+
- `botd`: BotD verdict cache from Cookie Guard
420
+
- `verdict`: array of verdicts (`good`, `bad`, `suspect`, etc.)
421
+
- `kind`: array of automation tool labels (case-insensitive)
- `request_id`: array of exact Fingerprint request IDs
412
424
413
425
- Return map
414
426
- `reason` (string): optional human‑readable reason. If omitted, the fallback reason applies (default `"default-policy"`).
@@ -429,7 +441,7 @@ Notes on session‑driven inputs
429
441
- Suspicion score: `session.public.suspicious_score`reflects the accumulated score managed by Decision; use `session.suspicious.increment/reset` to mutate it.
430
442
- Suspicion ignore flag: `session.public.suspicious_ignored`is `true` after a rule sets `session.suspicious.ignore: true`, preventing future increments for that session.
431
443
- Special session (trusted profile): `session.special.role`, `session.special.groups`, `session.special.idle_seconds`.
0 commit comments