In one of my ESB artifacts, I’ve included a DB Mediator . Here is the part of the code…
...
<dbreport>
<connection>
<pool>
<driver>com.mysql.cj.jdbc.Driver</driver>
<url>jdbc:mysql://localhost:3306/wso2_sessions</url>
<user>testUser</user>
<password>myownpassword!</password>
</pool>
</connection>
<statement>
<sql><![CDATA[my SQL statement]]></sql>
</statement>
</dbreport>
I'd like to store myownpassword! encrypted. I got how to set encrypted secret vaults in deployment.toml and then call them within the ESB code, i.e.
<property expression="wso2:vault-lookup('db_password')" name="db_password" scope="default" type="STRING"/>
where db_password is the alias assigned to the encrypted text. But how can I refer to the encrypted password so to assign it to the connection pool?
Thanks for help :-)