Configurable re-auth window

planned

Decide 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.

WindowFits
Every statementA production database you touch a handful of times a month. Each write is its own decision.
A few minutesA maintenance session: verify once, do the run of related work, and let it re-lock itself while you write up what you did.
Per sessionA 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:

UnlockCommandsStatus bar while open
Writes on a production connectionUnlock Production Writes for 1 Minute, 5 Minutes, or 15 Minutes, and Lock Production Writes NowPRODUCTION · 4:59, counting down
A read-only connectionUnlock Read-only Connection for 1 Minute, 5 Minutes, or 15 Minutes, and Lock Read-only Connection NowRead-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.

A window never survives the app. Unlock state is held in memory for the session only, it is never written to disk and never restored on the next launch. A production write unlock is also dropped when you disconnect. Quitting SQLly always re-locks everything, and verification windows are designed to work the same way.