Follow the steps given below.
- Download and install your product. For example, download and install WSO2 ESB.
- Open a command prompt and navigate to the
Enable the Cipher Tool for WSO2 ESB the product by executing the following command:
sh ciphertool.sh -Dconfigure
Execute the Cipher Tool using the following command:
- You will be asked to enter the primary key password, which is by default 'wso2carbon'. Enter the password and proceed.
You will now be asked to enter the plain text password that you want to encrypt. Enter the following element as the password and proceed:
Enter Plain Text Value :amqp://admin:[email protected]/carbon?brokerlist='tcp://localhost:5673'
You will receive the encrypted value as shown below. For example:
Encrypted value is: gaMpTzAccMScaHllsZLXspm1i4HLI0M/srL5pB8jyknRKQ2zT7NuCvt1+qEkElRLgwlrohz3lkuE0KFuapXrCSs5pxfGMOLn4/k7dNs2SlwbsG8C++/ ZfUuft1Sl6cqvDRM55fQwzCPfybl713HvKu3oDaJ9VKgSbvHlQj6zqzg=
cipher-text.propertiesfile, stored in the
Add the encrypted password against the secret alias as shown below.
connectionfactory.QueueConnectionFactory=cpw74SGeBNgAVpryqj5/xshSyW5BDW9d1UW0xMZ DxVeoa6RjyA1JRHutZ4SfzfSgSzy2GQJ/2jQIw70IeT5EQEAR8XLGaqlsE5IlNoe9dhyLiPXEPRGq4k/BgUQD YiBg0nU7wRsR8YXrvf+ak8ulX2yGv0Sf8=
Now, open the
jndi.propertiesfile, stored in the
<ESB_HOME>/repository/conffolder and replace the plain text element with the alias of the encrypted value as shown below.
# register some connection factories # connectionfactory.[jndiname] = [ConnectionURL] connectionfactory.QueueConnectionFactory=secretAlias:connectionfactory.QueueConnectionFactory # register some queues in JNDI using the form # queue.[jndiName] = [physicalName] queue.MyQueue = example.MyQueue # register some topics in JNDI using the form # topic.[jndiName] = [physicalName] topic.MyTopic = example.MyTopic