gate probe drive: does the front door FAIL OPEN while kanidm restarts? — the controlled reproduction of #1680's /authz/gate leak, both a session-less and a signed-in caller across panel-apply #1686

Closed
opened 2026-09-21 13:37:38 +00:00 by ben · 3 comments
Owner

What

The controlled reproduction Ben asked for on #1680 ("run the reproduction drive first") before he rules on the loud-refuse guard: does the front door fail open in the window where it leaked forward_auth's /authz/gate URI to the Files upstream (#1672 fire 1)?

Recipe

IDSS_ROLES_PROOF=1
IDSS_ROLES_SERVICES=files
IDSS_ROLES_ADD_SERVICE=docs-editing
IDSS_GATE_PROBE=1

The gateway must be built from a commit carrying 5b910ef3 (the probe) and 672a61a4 (the front door's access log). Same shape as fire 1, so the same deploy sequence runs.

What the probe does (app/tests/e2e/fixtures/gateProbe.ts)

Across the whole panel-apply redeploy — the apply that restarts kanidm under a running Caddy + control plane — plus a 25 s tail, it requests /apps/files/ on files.<apex> every 150 ms from a SESSION-LESS client and from the signed-in panel browser's cookie jar, and rules each sample:

  • session-less → must be refused (302 to /authz/signin, 401, or the door's own 5xx). Any answer from the service behind the gate is fail-open and reds the gate-probe leg.
  • signed-in → the service's 404 on that path is leak (fire 1's symptom) — recorded, NOT a red.

Evidence to read, green or red

  • artifacts/gate-probe.json — every sample + the counts + the odd window.
  • artifacts/gate-probe-box-views.txt — read off the box before release: every /authz/ hit Nextcloud's nginx received, and kanidm's stop/start times.
  • the harvested Caddy journal (JSON access log).

A GREEN here means "no fail-open observed"; whether the leak REPRODUCED is read from counts.leak, not from the verdict. One apply is one window — if nothing odd shows, that is a finding too (the race is rarer than "every kanidm restart").

Gate

No fix rides this ticket. Any change to the forward_auth block, to what the gate admits or how it fails goes to Ben first (#1680).

<!-- rehearsal-target: rented-services --> <!-- rehearsal-confirm: 1 --> ## What The controlled reproduction Ben asked for on #1680 ("run the reproduction drive first") before he rules on the loud-refuse guard: does the front door **fail open** in the window where it leaked forward_auth's `/authz/gate` URI to the Files upstream (#1672 fire 1)? ## Recipe ``` IDSS_ROLES_PROOF=1 IDSS_ROLES_SERVICES=files IDSS_ROLES_ADD_SERVICE=docs-editing IDSS_GATE_PROBE=1 ``` The gateway must be built from a commit carrying `5b910ef3` (the probe) and `672a61a4` (the front door's access log). Same shape as fire 1, so the same deploy sequence runs. ## What the probe does (`app/tests/e2e/fixtures/gateProbe.ts`) Across the whole `panel-apply` redeploy — the apply that restarts kanidm under a running Caddy + control plane — plus a 25 s tail, it requests `/apps/files/` on `files.<apex>` every 150 ms from a SESSION-LESS client and from the signed-in panel browser's cookie jar, and rules each sample: - session-less → must be refused (302 to `/authz/signin`, 401, or the door's own 5xx). **Any answer from the service behind the gate is `fail-open` and reds the `gate-probe` leg.** - signed-in → the service's 404 on that path is `leak` (fire 1's symptom) — recorded, NOT a red. ## Evidence to read, green or red - `artifacts/gate-probe.json` — every sample + the counts + the odd window. - `artifacts/gate-probe-box-views.txt` — read off the box before release: every `/authz/` hit Nextcloud's nginx received, and kanidm's stop/start times. - the harvested Caddy journal (JSON access log). A GREEN here means "no fail-open observed"; whether the leak REPRODUCED is read from `counts.leak`, not from the verdict. One apply is one window — if nothing odd shows, that is a finding too (the race is rarer than "every kanidm restart"). ## Gate No fix rides this ticket. Any change to the forward_auth block, to what the gate admits or how it fails goes to Ben first (#1680).

gateway-image: snapshot advanced fcd6769 → 5b910ef3b029 by matou-dev-server-01 (#661 auto-rebuild — build.sh resolved the newest published agent ancestor, #654). The rented drive now boots current agent bits; no human build.sh run was needed. Rebuild timings: total 14m38s (provision 1m41s, nixos-install 2m25s, installer-base 8m22s, snapshot 1m58s) (#1139).

gateway-image: snapshot advanced `fcd6769` → `5b910ef3b029` by matou-dev-server-01 (#661 auto-rebuild — build.sh resolved the newest published agent ancestor, #654). The rented drive now boots current agent bits; no human build.sh run was needed. Rebuild timings: total 14m38s (provision 1m41s, nixos-install 2m25s, installer-base 8m22s, snapshot 1m58s) (#1139).

drive 20260921T133805Z GREEN end to end — 37/37 legs green — evidence (legs.json, durations, trace, host facts) in test-results/drive-rented-services/20260921T133805Z/ on the executor host; a representative screenshot is attached here if one was captured (#596). Closing per the standing instructions: the rented-services journey passes, #183 is ready to be boring.

drive `20260921T133805Z` GREEN end to end — 37/37 legs green — evidence (legs.json, durations, trace, host facts) in `test-results/drive-rented-services/20260921T133805Z/` on the executor host; a representative screenshot is attached here if one was captured (#596). Closing per the standing instructions: the rented-services journey passes, #183 is ready to be boring.
Author
Owner

Gate-probe drive #1686 — GREEN 37/37 (20260921T133805Z, 5b910ef3). Evidence: artifacts/gate-probe.json, gate-probe-box-views.txt.

No fail-open observed. 384 session-less requests to /apps/files/ on files.<apex>, one per 150 ms, from 14:21:48Z to 14:22:50Z — across panel-apply's redeploy and a 25 s tail. kanidm stopped at 14:22:20 and was serving again at 14:22:22. Every sample: 302 to /authz/signin with Server: Caddy, slowest 97 ms. None answered by the service, none a 5xx — the gate refuses a session-less caller without needing kanidm.

The leak did not reproduce. Nextcloud's nginx received ZERO /authz/ requests in the whole run (door legs included). With #1672 fire 2 that is two clean runs of the same deploy sequence against one leaking run (fire 1), so it is rarer than "every kanidm restart" and the cause is still unknown. In fire 1 the leak began ~10 s AFTER kanidm was back and one second after the operator's fresh OIDC sign-in, so "kanidm down" was probably never the trigger.

The probe's signed-in half was blind this run — all 384 signed-in samples were bounced to sign-in: the panel browser's session lives on the apex, and the service-host gate cookie is only minted on a first visit the probe never made. Fixed in 4bba74b7 (it walks the redirect once, baselines, and reports signedInLive). So this run says nothing either way about what a signed-in caller saw; nginx's empty /authz/ log is what rules the leak out.

Still Ben's: the loud-refuse guard. No gate change has landed.

**Gate-probe drive #1686 — GREEN 37/37** (`20260921T133805Z`, `5b910ef3`). Evidence: `artifacts/gate-probe.json`, `gate-probe-box-views.txt`. **No fail-open observed.** 384 session-less requests to `/apps/files/` on `files.<apex>`, one per 150 ms, from 14:21:48Z to 14:22:50Z — across panel-apply's redeploy and a 25 s tail. kanidm stopped at 14:22:20 and was serving again at 14:22:22. Every sample: `302` to `/authz/signin` with `Server: Caddy`, slowest 97 ms. None answered by the service, none a 5xx — the gate refuses a session-less caller without needing kanidm. **The leak did not reproduce.** Nextcloud's nginx received ZERO `/authz/` requests in the whole run (door legs included). With #1672 fire 2 that is two clean runs of the same deploy sequence against one leaking run (fire 1), so it is rarer than "every kanidm restart" and the cause is still unknown. In fire 1 the leak began ~10 s AFTER kanidm was back and one second after the operator's fresh OIDC sign-in, so "kanidm down" was probably never the trigger. **The probe's signed-in half was blind this run** — all 384 signed-in samples were bounced to sign-in: the panel browser's session lives on the apex, and the service-host gate cookie is only minted on a first visit the probe never made. Fixed in `4bba74b7` (it walks the redirect once, baselines, and reports `signedInLive`). So this run says nothing either way about what a signed-in caller saw; nginx's empty `/authz/` log is what rules the leak out. Still Ben's: the loud-refuse guard. No gate change has landed.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1686
No description provided.