Decrypt DBeaver's credentials-config.json file and display the output (a JSON string).
You can use this in one of three ways depending on your platform and shell:
- A Bash script that works on Linux, macOS and Windows. It requires
opensslandddto be inPATH. - A PowerShell module that exposes function
Show-DBeaver-Credential-Json(aliasdbeaver-creds). This does not requireopensslorddto function. - Windows only: A Batch script script equivalent to the Bash script and has the same requirements.
Place dbeaver-creds (or dbeaver-creds.bat) in PATH.
Install-Module -Name DBeaverCredsdbeaver-credsIf the credentials file cannot be found, the exit status will be > 0.
Show-DBeaver-Credential-Json
# or the alias:
dbeaver-credsRequirements:
- Bash
- GNU sed
- Perl
- Yarn
- curl
- cut
- grep
- tr
The decryption key is from the DBeaver source.
It can be converted to hexadecimal like so in Python:
import struct
as_hex = struct.pack('<16b', 0, 1, 2, etc).hex()update-key.sh demonstrates conversion using shell script.
yarn format: to format the project's files.yarn qa: Perform a QA check.yarn update-keyorupdate-key.sh: update the key indbeaver-creds.