Credential storage

Where passwords are stored, how launch profiles and managed trust stores work, and TLS trust per engine.

Secrets are stored in the operating system’s credential store or held in memory for the session. They are not written to JSON, command arguments, environment variables, or logs.

Connection passwords

Saving a connection profile writes the password to the platform store: Keychain on macOS, Credential Manager on Windows. The profile itself records everything except the secret.

If the OS store is missing, connection passwords fall back to an in-memory store for the session, with a line in the startup log rather than a dialog. Trust-store passwords never take that fallback. Lock credentials in the command palette (Ctrl/Cmd+K) clears the unlocked session cache; it does not delete the OS secret.

TLS trust, per engine

  • PostgreSQL: verified TLS keeps pgjdbc’s normal trust and client-certificate behavior.
  • MySQL and SQL Server: normal JVM trust by default.
  • Oracle: verified TCPS uses an Oracle wallet.
  • Db2: normal JVM trust by default. SSL is on with hostname verification, or off. There is no wallet.

Managed trust stores

Managed installations can load a PKCS12 trust store at startup with a launch profile, without putting its path or password in a saved connection:

safe-db --launch-profile /absolute/path/to/production.json

The profile is read before JDBC, the credential session, or the data directory initializes; an invalid profile stops startup. The profile records only a password source (a platform credential reference or a protected password file), never the password itself. For verified PostgreSQL, MySQL, SQL Server, and Db2 connections, launch profiles are the only custom trust-store path. The product repository covers the PKCS12 templates and helper scripts.

Import only independently verified CA certificates, never private keys, and restart after changing the profile, store, or password.

safe-db is proudly opensource.

GitHub