Skip to content

antonio-petricca/dbeaver-password-decrypter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

dbeaver-password-decrypter

Introduction

This is a bash script that decrypts stored passwords from DBeaver configuration files and displays them along with their matching datasource names. DBeaver encrypts credentials for security, and this tool helps you retrieve them when needed.

The script automatically searches for DBeaver configuration files in your home directory, decrypts the credentials, and presents the connection information in a readable table format showing the connection name, folder, username, and password.

Pre-requisites

Before running this script, ensure you have the following installed on your system:

  • Bash: A Unix shell (standard on Linux/macOS).
  • jq: A lightweight command-line JSON processor.
  • openssl: A cryptography toolkit (usually pre-installed).

Usage

Basic Usage (Auto-detect configuration folder)

Simply run the script without any arguments, and it will automatically search for DBeaver configuration files:

./dbeaver-password-decrypter.sh

Specify Configuration Folder

If you know the location of your DBeaver configuration folder, you can provide it as an argument to skip the search:

./dbeaver-password-decrypter.sh /path/to/dbeaver/config/folder

If the script auto-detects the configuration folder, you'll first see:

Searching for a valid DBeaver configuration files folder...
Found configuration folder '/home/user/.local/share/DBeaverData/workspace6/General/.dbeaver'.
Use it as the first argument to avoid this search in the future.

The configuration folder should contain:

  • credentials-config.json : the encrypted credentials file.
  • data-sources.json : the data sources configuration file.

Notes

  • The script uses DBeaver's default encryption key to decrypt credentials.
  • It requires read access to DBeaver's configuration files (typically located in ~/.local/share/DBeaverData/workspace6/General/.dbeaver/).
  • If the configuration folder is found automatically, the script will display its location for future reference.

Example Output

When you run the script, you'll see output similar to this:

Configuration folder: /home/user/.local/share/DBeaverData/workspace6/General/.dbeaver

Folder       Connection Name          User Name  Password
---          ---                      ---        ---
Production   PostgreSQL - Production  admin      Sup3rS3cr3t!
Development  MySQL - Development      developer  dev_pass_123
Testing      Oracle - Testing         testuser   test@2024
Staging      MariaDB - Staging        dbuser     stage_pwd

Contact

For questions, bug reports, or feature requests, please use the GitHub Issues page.

Contributions are welcome via pull requests!

About

It is a bash script able to decrypt stored password showing the matching datasource name.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages