...
However, when securing passwords of more product-specific configuration files such as data service configurations, the steps may vary. Therefore, WSO2 DSS provides the feature to securely store sensitive data in data service configuration files, using the secure vault functionality. Users can encrypt their passwords using tokens instead of the actual password inside the data service configuration file. See the instructions given below.
Note |
---|
You need to manually secure the password if you are creating the datasource inline when creating the data service. However, If you create the datasource via the Configure → Datasources → Add Datasource option in the Management Console, it stores the datasource in the Registry, and thereby, the password you enter will be encrypted automatically. |
Run ciphertool script from<PRODUCT_HOME>/bin
directory.- Linux: sh ciphertool.sh -Dconfigure
- Windows: ciphertool.bat -Dconfigure
- To encrypt the plain text using ciphertool, run the ciphertool script again without
-Dconfigure
option. It asks for the KeyStore Password of the running Carbon instance. The default iswso2carbon
. - Then provide the plain text value that needs to be encrypted and the tool returns the encrypted text value.
- Update the
<PRODUCT_HOME>/repository/conf/security/cipher-text.properties
file by adding a new alias (any name of your preference) and the encrypted value. - Log in to the Management Console and click Main.
- Click List under the Services menu and click on the service whose password you want to secure.
- Click Edit Data Service (Wizard), click Next, and then click Edit Datasource.
- In the Edit datasource window of the management console select Use as Secret Alias option. In the Password field, provide the alias name instead of the actual password.
- The namespace and alias will be added to the .dbs file as follows: