- In any WSO2 product based on Carbon 4.4.0, you can install the Cipher Tool feature from the WSO2 feature repository. See the related topics for instructions on installing features.
- Open the
cipher-text.propertiesfile and the
cipher-tool.propertiesfile from the
By default, these two files are already configured with the most common passwords that should be encrypted for your product. If required, you can edit the information that you want to encrypt. Shown below are the default files for Carbon Kernel.
Expand title Default cipher-tool.properties Code Block
# Important: This properties file contains all the aliases to be used in carbon components. If any property need to be secured, you need to add alias name, file name and the xpath as follows:. # The value goes as, the <file_name>//<xpath>,<true/false> # where <file_name> - is the file (along with the file path) to be secured, # <xpath> - is the xpath to the property value to be secured # <true / false> - This is true if the last parameter in the xpath is parameter (starts with [ and ends with ]) and you want its value to be replaced with "password" Carbon.Security.KeyStore.Password=repository/conf/carbon.xml//Server/Security/KeyStore/Password,false Carbon.Security.KeyStore.KeyPassword=repository/conf/carbon.xml//Server/Security/KeyStore/KeyPassword,false Carbon.Security.TrustStore.Password=repository/conf/carbon.xml//Server/Security/TrustStore/Password,false UserManager.AdminUser.Password=repository/conf/user-mgt.xml//UserManager/Realm/Configuration/AdminUser/Password,false Datasources.WSO2_CARBON_DB.Configuration.Password=repository/conf/datasources/master-datasources.xml//datasources-configuration/datasources/datasource[name='WSO2_CARBON_DB']/definition[@type='RDBMS']/configuration/password,false Server.Service.Connector.keystorePass=repository/conf/tomcat/catalina-server.xml//Server/Service/Connector[@keystorePass],true
Expand title Default cipher-text.properties Code Block
# By default, This file contains the secret alias names and the plain text passwords enclosed with '' brackets # In Production environments, It is recommend to replace these plain text password by the encrypted values. CipherTool can be used for it. Carbon.Security.KeyStore.Password=[wso2carbon] Carbon.Security.KeyStore.KeyPassword=[wso2carbon] Carbon.Security.TrustStore.Password=[wso2carbon] UserManager.AdminUser.Password=[admin] Datasources.WSO2_CARBON_DB.Configuration.Password=[wso2carbon] Server.Service.Connector.keystorePass=[wso2carbon]
If there are other passwords from configuration files that you want to encrypt, you can add the details to these files. For example, in WSO2 Storage Server, you will want to configure the "root" password in the
Add the following to the
#rss-config.xml passwords #RSSConfiguration.DEFAULT.WSO2RSS1.Password=rss-config.xml//RSSConfiguration/Environments/Environment[Name='DEFAULT']/RSSInstances/RSSInstance[Name='WSO2RSS1']/DataSourceConfiguration/Definition/Password,true
Add the following to the
#rss-config.xml passwords #RSSConfiguration.DEFAULT.WSO2RSS1.Password=[root]