Security and data handling
The CLI follows the desktop app’s rules: your database passwords and data stay with you, the source is read-only, and production changes need a typed confirmation.
On this page
How files are protected
| Layer | How |
|---|---|
| Passphrase | Stretched with Argon2id (64 MiB of memory, 3 passes) and a random salt per file |
| Key share | 32 random bytes per file, held by the licensing service, encrypted at rest |
| File key | Derived with HKDF-SHA256 from the stretched passphrase and the key share |
| Encryption | AES-256-GCM, with the readable header bound to the encrypted part |
| Header | Signed by the licensing service with Ed25519 when the file is exported |
- Neither the passphrase nor the key share opens a file alone. A stolen file and passphrase are useless once the file is revoked.
- Changing the readable header breaks both its signature and decryption.
- Answers from the licensing service, including run tokens, are signed and checked by the CLI against a key built into it. The CLI only talks to
api.dbhydrate.com, and that can’t be changed. - Run tokens last five minutes, cover one run and echo a random value from the CLI, so an old answer can’t be replayed.
What our service stores
| Stored | Never stored |
|---|---|
| Each file’s ID, label, kind, engine, environments, seat, expiry and encrypted key share | Database passwords, passphrases, hosts, ports, user names or other connection details |
| Run metadata: time, action, engine, result, number of steps, CLI version, platform and approximate country | SQL, schema or object names, database names or any data |
| Seat leases while runs are active | Reports |
Run history is kept for 13 months and shown in your account.
Safeguards on every run
- The source database is always opened read-only (see database engines).
- A target marked read-only is refused for dry runs and apply.
applyneeds the target database’s name typed in--confirm-target, and the seat’s license key.- Cancelling a run rolls back uncommitted changes, removes any MySQL shadow database and releases the seat.
- Secrets come from environment variables, never from arguments, and never appear in logs or reports. Database error messages are cleaned of passwords before they are shown.
If a file or passphrase leaks
- Revoke the file in your dbHydrate account. It stops working immediately.
- If the file included a password, change that database password.
- If the license key leaked too, ask your account owner to replace the seat’s key.
- Export a new file with a new passphrase and update your CI secrets.
Limits of the protection
- Whoever has the file, the passphrase and a valid license can open it. Keep the passphrase in a different place from the file.
- A file that includes a password gives database access to anyone who can open it. Prefer files without a password for production.
- Every run needs the licensing service, so it is part of your pipeline’s availability.
Downloads
Windows downloads are code-signed. Linux downloads come with SHA-256 checksums in a signed checksum file. See install.