Configurable re-auth window
plannedDecide whether verification happens for every statement, every session, or somewhere comfortably in between.
Choose how long one verification stays good for. Ask on every statement for the targets where that is proportionate, or once per session - or for a few minutes - where it is not.
Planned. There is no re-auth window setting in SQLly yet, because the identity prompts it would time are still being built. The connect and write switches are stored and edited today. This page describes the design, and the timed unlock it is modeled on, which ships today.
The trade-off, stated plainly
A shorter window is stronger and more annoying; a longer one is the opposite. The failure mode of a too-short window is not “more security” - it is a prompt you learn to approve without reading, which is worse than no prompt at all. Pick the longest window you would still be comfortable explaining.
| Window | Fits |
|---|---|
| Every statement | A production database you touch a handful of times a month. Each write is its own decision. |
| A few minutes | A maintenance session: verify once, do the run of related work, and let it re-lock itself while you write up what you did. |
| Per session | A machine you trust, where the gate is mostly about not connecting to the wrong thing in the first place. |
The model it follows: timed unlocks
SQLly already has two timed unlocks, and the re-auth window is designed to behave the same way. Both are in the command palette:
| Unlock | Commands | Status bar while open |
|---|---|---|
| Writes on a production connection | Unlock Production Writes for 1 Minute, 5 Minutes, or 15 Minutes, and Lock Production Writes Now | PRODUCTION · 4:59, counting down |
| A read-only connection | Unlock Read-only Connection for 1 Minute, 5 Minutes, or 15 Minutes, and Lock Read-only Connection Now | Read-only unlocked 4:59 |
Each unlock starts a fixed window. When it runs out, the connection locks again by itself, with no prompt and nothing to remember. You can also lock it early. Even while production writes are unlocked, every data-changing batch still asks you to confirm the exact SQL. An unlock widens what you may run, not what you get to skip reading.
The re-auth window applies the same idea to identity: one verification opens a window, the status bar shows it, and it closes on its own.