...
- Check that the password is set. If not clearly indicate the problem with whatever reporting mechanism you have. Include the full, quoted key that was being looked for.
- Use the "wso2:vault-lookup" xpath function to retrieve the password.
- If comparing passwords, use "not($provided_password != $vault_password)".
- Document clearly which passwords are expected, and some information about their use, source and format. See "Install_Instructions.txt Idiom"
ESB Code:
Code Block | ||
---|---|---|
| ||
<filter xpath="not(wso2:vault-lookup('aca_e2t_APIM_KeySecret'))"> <then> <call-template target="aca_e2t_RaiseException"> <with-param name="ERROR_MESSAGE" value="The password 'aca_e2t_APIM_KeySecret' has not been set in the secure vault!"/> </call-template> </then> </filter> <property name="KeySecret" expression="wso2:vault-lookup('aca_e2t_APIM_KeySecret')/> <!-- The lookup can also be used inline --> <property name="Authorization" expression="concat('Basic ', wso2:vault-lookup('aca_e2t_APIM_KeySecret'))" scope="transport"/> |
...