IBM Verify

IBM Verify

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  ISVA 10.0.4 Customize Email OTP Template query

    Posted Wed September 18, 2024 04:11 AM
    Hi Team ,

    I am trying to customize the Email OTP template which is available in AAC-->Template files --> /otp/delivery/email_message.html            I wanted to add a footer in the OTP email for the customer which should automatically update the current year . 

    I am trying to add the below JavaScript , but I am not getting the year i the email .
    <script type="text/javascript">document.write(new Date().getFullYear());</script>

    Is JavaScript supported for the Email OTP template of ISVA 10.0.4 ? Please clarify 


    Thanks and Regards,

    Gomathy Sethusankar
    Security Consultant

    Managed Security Services
    Mobile: +91-9901508141
    gsethusa@in.ibm.com
    IBM Security

     



  • 2.  RE: ISVA 10.0.4 Customize Email OTP Template query

    Posted Thu September 19, 2024 02:13 AM

    I think you'll find the template page is /C/otp/delivery/email_message.xml (not html) and that page is not processed like HTML pages that permit server-side template page scripting, or indeed injected client-side javascript. Instead its a strucutured XML document, where the fields /Subject/Value and /Message/Value (with the allowed macro replacement @OTP_STRING@) are required. Other customization not supported.



    ------------------------------
    Shane Weeden
    IBM
    ------------------------------



  • 3.  RE: ISVA 10.0.4 Customize Email OTP Template query

    Posted Thu September 19, 2024 03:20 AM

    There is a potential, but very roundabout way it might be achieved completely dynamically, but I don't like it. First, I don't believe client-side javascript may be embedded in an email at all. We do not support server-side template page scripting either for the email_message.xml file. That said, we do support HTML email, so the template page could look something like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <root>
    <Subject>
      <Value>
        One-time Password
      </Value>
    </Subject>
    
    <Message>
      <Value>
    &lt;html&gt;
        This is your new &lt;b&gt;HTML&lt;/b&gt; one-time password @OTP_STRING@.
    
        Thank you,
        OTP Test
    &lt;div&gt;
    &lt;img src="https://someserver.com/url/that/generates/an/image/that/looks/like/the/text/you/want" /&gt;
    &lt;/div&gt;
    &lt;/html&gt;
      </Value>
    </Message>
    </root>
    

    Incredibly hokey, and might not work, plus getting an email client to always show embedded images in HTML emails has been hit and miss in my experience.


    I think a better and easier approach, if its just the year or other limited-list static data you want to have different, would be to pre-create a bunch of static-content email delivery template pages with the values prepopulated, then put a JS InfoMap in your custom AAC authentication policy before that MacOTP mechanism that sets a context attribute to decide which one to use, then update the MacOTP mechanism configuration properties within that policy to use the page template file from the context attribute (rather than the default of /<lang>/otp/delivery/email_message.xml. If though your JS was just representative, and its not just the year you wanted to dynamically populate, then no, you can't do that in an email message.

    A final idea, which is better than any of the others but won't help you now, would be to raise an RFE to allow a custom macro value to exist in the page template, where you populate that custom macro's text value in an InfoMap preceding the MacOTP mechanism. Again, that won't help you now, but might be useful to both you and others in future.



    ------------------------------
    Shane Weeden
    IBM
    ------------------------------



  • 4.  RE: ISVA 10.0.4 Customize Email OTP Template query

    Posted Thu September 19, 2024 04:19 AM

    Thank you Shane , for the detailed explanation . For now I am just displaying the customer logo(by encoding the image) in the email and hard-coding the year value in the footer . 



    ------------------------------
    Gomathy Sethusankar
    ------------------------------



  • 5.  RE: ISVA 10.0.4 Customize Email OTP Template query

    Posted Thu September 19, 2024 04:02 PM

    Email clients don't have JavaScript engines and so won't interpret any scripts you add into the HTML of an email?



    ------------------------------
    CIAN WALKER
    ------------------------------