Another example of a configuration file that uses passwords without an xpath notation is the jndi.properties file. This file is used in WSO2 Enterprise Service Bus (WSO2 ESB) for the purpose of connecting to a message broker. You can read more about this functionality from here
. As shown below, this file contains a password value (admin) in the connection URL (amqp://admin:[email protected]/carbon?brokerlist brokerlist='tcp://localhost:5673'
). To encrypt this password, you can follow the same manual process explained above
. However, you must encrypt the entire connection URL (amqp://admin:[email protected]/carbon?brokerlist brokerlist='tcp://localhost:5673'
) and not just the password value given in password value given in
# register some connection factories
# connectionfactory.[jndiname] = [ConnectionURL]
connectionfactory.QueueConnectionFactory = amqp://admin:[email protected]/carbon?brokerlist='tcp://localhost:5673'
# 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
Changing encrypted passwords