Skip to Content
Author's profile photo Paul Todd

Building your first iFlow – Part 4: Configuring your credentials

In the previous instalments (Building your first iFlow: Part 3: Building the iFlow) the iFlow was created and partially configured. The outbound message now needs to be delivered but this requires a username and password to be supplied to Gmail in order that the email can be created on Google’s servers.


The message destination required a user name and password. Normally this process requires creating and deploying your email address and google password as a credential artifact, however in the case of Gmail this may require additional steps in the case the Google account has two factor authentication enabled.

To enable a password to be used with the EMail adapter will require creating and deploying a Credential Artifact to protect the credentials from being read by anyone except the HCI server. To begin creating artifact goto the Integration Operations perspective.


The perspective can be changed either by clicking on the choose perspective button to the right of the toolbar or by selecting Other… command on the Open Perspective submenu on the Window menu.

Screen Shot 2015-11-11 at 12.57.47.png

This will present a dialog allowing the choice of Integration Designer or Integration Operations”


Screen Shot 2015-11-11 at 13.34.49.png


Choose Integration Operations and this will open the Node Explorer if it is not visible. Now right click over the tenant node and select the Deploy Artifacts command.

/wp-content/uploads/2015/11/pic_828932.png

This will give a choice of artefacts to deploy. In this case the “User Credentials” artifact will be created and deployed to the Tenant. These will be the credentials will be used to authenticate with the Google Email servers. By using an artifact like this the username and password can be protected on the server since they will not be made visible to developers and also the credentials may be independently updated.

/wp-content/uploads/2015/11/pic_828932.png

Click the “Next” button and fill in the values.

/wp-content/uploads/2015/11/pic_828932.png

For the credentials the Google username and password are used. If however the Google account has two factor authentication then an application specific password will need to be created. If errors are being reported delivering email then follow the steps below to setup an applications specific password. Application specific passwords are important since they will restrict what the application is allowed to do with your account. In this case the password will be restricted to the email application only, so your other Google properties are not affected.

Log into your Google account and choose “My Account”

/wp-content/uploads/2015/11/pic_828932.png

Select the “Signing in to Google” link and in the “Password and sign-in method” panel, choose “App passwords”

/wp-content/uploads/2015/11/pic_828932.png

From the list of app passwords, choose the “Select app” and “Select device” selects at the bottom.

/wp-content/uploads/2015/11/pic_828932.png

For the “Select App” choose “Mail and in the “Select Device” choose “Other” then use a descriptive name such as “HCI WeatherReport”

/wp-content/uploads/2015/11/pic_828932.png

and click the “Generate” button

/wp-content/uploads/2015/11/pic_828932.png

The will show a 16 character password in groups of four. This is the password that will need to be used for the password in the password field. Memorize this password or at least leave it on the screen then swap back to Eclipse and enter it in the password and password repeat fields.

Once the password is entered in the fields of the Password artifact, click “Finish” and this will deploy the credentials to the tenant.


/wp-content/uploads/2015/11/pic_828932.png

Verify the credentials have been deployed by clicking  on the  “Deployed Artifacts” tab and verify the “HCI WeatherReport Credentials” have been successfully deployed.

You can close the password window on your Google account and logout of Google now. The new application specific password would have been saved.

/wp-content/uploads/2015/11/pic_828932.png

A tip to remember is to click over the deployed artifact and choose the “Copy Artifact Name” command to copy the artifact to the clipboard. This will ensure the correct name is preserved.


/wp-content/uploads/2015/11/pic_828932.png

Go back to the channel configuration and enter or paste the name of the newly deployed credential name in the “Credential Name” field.

/wp-content/uploads/2015/11/pic_828932.png


This completes the configuration of the email channel.

The start, transformation and end of the integration have been defined, now join them together with the sequence connector, noting that the “Content Modifier” transformation is showing an error since there is nothing yet configured for the transformation.

/wp-content/uploads/2015/11/pic_828932.png

The Integration process is now starting to look completed. In the next installment the content modifier will be configured as well as the email channel and the final iFlow deployed and run.

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Paul,

      I followed similar steps in gmail to create the app password. I initially did a "Test Outbound connection", gave the hostname as smtp.gmail.com and port as 465, with Protection as SMTPS. I used the deployed credential, and it the connection test was successful. I created an iFlow with SOAP as sender and mail as receiver, without any mapping or modifiers in between. When I triggered from SOAP UI, it is failing in HCI as

      sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target, cause: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

      Please advise.

      Author's profile photo Former Member
      Former Member

      Hi Paul,

      Issue resolved after referring the other blog of yours. I'm receiving the mail now. But is it possible to set the receivers, subject and Body dynamically? I tried with Message mapping and filters, yet, it is taking the content from the channel and not from the Payload.

      Author's profile photo Paul Todd
      Paul Todd
      Blog Post Author

      Hi,

      Sorry for the delay I was on vacation last week.


      Can you explain a little more what you are trying to do. You can use a content modifier to modify the body and headers to pass “variables” around.

      Author's profile photo Former Member
      Former Member

      Can I pass the values, determined through Message Mapping? How would I assign variables in the communication channel. I gave as ${/MT_Tar/fieldname} or ${body./MT_Tar/fieldname}, but it is failing.

      Author's profile photo Former Member
      Former Member

      Hi Paul,

      I used another mail box, I got "could not convert from socket to TLS", have u ever come across such error?