Using KEY and VALUE of the secrets vault within email config for secure mailing

Hi,

Does Anyone have experience with using the KEY and VALUE within the mail config for secure mailing purposes?

Best Regards,

Rens van Dijk

Hi Rens,

Once you have created the records in the Secrets Vault, you can get them using “secrets-vault-get” plugin.

Here is a sample script. You can see more details in Help in WF Studio (Bot task plugins)

<?xml version="1.0" encoding="UTF-8"?>
<config>
 
    ...
     
        <secrets-vault-get alias="my-keys" />
 
        <script><![CDATA[
                Map entryMap = secureEntryMap.getWrappedObject();
                com.freedomoss.crowdcontrol.webharvest.web.dto.SecureEntryDTO obj = entryMap.get("my-keys");
                username = obj.getKey().toString();
                password = obj.getValue().toString();
        ]]></script>
    <export include-original-data="true">
    </export>
    ...
     
</config>

After that you can use them in the email plugin.

Make sure to use the variables in the correct form:


username="${username}"
password="${password}"
2 Likes