Database / BetterDB Interview questions
Why should you set BETTERDB_SSH_KEY_DIR in BetterDB Monitor?
Setting BETTERDB_SSH_KEY_DIR is what unlocks the "server file path" SSH key source, letting a connection reference a private key that already exists on the monitor server by path, instead of pasting the key contents inline every time.
Left unset, that option is disabled and only inline pasted keys work.
When it is set, any submitted path must resolve inside that directory, which is a deliberate safeguard: it stops the API from being coerced, through a crafted path, into reading arbitrary files elsewhere on the server's filesystem.
In practice this matters most for shared or multi-tenant deployments where you'd rather not trust every connection editor with an open-ended "read this file on the server" capability – scoping it to one directory keeps that surface small and auditable.
More Related questions...