Commit 055ece5
committed
fix(core): the auth-gate allow-list matches at a mount boundary
`isAuthGateAllowlisted` decides which paths are exempt from the ADR-0069
authentication-policy gate — the gate that holds a session with an expired
password or a required MFA enrollment away from protected resources. It
matched with two UNANCHORED tests: `path.includes('/auth/')` at any position,
and an `endsWith` test over five suffixes at any depth. A path segment whose
VALUE merely spelled one of those tokens therefore carried the exemption, and
object names and record ids are tenant-controlled.
Both seams hand the predicate a data-plane path directly — the dispatcher
passes `cleanPath`, REST passes `req.path` — so these were reachable requests.
Measured on the built package before the repair: `/data/auth/123`,
`/meta/auth/objects`, `/data/x/health` and `/data/xyz/me/apps` were exempt,
with `/auth/me` exempt and `/data/contacts/1` gated as controls.
The path is read as segments now, and every test is anchored to a mount base
(`/api/v1`, `/api`, or the empty base the dispatcher sees) plus at most one
environment scope immediately after it — the scoped spelling reaches the
predicate because the dispatcher evaluates the gate before its scoped-URL
strip. `/auth/…` at that position stays exempt; the five bootstrap reads are
exact routes there instead of suffixes.
Only exemptions are removed: over a generated corpus of 111,152 paths, newly
exempt = 0 and 25,979 stopped being exempt. That subset check is kept as a
test with the pre-anchoring predicate transcribed beside it, so a later
widening cannot arrive quietly.
The platform-checklist citation that named the deleted `ALLOW_SUFFIXES` is
re-authored onto the successor symbol rather than dropped, and the REST
fault-window measurement pin that recorded the over-broad answer is re-aimed
in place with its superseded text quoted, per that file's own instruction.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XTBcV7zZHmokdyQgXjbyEU1 parent 96537da commit 055ece5
2 files changed
Lines changed: 14 additions & 1 deletion
File tree
- .changeset
- docs/qa/platform-checklist/areas
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2599 | 2599 | | |
2600 | 2600 | | |
2601 | 2601 | | |
2602 | | - | |
| 2602 | + | |
2603 | 2603 | | |
2604 | 2604 | | |
2605 | 2605 | | |
| |||
0 commit comments