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.
To encrypt your database password:
Step 1: Encrypt your password:
<Bamboo-installation-directory>/tools/atlassian-password
に移動します。次のコマンドを実行してパスワードを暗号化します。以下に示すオプションの引数を使用することもできます。
java -cp "./*" com.atlassian.db.config.password.tools.CipherTool
Step 2: Add the encrypted password to bamboo.cfg.xml
:
Go to Bamboo home directory and back up the
bamboo.cfg.xml
file. Move the backup to a safe place outside of your Bamboo server.Edit the
bamboo.cfg.xml
by adding the following tag:<property name="jdbc.password.decrypter.classname">com.atlassian.db.config.password.ciphers.base64.Base64Cipher</property>
Replace content of the
<property name="hibernate.connection.password">
tag with the password encrypted by CLI. For example:<property name="hibernate.connection.password">YmFtYm9v</property>
- Bamboo を再起動します。
To decrypt your database password:
To decrypt the password, extend the command with the -m decrypt parameter:
java -cp "./*" com.atlassian.db.config.password.tools.CipherTool -m decrypt
パスワードを求められたら、bamboo.cfg.xml
ファイルから暗号化されたパスワードを指定します。