Encrypt database password

To add extra security to your Confluence Data Center 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.

Learn more about 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.

Learn more about advanced encryption

AWS Secrets Manager

AWS Secrets Manager provides a high-level secure storage option for your database credentials. This service retrieves credentials through a runtime call, eliminating hard-coded credentials, such as keys and tokens, altogether.

Learn more about AWS Secrets Manager for encryption

Custom encryption

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

Learn more about custom encryption

Last modified on Oct 13, 2023

Was this helpful?

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