Base64 encoding
We don't recommend Base64 encoding in production for securing secrets because it doesn't provide encryption, and therefore cannot guarantee sufficient data protection.
In this method, we'll use Base64 encoding, which is a simple obfuscation.
Step 1. Encrypting the password
- Go to
<Jira-installation-directory>/bin
. Run the following command to encrypt your password. Additionally, you can use optional arguments described below.
java -cp "./*" com.atlassian.secrets.cli.db.DbCipherTool
Step 2. Adding the encrypted password to dbconfig.xml
- Go to Jira home directory and back up the
dbconfig.xml
file. Move the backup to a safe place outside of your Jira server. - Edit the
dbconfig.xml
file. Replace the
<password>
tag with the tags generated by CLI. For example:<atlassian-password-cipher-provider>com.atlassian.secrets.store.base64.Base64SecretStore</atlassian-password-cipher-provider> <password>put-your-obfuscated-password-here</password>
- Restart Jira.
Decrypting the password
To decrypt the password, extend the command with the -m decrypt parameter:
java -cp "./*" com.atlassian.secrets.cli.db.DbCipherTool -m decrypt
When asked for a password, provide the encrypted one from your dbconfig.xml
file.