Basic database password encryption



アトラシアン コミュニティをご利用ください。


To add extra security to your Bamboo instance, you can encrypt the database password that is stored in the configuration file used by Bamboo to access your database. This method uses a Base64 cipher, which is a simple obfuscation. It’s recommended for users who don’t want to store passwords in plain text or have to meet specific requirements to encode them.

This solution is an obfuscation, which doesn’t assure real security. Bamboo still needs to use the plain text password to connect to your database, so the configuration will contain all the information needed to decrypt the password. An attacker could act like Bamboo to obtain the password. We recommend that you secure the server where Bamboo and the database reside.

On this page:


Back up the bamboo.cfg.xml file in a safe location away from your Bamboo server.

Encrypting your database password

To encrypt your database password, you'll need to:

Run the encryption tool

To start the encryption tool, run the following command from <bamboo-installation-directory>/tools/atlassian-password:

java -jar atlassian-secrets-cli.jar -config=db

This command accepts the following optional arguments:

  • --silent -s – limits logging to a minimum
  • --help -h – prints a help message with all parameters
  • --mode -m – defines what to do with the password, either encrypt or decrypt. If omitted, encrypt will be used.
  • --password -p – JSON object with required arguments. If omitted, you'll be asked to enter it. We recommend that you omit this parameter so your password is not stored in the history.

Example output

main DEBUG [db.config.password.DefaultCipherProvider] Initiate cipher provider class:
main DEBUG [password.ciphers.base64.Base64Cipher] Initiate Base64Cipher
main DEBUG [password.ciphers.base64.Base64Cipher] Encrypting data...
main DEBUG [password.ciphers.base64.Base64Cipher] Encryption done.
For Jira (...)
For Bamboo, set the following properties in bamboo.cfg.xml:
<property name="jdbc.password.decrypter.classname"></property>
<property name="hibernate.connection.password">YmFtYm9v</property>
and restart the instance.

Add the encrypted password to bamboo.cfg.xml

To add the encrypted password to the bamboo.cfg.xml file:

  1. In the bamboo.cfg.xml file, add the following tag:

    <property name="jdbc.password.decrypter.classname"></property>
  2. Replace the content of the <property name="hibernate.connection.password"> tag with the encrypted password. For example:

    <property name="hibernate.connection.password">YmFtYm9v</property>
  3. Bamboo を再起動します。

Decrypting the database password

To decrypt the password, run the encryption tool with the -m decrypt parameter:

java -jar atlassian-secrets-cli.jar -config=db -m decrypt

When asked for a password, provide the encrypted password from your bamboo.cfg.xml.

最終更新日: 2024 年 1 月 17 日


Powered by Confluence and Scroll Viewport.