Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cf26cce
Pace the cost-bearing monitoring:read GETs per actor
wshallwshall Nov 23, 2026
2d1c191
Fix round-1 review findings on the monitoring-read pace
wshallwshall Nov 23, 2026
ec867ed
Fix round-2 review findings on the monitoring-read pace
wshallwshall Nov 23, 2026
0ff96d4
State what each monitoring-read paced route costs; add the changelog …
wshallwshall Nov 23, 2026
bbc1723
Merge remote-tracking branch 'origin/main' into w8-1191
wshallwshall Nov 23, 2026
30adb2a
Monitoring-read pacing: correct the nine false statements the Lander'…
wshallwshall Nov 23, 2026
b8dc537
Monitoring-read pacing: repair the review round's false statements
wshallwshall Nov 23, 2026
bfd5ee1
Monitoring-read pacing: repair review round 2's statements
wshallwshall Nov 23, 2026
8c3cf7f
Monitoring-read pacing: an out-of-scope reveal is denied before the pace
wshallwshall Nov 23, 2026
3983f55
Monitoring-read pacing: hold the reveal's 429, not its charge
wshallwshall Nov 23, 2026
d50304f
Monitoring-read pacing: log a held 429 only when it is raised
wshallwshall Nov 23, 2026
5a0ad19
Monitoring-read pacing: a reveal's permission denial and an invalid r…
wshallwshall Nov 23, 2026
5f8eb47
Monitoring-read pacing: correct the review round's text
wshallwshall Nov 23, 2026
c7c4959
Answer the 3167 hold: new-address refusal before the held 429, contro…
wshallwshall Nov 23, 2026
e613264
Fix the review round's text findings on the 3167 hold fix
wshallwshall Nov 23, 2026
2bb1383
Over-budget reveal refused at the hop or a new address writes the thr…
wshallwshall Nov 23, 2026
a2a1add
Fix the review round's text findings on the throttled-row fix
wshallwshall Nov 23, 2026
9576848
The deferred throttled row records the 403 and the reason it answered
wshallwshall Nov 23, 2026
2786d8b
Fix the review round's text findings on the answered-status row
wshallwshall Nov 23, 2026
2cdc453
Merge remote-tracking branch 'origin/main' into fix-3167-a6e9
wshallwshall Nov 24, 2026
a452e58
Answer the restated hold on PR 3167: restore "at least", scope the ro…
wshallwshall Nov 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions changelog.d/1191-monitoring-read-pace.security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- **Six `monitoring:read` GETs are paced per account.** `GET /graph/edges`, `/status`, `/stats`,
`/metrics`, `/metrics/history` and `/connections` share one budget per account: past 600 reads per
60 s across the six, the shipped default of the new `[auth].monitoring_read_rate_limit_*`
settings, a read is answered 429 with a `Retry-After`. The budget is per API process, so N engine
shards multiply it by N; the all-accounts count ships off. The web console's in-process reads of
the same handlers are not charged, and neither are at least `/ws/stats`, `/events`,
`/connections/{name}/events` and `/config/provenance`. The key and the basis of the default are in
[SECURITY.md](../docs/SECURITY.md), *Monitoring-read pacing*. (vault `BACKLOG #1191`)
6 changes: 5 additions & 1 deletion docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,10 @@ document ([SECURITY-DOCS-POLICY.md](SECURITY-DOCS-POLICY.md)).
| `phi_read_rate_limit_per_actor` | int | 120 | max PHI reads per user per window (generous — clears console/human use; `0` disables this dimension) |
| `phi_read_rate_limit_global` | int | 0 | max PHI reads across all users per window (`0` = off) |
| `phi_read_rate_limit_window_seconds` | float | 60 | sliding-window length |
| `monitoring_read_rate_limit_enabled` | bool | `true` | per-actor pace on six `monitoring:read` GETs, one budget per account per API process (vault BACKLOG #1191, ASVS 15.2.2), charged at admission by `require_monitoring_read`; the routes, the key and the basis of the default are in [SECURITY.md](SECURITY.md), *Monitoring-read pacing* |
| `monitoring_read_rate_limit_per_actor` | int | 600 | max monitoring reads per user per window (`0` disables this dimension) |
| `monitoring_read_rate_limit_global` | int | 0 | max monitoring reads across all users per window (`0` = off) |
| `monitoring_read_rate_limit_window_seconds` | float | 60 | sliding-window length; must be above `0` |
| `admin_write_rate_limit_enabled` | bool | `true` | per-actor anti-automation pacing on the **state-changing admin surface** (ASVS 2.4.2) — **NON-GET only**, charged from one per-actor bucket by `require_step_up`, `require_step_up_action` and `require_paced`. Charged on the `/ui` surface too, by `require_ui` -- the console reaches the handlers in-process, so it re-applies the floor rather than inheriting it ([BACKLOG #287](BACKLOG.md)) |
| `admin_write_rate_limit_per_actor` | int | 12 | max state-changing admin writes per actor per window (`0` disables this dimension; a negative value is refused at load); there is deliberately **no global arm** — one operator's bulk work must never throttle another's |
| `admin_write_rate_limit_window_seconds` | float | 15.0 | sliding-window length, above 0. The default is a **provisional** human-timing floor ([BACKLOG #287](BACKLOG.md)). A script making more than 12 admin writes in 15 s is refused. Over budget → `429` + a `Retry-After` naming the caller's own wait, the same on the JSON API and the `/ui` console ([SECURITY.md](SECURITY.md), *The write floor's `Retry-After` is the actor's real wait*), refused before any further work |
Expand All @@ -840,7 +844,7 @@ document ([SECURITY-DOCS-POLICY.md](SECURITY-DOCS-POLICY.md)).
| `totp_skew_steps` | int | `0` | TOTP clock-skew tolerance in 30 s steps applied at verify time (BACKLOG #187, ASVS 6.5.5). **Default `0` = STRICT: only the current 30 s step verifies** (tightest replay window — a captured code is valid at most for the rest of its own step). Set `1` (or `2`) — the documented opt-out — to restore RFC-6238 network-delay / clock-drift tolerance (`1` also accepts the immediately-prior and the fast-clock-clamped next step, i.e. the historical ±1 behaviour; the forward step is clamped to the current step so it never advances the single-use high-water mark). Range 0–2. |
| `mfa_recovery_code_count` | int | 10 | single-use recovery codes minted at TOTP enrollment (the lost-authenticator escape hatch; `0` disables them, leaving an admin reset as the only recovery path). Range 0–50. |
| `mfa_verify_min_elapsed_seconds` | float | 1.0 | the least time between sign-in and the second factor ([BACKLOG #2301](BACKLOG.md), ASVS 2.4.2). It covers a TOTP code, a recovery code and a passkey on an MFA-pending session. It also covers the two enrolment legs, `POST /me/mfa/confirm` and a passkey registration, when they would satisfy a pending session ([BACKLOG #2389](BACKLOG.md)). One that arrives sooner after the session was minted gets the leg's ordinary failure, such as `401 invalid code` on `POST /auth/mfa-verify` and `400 invalid code` on `POST /me/mfa/confirm`. The response says nothing about timing, though a caller that knows its proof is good, or resubmits it, can tell the floor fired. It is audited with `reason=too_early`, charges no lockout and spends no code or passkey challenge. On an enrolment it runs from sign-in, not from the enrolment's begin. [SECURITY.md](SECURITY.md), *Two second steps have a time floor too*, lists at least the legs' answers and the timing tells, kept or left open, with the reasons ([BACKLOG #3194](BACKLOG.md)). Under the default `require_action_step_up`, the confirm route has already spent its single-use password step-up, as it does for a wrong code. A session whose factor is already satisfied, or that owes none, is not floored. The default is a **provisional** human-timing floor from the keystroke-level model, derived in the comment on the setting. `0` turns it off |
| `admin_new_ip_step_up` | bool | `true` | admin-interface contextual-risk signal (WP-L3-13, ASVS 8.4.2): when on, a step-up (sensitive admin) request from a client IP the session has not verified from emits an `auth.new_address_reverify_required` audit + notice and **forces a fresh step-up** (a re-verify from that address clears it). Step-up-forcing only — never changes an RBAC decision. Since vault BACKLOG #2620 at least the PHI reads and the paced writes refuse a new address the same way, and the base gate never asks; [SECURITY.md](SECURITY.md#administrative-interface-defense-in-depth-wp-l3-13-asvs-842) names the gates. The audit + notice are debounced and capped per session in each engine process, as [SECURITY.md](SECURITY.md#administrative-interface-defense-in-depth-wp-l3-13-asvs-842) states. **On by default** since BACKLOG #288, and a no-op on loopback (`127.0.0.1` and `::1` are treated as one host). Setting it `false` is a **loosening** once auth is on — `security_loosenings()` names it; see [SECURITY-LOOSENING.md](SECURITY-LOOSENING.md). See [SECURITY.md](SECURITY.md) "Administrative-interface defense-in-depth". |
| `admin_new_ip_step_up` | bool | `true` | admin-interface contextual-risk signal (WP-L3-13, ASVS 8.4.2): when on, a step-up (sensitive admin) request from a client IP the session has not verified from emits an `auth.new_address_reverify_required` audit + notice and **forces a fresh step-up** (a re-verify from that address clears it). Step-up-forcing only — never changes an RBAC decision. Since vault BACKLOG #2620 at least the PHI reads and the paced writes refuse a new address the same way, and the base gate (`require`) and `require_monitoring_read` never ask; [SECURITY.md](SECURITY.md#administrative-interface-defense-in-depth-wp-l3-13-asvs-842) names the gates. The audit + notice are debounced and capped per session in each engine process, as [SECURITY.md](SECURITY.md#administrative-interface-defense-in-depth-wp-l3-13-asvs-842) states. **On by default** since BACKLOG #288, and a no-op on loopback (`127.0.0.1` and `::1` are treated as one host). Setting it `false` is a **loosening** once auth is on — `security_loosenings()` names it; see [SECURITY-LOOSENING.md](SECURITY-LOOSENING.md). See [SECURITY.md](SECURITY.md) "Administrative-interface defense-in-depth". |
| `ad_enabled` | bool | `false` | **directory bind capability**: the engine binds to AD as the `ad_bind_dn` service account to resolve principals and their groups. Windows SSO (`kerberos_enabled`), OIDC (`oidc_enabled`) and the session reconciler each need it. It does **not** turn on a directory-password sign-in: that pathway is retired (BACKLOG #1137), and `POST /auth/login` with `provider=ad` is refused and audited. A bind **as the user** survives only as the step-up re-bind at `POST /me/reauth` and `POST /ui/reauth` |
| `ad_server` | str | — | e.g. `ldaps://dc1.example.com:636` (required when `ad_enabled`) |
| `ad_domain` | str | — | UPN suffix, e.g. `example.com` |
Expand Down
25 changes: 24 additions & 1 deletion docs/SECURITY-LOOSENING.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ Earlier versions of this guide called this an open owner question. The 2026-10-2
| | `[auth].login_rate_limit_enabled`, `login_rate_limit_per_ip`, `login_rate_limit_global`, `login_rate_limit_window_seconds` | `true` / `10` / `60` / `60` s (`false`, a count of `0` or above its default, or a window below `60` s is named, and `0` or a window of `0` or less turns a limit off) |
| | `[auth].lockout_minutes`, `lockout_threshold`, `lockout_max_minutes` | `15` / `5` / `1440` (minutes below `15` or a ceiling below `1440` is named, and so is a threshold above `5`; minutes of `0` or less means no lock ever holds) |
| | `[auth].phi_read_rate_limit_enabled`, `phi_read_rate_limit_per_actor`, `phi_read_rate_limit_window_seconds` | `true` / `120` / `60` s (`false`, a count of `0` or above `120`, or a window below `60` s) |
| | `[auth].monitoring_read_rate_limit_enabled`, `monitoring_read_rate_limit_per_actor`, `monitoring_read_rate_limit_window_seconds` | `true` / `600` / `60` s (`false`, a count of `0` or above `600`, or a window below `60` s) |
| | `[auth].admin_write_rate_limit_enabled`, `admin_write_rate_limit_per_actor`, `admin_write_rate_limit_window_seconds`, `admin_write_min_interval_seconds` | `true` / `12` / `15` s / `0.15` s (`false`, a count of `0` or above `12`, a window below `15` s, or a gap below `0.15` s) |
| | `[auth].mfa_verify_min_elapsed_seconds`, `oidc_callback_min_elapsed_seconds` | `1.0` s / `1.0` s (*conditional* — the second a loosening only with OIDC on; a floor below `1.0` s, and `0` turns it off) |
| | `[auth].oidc_callback_floor_exempt_amr` | `[]` (*conditional* — a loosening only with OIDC on and the callback floor on; any value listed) |
Expand Down Expand Up @@ -271,7 +272,8 @@ Earlier versions of this guide called this an open owner question. The 2026-10-2
`[auth].ad_connect_timeout`, `[auth].ad_receive_timeout`,
`[auth].ad_group_search_deadline`, `[auth].admin_new_ip_step_up`, `[auth].require_action_step_up`, the three
`[auth].password_check_*` keys, the four `[auth].login_rate_limit_*` keys, the three `[auth].lockout_*`
keys, the three named `[auth].phi_read_rate_limit_*` keys, the four `[auth].admin_write_*` keys,
keys, the three named `[auth].phi_read_rate_limit_*` keys, the three named
`[auth].monitoring_read_rate_limit_*` keys, the four `[auth].admin_write_*` keys,
`[auth].mfa_verify_min_elapsed_seconds`, `[auth].oidc_callback_min_elapsed_seconds`,
`[auth].oidc_callback_floor_exempt_amr`,
`[auth].max_sessions_per_user`, `[auth].oidc_flow_cache_max`,
Expand Down Expand Up @@ -1166,6 +1168,27 @@ count is above `0` (vault BACKLOG #2613).
`[security].allowed_client_networks`, and review the PHI-access audit rows.
- **Reversible:** yes, immediately — restore the default (or delete the line) and restart.

### `[auth].monitoring_read_rate_limit_*` looser than its default — monitoring reads go less paced
> No sign-in condition applies (vault BACKLOG #1191, ASVS 15.2.2). Named:
> `monitoring_read_rate_limit_enabled = false`; a `monitoring_read_rate_limit_window_seconds` below
> `60` s; a `monitoring_read_rate_limit_per_actor` of `0` (off) or above `600`. The window cannot be
> `0` or less (the load refuses it). With the limiter off, its parts are not named again.
> `monitoring_read_rate_limit_global` ships **off** (`0`), so no value of it is looser than the
> default and it is never named.
- **What you lose:** the per-account pace on six `monitoring:read` GETs of the JSON API
([SECURITY.md](SECURITY.md), *Monitoring-read pacing*, names them). One signed-in account can make
the engine rebuild the wiring graph and scan the store through those routes faster, up to as fast
as it answers. With the pace on, some of that work stays reachable unpaced: the `/ws/stats`
socket runs the outbox counts on every frame, and where the web console is served
(`[security].serve_web_console` on) that socket also runs the `GET /connections` dashboard read,
and the console's in-process reads reach the paced handlers uncharged. That section, *What it
does not charge*, says how.
- **When acceptable:** a monitoring tool on one known account that polls faster than the default
allows, on a host no untrusted client can reach. Prefer a modest raise to turning it off.
- **Compensating controls:** keep sessions short, and restrict who reaches the API with
`[security].allowed_client_networks`.
- **Reversible:** yes, immediately — restore the default (or delete the line) and restart.

### `[auth].admin_write_*` looser than its default — state-changing admin actions go less paced
> No sign-in condition applies ([BACKLOG #1131](BACKLOG.md), ASVS 2.4.2). Named:
> `admin_write_rate_limit_enabled = false`; an `admin_write_rate_limit_window_seconds` below `15` s; an
Expand Down
Loading
Loading