Secure a database password
Database Configuration
- Database JDBC Drivers
- Database Setup for Oracle
- Database Setup for PostgreSQL
- Database Setup for SQL Server
- Database Setup For MySQL
- Embedded H2 Database
- Migrating to Another Database
- Configuring Database Character Encoding
- Configuring database query timeout
- Surviving Database Connection Closures
- Configuring a datasource connection
- Configuring Confluence Data Center to work with Amazon Aurora
- Secure a database password
On this page
In this section
Related content
- No related content found
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).
The solutions outlined below provide a level of protection for encrypting database values, but do not offer complete security. The configuration files will still contain the necessary data to decrypt the values, which means that an attacker with access to these files could potentially decrypt the property values.
These approaches are intended to provide an additional layer of protection against accidental exposure of sensitive data but should not be relied upon as a comprehensive security solution.
We recommend that you secure the server where Confluence and the database reside.
On this page:
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.
AES 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 unauthorized parties to find and decrypt it.
Custom encryption
If you have special requirements for database password encryption, you can create your own encryption mechanism based on our examples.
In this section
Related content
- No related content found