Marc-André Bombeck
0fc83cb0a1
fix(auth): ask for a fresh proof before the record or a credential to it leaves
...
Exporting the whole record, making a clinician share link, minting a token,
and the admin backup download, upload and restore, data wipe and password
reset ran on a live session alone. The plaintext full backup did, while the
encrypted one beside it asked for a second factor. Whoever held a stolen
session could take the record, or leave behind a credential that outlives
the session.
These now go through one gate, requireRecentProof (assertRecentCookieProof
for the routes that resolve their caller themselves). A browser session
passes after a sign-in or re-proof within five minutes: a second factor on
an account that has one, otherwise the password or a passkey. The refusal is
401 auth.reproof.required with meta.methods, and the web opens the re-proof
dialog, posts the proof to the new POST /api/auth/reproof and retries. A
password proof stamps the new Session.reproofAt (migration 0359), never
mfaVerifiedAt, so it cannot stand in for a second factor anywhere.
On Bearer, the full backup asks for an X-Step-Up elevation; the encrypted
export asks for a second-factor elevation on an account that has one. Share
links and connector tokens keep taking the token alone, because the shipped
app calls them without an elevation and reads a 401 there as a dead
session; the guard test names them.
Key rotation keeps its stricter second-factor gate.
2026-09-26 19:54:38 +02:00
..
2026-09-26 15:21:42 +02:00
2026-09-26 01:49:02 +02:00
2026-09-24 07:49:14 +02:00
2026-08-06 18:54:20 +02:00
2026-08-08 01:05:31 +02:00
2026-09-24 11:05:59 +02:00
2026-09-24 10:16:53 +02:00
2026-09-24 09:29:00 +02:00
2026-07-26 22:27:48 +02:00
2026-09-24 12:11:14 +02:00
2026-08-14 02:34:40 +02:00
2026-09-26 16:31:03 +02:00
2026-09-10 00:37:22 +02:00
2026-09-09 22:39:39 +02:00
2026-09-25 07:39:06 +02:00
2026-09-25 07:39:06 +02:00
2026-09-25 22:35:11 +02:00
2026-09-05 16:22:39 +02:00
2026-08-13 06:16:45 +02:00
2026-09-11 12:37:54 +02:00
2026-09-03 05:09:00 +02:00
2026-09-03 02:13:02 +02:00
2026-09-24 12:20:14 +02:00
2026-09-09 19:42:27 +02:00
2026-08-01 10:45:24 +02:00
2026-08-02 16:21:19 +02:00
2026-08-13 18:48:10 +02:00
2026-09-03 01:47:52 +02:00
2026-09-09 23:03:38 +02:00
2026-08-14 09:56:45 +02:00
2026-09-16 13:05:14 +02:00
2026-09-05 17:06:34 +02:00
2026-09-24 08:06:47 +02:00
2026-09-03 01:42:16 +02:00
2026-09-24 09:19:36 +02:00
2026-08-24 02:00:55 +02:00
2026-08-13 06:16:45 +02:00
2026-08-23 17:38:14 +02:00
2026-08-05 23:03:17 +02:00
2026-09-25 08:11:42 +02:00
2026-09-10 11:16:55 +02:00
2026-08-26 20:00:44 +09:00
2026-09-15 14:39:09 +02:00
2026-08-02 16:21:19 +02:00
2026-08-02 16:49:47 +02:00
2026-09-26 10:01:27 +02:00
2026-09-10 08:31:44 +02:00
2026-08-02 16:21:19 +02:00
2026-09-26 19:54:38 +02:00
2026-09-24 10:52:04 +02:00
2026-09-03 05:49:18 +02:00
2026-08-06 05:44:41 +02:00
2026-08-06 05:23:38 +02:00
2026-08-30 14:16:33 +02:00
2026-08-02 16:21:19 +02:00
2026-08-02 16:21:19 +02:00
2026-09-10 15:47:22 +02:00
2026-07-25 16:23:58 +02:00
2026-09-24 09:06:22 +02:00
2026-09-10 05:25:30 +02:00
2026-08-26 16:42:45 +09:00
2026-08-04 14:55:32 +02:00
2026-09-01 21:00:12 +02:00
2026-07-28 21:05:42 +02:00
2026-09-11 12:38:31 +02:00
2026-08-02 16:21:19 +02:00
2026-09-02 10:44:04 +02:00
2026-09-10 07:26:32 +02:00
2026-08-26 16:42:45 +09:00
2026-08-07 05:43:06 +02:00
2026-09-13 14:49:56 +02:00
2026-07-28 21:11:43 +02:00
2026-09-02 12:08:38 +02:00
2026-09-25 08:10:06 +02:00
2026-09-25 10:03:08 +02:00
2026-08-02 16:21:19 +02:00
2026-08-02 16:21:19 +02:00
2026-09-10 12:14:14 +02:00
2026-08-08 07:14:04 +02:00
2026-08-08 15:30:38 +02:00
2026-08-26 16:42:45 +09:00
2026-07-31 11:08:06 +02:00
2026-07-31 09:07:50 +02:00
2026-08-06 13:46:42 +02:00
2026-08-07 08:10:48 +02:00
2026-09-10 06:37:56 +02:00
2026-08-23 14:06:52 +02:00
2026-09-10 12:14:14 +02:00
2026-08-13 19:11:57 +02:00
2026-07-26 14:37:57 +02:00
2026-09-11 14:36:58 +02:00
2026-09-11 11:03:04 +02:00
2026-09-26 16:31:03 +02:00
2026-08-13 12:08:59 +02:00
2026-06-10 11:00:26 +02:00
2026-09-11 10:57:42 +02:00
2026-07-07 18:43:13 +02:00
2026-07-19 13:40:03 +02:00
2026-09-11 09:09:46 +02:00
2026-09-26 16:31:03 +02:00
2026-09-15 14:06:27 +02:00
2026-07-20 00:40:20 +02:00
2026-09-13 14:00:11 +02:00
2026-07-19 10:59:40 +02:00
2026-05-15 07:35:05 +02:00
2026-08-22 10:55:40 +02:00
2026-08-23 14:06:37 +02:00
2026-05-16 19:46:43 +02:00
2026-07-21 00:05:03 +02:00
2026-08-07 02:26:29 +02:00
2026-09-26 19:54:38 +02:00
2026-09-24 10:57:45 +02:00
2026-08-06 23:04:29 +02:00
2026-08-06 19:10:02 +02:00
2026-08-06 20:48:50 +02:00
2026-09-10 00:02:03 +02:00
2026-09-11 10:54:56 +02:00
2026-08-06 03:40:13 +02:00
2026-08-26 16:42:45 +09:00
2026-09-10 08:39:09 +02:00
2026-08-02 16:21:19 +02:00
2026-09-25 09:17:25 +02:00
2026-07-30 11:55:16 +02:00
2026-09-13 14:45:31 +02:00
2026-09-11 09:51:32 +02:00
2026-09-25 08:11:42 +02:00
2026-09-10 01:09:50 +02:00
2026-08-07 06:11:36 +02:00
2026-08-26 20:00:44 +09:00
2026-09-10 11:02:32 +02:00
2026-08-07 05:11:02 +02:00
2026-08-07 05:11:02 +02:00
2026-08-08 21:20:57 +02:00
2026-08-05 23:58:18 +02:00
2026-09-25 21:55:14 +02:00
2026-09-26 19:54:38 +02:00
2026-09-25 09:15:18 +02:00
2026-07-29 13:37:20 +02:00
2026-07-27 16:10:30 +02:00
2026-09-03 02:07:29 +02:00
2026-09-09 23:29:00 +02:00
2026-09-09 22:47:31 +02:00
2026-08-14 09:46:48 +02:00
2026-09-24 11:05:59 +02:00
2026-09-25 07:39:07 +02:00
2026-09-26 10:01:04 +02:00
2026-09-24 09:22:50 +02:00
2026-08-02 16:21:19 +02:00
2026-09-25 07:39:06 +02:00
2026-08-07 21:40:41 +02:00
2026-09-10 08:35:35 +02:00