Encrypt database password

To add extra security to your Confluence Data Center and Server instance, you can encrypt the database password that is stored in the confluence.cfg.xml file. You can choose to use a Base64 cipher, Algorithm cipher, or create your own cipher.   

Your Confluence instance needs a plain-text password to connect to the database. The configuration file will contain all the information needed to decrypt the password, so it's necessary to protect access to Confluence and database servers.

You can only encrypt your password if you're using a JDBC connection (not a JNDI datasource).

On this page:

Basic encryption

This method uses a Base64 cipher, which is simple obfuscation. It is a straightforward solution for users who don’t want to store database passwords in plain-text.

Basic encryption

Advanced encryption

This method allows you to choose an algorithm to encrypt a database password. It provides more security as you don't have to store the encrypted password anywhere in the configuration file, which makes it difficult for unauthorised parties to find and decrypt it.

Advanced encryption

Custom encryption

If you have special requirements for database password encryption, you can create your own encryption mechanism based on our examples.

Custom encryption

Last modified on May 30, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.