Security settings reference (siteConfig.security)¶
siteConfig.security holds per-site security configuration. Its main
child is the suspicious activity monitor (security.suspiciousActivity,
documented below); it also carries the role-enforcement switch
security.enforceRoleAnnotations (see Role enforcement at the end)
and the burst limiter (security.burstLimiter, see Burst limiter).
There is no site-wide default record for this namespace: every value is
optional, and anything a site does not set falls back to the defaults
listed below (defined in the API's auditService).
Most fields are editable on the Settings screen (General tab → Suspicious activity monitor, superusers only); four bot-tuning keys have no UI control and can only be set by editing the site's stored config directly. See the site settings reference for how settings are saved.
How values are read¶
The monitor never reads siteConfig.security raw. Every run calls a
merge routine that lays the site's values over the defaults with
defensive rules:
- A key that is missing, null, or blank keeps its default.
- Numeric fields only accept numbers — a non-numeric value is ignored.
- Boolean fields (
enabled,botDetection) only accept booleans.
So a site can never break the monitor with a bad value; it can only tune it.
What the monitor does¶
An hourly scheduled task sweeps the audit trail and runs two independent detectors. Users flagged by either (or both) produce one alert email — with the user's full activity report attached as a PDF — to the configured recipients, and every alert is written back into the audit trail as a "Suspicious Activity Alert" event (which is also what drives the cooldown). If the master switch is off the task exits immediately.
- Volume detector — flags users whose distinct deal views or document downloads in the window are far above their own historical baseline. Distinct matters: refreshing one deal fifty times never counts as fifty. Users too new to have a baseline are never flagged.
- Bot detector — looks at all of a user's API activity for non-human patterns; several independent signals must agree before a user is flagged.
General fields¶
| Key | Default | Meaning |
|---|---|---|
enabled |
true |
Master switch for the whole monitor. Off = the hourly task does nothing. |
recipients |
(blank) | Comma-separated alert email addresses. Blank falls back to bugs.supportEmails; if neither yields a valid address the sweep logs "no recipients" and sends nothing. |
maxAlertsPerRun |
10 |
Safety cap on flagged users (and therefore emails) per sweep. |
Volume detector fields¶
| Key | Default | Meaning |
|---|---|---|
windowHours |
24 |
The rolling activity window each sweep examines. |
baselineDays |
30 |
How much history forms the user's personal baseline. The current window is excluded, so a spree cannot inflate its own baseline. |
multiplier |
4 |
Window count must be at least this many times the user's own daily average to flag. |
minDealViews |
30 |
Absolute floor: fewer distinct deals viewed in the window never flags, regardless of baseline. |
minDocDownloads |
15 |
Absolute floor: fewer distinct documents downloaded never flags. |
minHistoryDays |
14 |
The user's first audit event must be at least this old — newer accounts have no "character" and are skipped. |
minActiveDays |
5 |
The user must have been active on this many days within the baseline period. |
cooldownDays |
3 |
After a user is alerted, the same evidence cannot re-alert for this many days. Activity accrued after the alert that crosses the floors on its own still goes out, as a "continued activity" escalation. 0 disables the cooldown (useful in testing). |
A user is flagged when a metric is over its absolute floor and over
multiplier × their baseline daily average. Both floors failing means
the user is skipped before any baseline query runs.
Bot detector fields¶
| Key | Default | UI control | Meaning |
|---|---|---|---|
botDetection |
true |
yes | Switch for the bot detector (the volume detector runs regardless). |
botMinEvents |
300 |
yes | Activity floor: users with fewer total audited events in the window are never bot-analysed. Also the volume floor inside the endpoint-hammering signal. |
botPeakPerMinute |
40 |
yes | Burst signal: any single minute containing at least this many requests. |
botBurstDeals |
100 |
yes | Agreement burst signal: this many different agreements opened (viewed, summarised or downloaded as PDF) inside a single minute. This signal flags the user on its own, and such users are analysed even when they are under botMinEvents. |
botSignalsRequired |
2 |
yes | How many independent signals must fire together before the user is flagged. The agreement burst signal is the one exception. |
botCadenceCV |
0.25 |
no | Metronomic-timing signal: coefficient of variation of inter-request gaps below this (humans are irregular; scripts are not). |
botCadenceSamples |
200 |
no | Minimum number of inter-request gaps before cadence is judged at all. |
botSequentialRun |
20 |
no | Enumeration signal: a run of this many ascending IDs against one endpoint. |
botActiveHours |
20 |
no | Never-sleeps signal: activity in this many distinct hours of the day. |
The four keys without a UI control exist only in the API defaults; a
site can still override them, but only by editing its stored
siteConfig record directly.
The six signals are: burst rate, agreement burst, metronomic cadence,
sequential-ID enumeration, never-sleeps hours, and endpoint hammering
(≥90% of at least botMinEvents requests against a single endpoint).
At the default botSignalsRequired of 2, one signal alone never flags
anyone, except the agreement burst, which is conclusive by itself.
Request timing is measured to the millisecond on audit records written from 11 November 2026. Older records are timed to the second, and requests that share a second are left out of the cadence calculation.
Tuning guidance¶
- Too many alerts: raise
multiplieror the floors (minDealViews/minDocDownloads); for bot noise, raisebotMinEventsorbotSignalsRequired. - Alerts for busy-but-legitimate screens: raise
botPeakPerMinute— dashboard pages that fire many API calls per click are the usual cause. - Suspected slow exfiltration: lower the floors and raise
windowHoursso slower activity accumulates into one window. - Alert emails include the exact reasons and numbers that fired, so the thresholds to adjust can be read straight off a false positive.
Burst limiter¶
security.burstLimiter counts, as it happens, how many different
agreements each user opens (agreement view, deal summary and agreement
PDF) per minute, hour and day, and how many agreement reads one sign-in
has in progress at once. The limits are monitor only: nothing is
blocked or slowed. The running counts are stored on each agreement
read's audit record under limiter (minute, hour, day,
concurrent, wouldBlock, reasons), and the first time a user passes
a limit in a window one audit record with event security.burstLimit
is written. These monitor records are not shown in the activity feed.
eBiz staff accounts are not counted.
| Key | Default | Meaning |
|---|---|---|
enabled |
true |
Switch for the whole burst limiter, including sign-out. |
perMinute |
30 |
Different agreements per user per minute before wouldBlock is recorded. |
perHour |
200 |
Different agreements per user per hour. |
perDay |
600 |
Different agreements per user per day. |
maxConcurrent |
6 |
Agreement reads in progress at once on one sign-in. |
signOut |
false |
When true, a user who reaches signOutPerMinute is signed out (see below). When false the same condition is only recorded, as limiter.wouldSignOut and an audit record titled "Agreement Burst (would sign out)". |
signOutPerMinute |
100 |
Different agreements in one minute that trigger the sign-out. |
canary |
true |
Switch for the canary agreement (see below). |
runLimit |
100 |
Endpoint run: different records requested in one unbroken run of requests to the same endpoint before it trips (see below). |
Every key has a control in the Automated Access section of the general settings page, below Suspicious Activity Alerts.
Sign-out. With signOut on, a user who reaches signOutPerMinute
is signed out everywhere: every sign-in they held at that moment stops
working, on every device, and the request that crossed the threshold is
refused. They are not suspended or locked and can sign in again
straight away. The sign-out is written to the audit trail as
"Signed Out: Agreement Burst" (event security.signedOut) and does
appear in the activity feed. Before switching it on, check
limiter.minute on recent audit records for any legitimate user or
integration that reads agreements at that rate.
Endpoint runs. This check covers every part of the platform, not
only agreements. For each user the limiter tracks how many requests in
a row have gone to the same endpoint with no other endpoint in between,
and how many different records those requests asked for. Opening a
record on screen always makes several different requests, so a person
never builds a long unbroken run; a script collecting tickets,
documents, companies or agreements one after another does. When a run
reaches runLimit different records it trips: with signOut on the
user is signed out everywhere and a "Signed Out: Automated Access"
record (event security.endpointRun) is written to the audit trail and
activity feed; with signOut off the record is titled "Automated
Access (would sign out)" and is kept out of the activity feed. Runs of
five or more requests are also noted on each audit record under run
(length, distinct). Repeating a request for the same record, or a
request that names no record (typing in a search box, paging a table),
does not add to the count. The presence heartbeat neither counts nor
breaks a run. Only record ids sent in the address or form fields are
counted, not ids sent inside a request body.
Canary agreement. The agreement list returned to the Agreements
browser carries one extra row that is not a real agreement. The
application removes it before any screen or export sees it, so no user
can open it by using the site. A request to view, summarise or
download that agreement can only come from something reading
agreement ids out of the raw list response. When that happens the user
is signed out everywhere at once (regardless of signOut), a
"Canary Agreement Opened" record (event security.canary) is written
to the audit trail and appears in the activity feed, and an email goes
to the suspicious activity recipients (suspiciousActivity.recipients,
falling back to the site's support addresses). The canary's id changes
per user and per day and always falls in the reserved range
7300000 to 7399999. eBiz staff accounts are never given a canary.
Role enforcement¶
security.enforceRoleAnnotations (boolean, default false) controls
server-side role gating of API handler actions. Actions declare the roles
they need with a requiresRole annotation, which is checked by an
interceptor (roleAspect) against the caller's roles.
- false (default) — dry-run. A caller lacking the required role is not blocked; the attempt is only logged (so the gating can be rolled out and reviewed before it takes effect). Any error while evaluating also fails open.
- true — enforced. A caller lacking the required role receives a
403and the action does not run.
Which actions carry a requiresRole annotation (and which do not yet) is
listed in handler role gating, generated from the
code. Role gating is the coarse "which roles may call this action" layer;
it is separate from the per-object ACL that decides which specific
records a caller may see.
What this is not¶
- Not a blocking mechanism — the monitor only alerts; it never locks accounts, throttles requests, or blocks traffic.
- Not the permissions system — it watches usage patterns, not access rights.
- Not the healthcheck's request statistics — the healthcheck dashboard charts aggregate traffic; this monitor judges individual users.