|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "Implement Workflow Java Mailer SSL configuration" |
| 4 | +date: 2021-03-12 |
| 5 | +comments: true |
| 6 | +author: Suryakant Sharma |
| 7 | +authorAvatar: 'https://0.gravatar.com/avatar/68b2358efadbf76113a7fd8e86545cb9' |
| 8 | +bio: "I am an Oracle Apps DBA with over 10 years of experience, currently associated with |
| 9 | +Rackspace Technology." |
| 10 | +published: true |
| 11 | +authorIsRacker: true |
| 12 | +categories: |
| 13 | + - Oracle |
| 14 | + - Database |
| 15 | +metaTitle: "Implement Workflow Java Mailer SSL configuration" |
| 16 | +metaDescription: "To secure workflow communications, you can configure an Oracle application |
| 17 | +server to use SSL." |
| 18 | +ogTitle: "Implement Workflow Java Mailer SSL configuration" |
| 19 | +ogDescription: "To secure workflow communications, you can configure an Oracle application |
| 20 | +server to use SSL." |
| 21 | +slug: "implement-workflow-java-mailer-ssl-configuration" |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +To secure workflow communications, you can configure an Oracle® application server to |
| 26 | +use Secure Sockets Layer (SSL). |
| 27 | + |
| 28 | +<!--more--> |
| 29 | + |
| 30 | +### Introduction |
| 31 | + |
| 32 | +This post describes an example of the commands and tools on setting up a test case of |
| 33 | +Workflow Java Mailer connecting to an SMTP/IMAP server with SSL enabled. |
| 34 | + |
| 35 | +Perform the following detailed steps to configure Workflow Java Mailer: |
| 36 | + |
| 37 | +##### Step 1: Open ports |
| 38 | + |
| 39 | +Work with your network team and open the following ports from Concurrent Manager Tire: |
| 40 | +`SMTP/SSL Port: 465` and `IMAP/SSL Port: 993`. |
| 41 | + |
| 42 | +```ssh |
| 43 | +Protocol: SMTP/SSL Port: 465 |
| 44 | +Protocol: IMAP/SSL Port: 993 |
| 45 | +
|
| 46 | +PROD [<user>@servername ~]$ telnet <SMTP Server Name> 465 |
| 47 | +Trying XXXXXX... |
| 48 | +Connected to SMTP Server Name. |
| 49 | +Escape character is '^]' |
| 50 | +
|
| 51 | +PROD [<user>@servername ~]$ telnet <IMAP Server Name> 993 |
| 52 | +Trying XXXXXX... |
| 53 | +Connected to IMAP Server Name. |
| 54 | +Escape character is '^]' |
| 55 | +``` |
| 56 | + |
| 57 | +##### Step 2: Export the certificate from the email server. |
| 58 | + |
| 59 | +Goraknath Rathod, a DBA and blogger, explains this step in |
| 60 | +[his 2018 post](https://rathodappsdba.blogspot.com/2018/06/workflow-ssl-certificate-installation.html): |
| 61 | +"To establish a secure communication channel, the certificate from the Email Server (issued |
| 62 | +by a Certification Authority) needs to be imported on the Concurrent Manager Tire. |
| 63 | + |
| 64 | +"The email server certificate issued by a trusted Certification Authority (i.e. Verisign), |
| 65 | +can be obtained from the System Administrator or downloaded by [completing the following |
| 66 | +steps]:" |
| 67 | + |
| 68 | +Following are the steps Rathod describes: |
| 69 | + |
| 70 | +A. Access your main web page https://<host.domain:port>. |
| 71 | +B. Double-click on the padlock at the bottom of the page to view the Certificates. If there |
| 72 | + is no padlock, then on the top toolbar: select **File->Properties->Certificates**. |
| 73 | +C. Select the Certification Path tab and: |
| 74 | + a. Click on the first line and then view certificate. This will be the certificate for |
| 75 | + the root Certifying Authority (CA). |
| 76 | + b. On the **Details** tab, click **Copy to File**. This will start the export wizard. |
| 77 | + c. Click Next to continue. |
| 78 | + d. Select **Base-64 encoded X.509 (.CER)** and click **next**. |
| 79 | + e. Enter `ca1` as the name and click **ok** to export the certificate. |
| 80 | + f. Repeat all the preceding steps for each line on the certification-path tab |
| 81 | + incrementing the file name each time by 1 (i.e., ca2, ca3). |
| 82 | + |
| 83 | +##### Step 3: Create a keystore |
| 84 | + |
| 85 | +Rathod continues: "Create a keystore on the Concurrent Manager Tire. Import the certificate |
| 86 | +to keystore." |
| 87 | + |
| 88 | +Following are the steps Rathod describes with some sample code I provided: |
| 89 | + |
| 90 | +A. Create a keystore that holds the certificate, using the default location (i.e., **/home/applmgr**). |
| 91 | +B. Upload the Certificate to the Concurrent Manager Tire using an FTP tool. |
| 92 | + |
| 93 | +```ssh |
| 94 | +[<user>@servername ~]$ ls -lrt ca1.cer ca2.cer ca3.cer ca4.cer |
| 95 | +-rw-rw-r-- 1 applmgr applmgr 1472 Jul 17 00:40 ca1.cer |
| 96 | +-rw-rw-r-- 1 applmgr applmgr 1646 Jul 17 00:41 ca2.cer |
| 97 | +-rw-rw-r-- 1 applmgr applmgr 1756 Jul 17 00:41 ca3.cer |
| 98 | +-rw-rw-r-- 1 applmgr applmgr 2800 Jul 17 00:41 ca4.cer |
| 99 | +[<user>@servername ~]$ pwd |
| 100 | +/home/applmgr |
| 101 | +
|
| 102 | +[<user>@servername ~]$ keytool -genkey -alias -keystore -storetype JKS |
| 103 | +Enter keystore password: |
| 104 | +Re-enter new password: |
| 105 | +What is your first and last name? |
| 106 | +What is the name of your organizational unit? |
| 107 | +What is the name of your organization? |
| 108 | +What is the name of your city or locality? |
| 109 | +What is the name of your state or province? |
| 110 | +What is the two-letter country code for this unit? |
| 111 | +Is CN=XXX, OU=XXX, O=XXX, L=XXX, ST=XXX, C=XXX correct? |
| 112 | + [no]: yes |
| 113 | +
|
| 114 | +Enter key password for <-keystore> |
| 115 | + (RETURN if same as keystore password): |
| 116 | +Re-enter new password: changeit |
| 117 | +``` |
| 118 | + |
| 119 | +C. Import the certificate into the created keystore. |
| 120 | + |
| 121 | +```ssh |
| 122 | +[<user>@servername ~]$ ls -la .keystore |
| 123 | +-rw-rw-r-- 1 applmgr applmgr 1332 Jul 17 01:04 .keystore |
| 124 | +
|
| 125 | +keytool -import -alias my_cert1 -file ca1.cer -keystore .keystore -storepass <keystore password> |
| 126 | +keytool -import -alias my_cert2 -file ca2.cer -keystore .keystore -storepass <keystore password> |
| 127 | +keytool -import -alias my_cert3 -file ca3.cer -keystore .keystore -storepass <keystore password> |
| 128 | +keytool -import -alias my_cert4 -file ca4.cer -keystore .keystore -storepass <keystore password> |
| 129 | +``` |
| 130 | + |
| 131 | +D. Verify the certificates. |
| 132 | + |
| 133 | +```ssh |
| 134 | +[<user>@servername~]$ keytool -list -keystore .keystore |
| 135 | +Enter keystore password: |
| 136 | +
|
| 137 | +Keystore type: JKS |
| 138 | +Keystore provider: SUN |
| 139 | +
|
| 140 | +Your keystore contains 5 entries |
| 141 | +
|
| 142 | +my_cert4, Jul 17, 2020, trustedCertEntry, |
| 143 | +Certificate fingerprint (SHA1): 1E:5D:EA:8C:79:E1:89:85:1B:31:62:16:1F:D9:27:6A:56:FD:AB:37 |
| 144 | +my_cert3, Jul 17, 2020, trustedCertEntry, |
| 145 | +Certificate fingerprint (SHA1): 27:AC:93:69:FA:F2:52:07:BB:26:27:CE:FA:CC:BE:4E:F9:C3:19:B8 |
| 146 | +my_cert2, Jul 17, 2020, trustedCertEntry, |
| 147 | +Certificate fingerprint (SHA1): 34:0B:28:80:F4:46:FC:C0:4E:59:ED:33:F5:2B:3D:08:D6:24:29:64 |
| 148 | +my_cert1, Jul 17, 2020, trustedCertEntry, |
| 149 | +Certificate fingerprint (SHA1): 27:96:BA:E6:3F:18:01:E2:77:26:1B:A0:D7:77:70:02:8F:20:EE:E4 |
| 150 | +-keystore, Jul 17, 2020, PrivateKeyEntry, |
| 151 | +Certificate fingerprint (SHA1): E0:DA:C8:95:4F:FB:A2:82:40:9E:6A:02:A0:82:0F:35:5E:B1:FE:08 |
| 152 | +``` |
| 153 | + |
| 154 | +E. Set MAILER\_SSL\_TRUSTSTORE (i.e., **/home/applmgr/.keystore**). |
| 155 | + |
| 156 | +From SQL \*Plus: |
| 157 | + |
| 158 | +```ssh |
| 159 | +[<user>@servername~]$ sqlplus apps/XXXXX @$FND_TOP/sql/afsvcpup.sql |
| 160 | +
|
| 161 | + 10006 Workflow Notification Mailer DEACTIVATED_SYST WF_MAILER |
| 162 | +GSM |
| 163 | +
|
| 164 | +Enter Component Id: 10006 |
| 165 | +
|
| 166 | +10243 SSL Trust store NONE NONE N |
| 167 | +N |
| 168 | +Enter the Comp Param Id to update: 10243 |
| 169 | +You have selected parameter: SSL Trust store |
| 170 | +Current value of parameter: NONE |
| 171 | +
|
| 172 | +Enter a value for the parameter: /home/applmgr/.keystore |
| 173 | +``` |
| 174 | + |
| 175 | +##### Step 4: Configure the Mailer to work with IMAPSSL / SMTPSSL |
| 176 | + |
| 177 | +Following are the steps Rathod describes: |
| 178 | + |
| 179 | +Navigation: Log on to **OAM >System Administrator > Workflow Manager > Notification Mailer Link**. |
| 180 | + |
| 181 | +A. Enter Outbound Server Name and validate check-box Outbound SSL Enable. |
| 182 | +B. Enter Inbound Server name, Username, Password, Reply-to Address and validate check-box |
| 183 | + **Inbound SSL Enable**. |
| 184 | + |
| 185 | +{{<img src="Picture1.png" title="" alt="">}} |
| 186 | + |
| 187 | +#### Step 5: Debugging steps for an R12 instance |
| 188 | + |
| 189 | +Following are the steps Rathod describes: |
| 190 | + |
| 191 | +A. SMTP |
| 192 | + |
| 193 | +```ssh |
| 194 | +$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=smtp \ |
| 195 | + -Ddbcfile=$FND_SECURE/TEST.dbc \ |
| 196 | + -Dport=465 -Dssl=Y \ |
| 197 | + -Dtruststore=/home/applmgr/.keystore \ |
| 198 | + -Dserver=email.yourdomain.com \ |
| 199 | + [email protected] -Dpassword=xxxxx \ |
| 200 | + -Dconnect_timeout=120 -Ddebug=Y \ |
| 201 | + -DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer |
| 202 | +``` |
| 203 | + |
| 204 | +b. IMAP |
| 205 | + |
| 206 | +```ssh |
| 207 | +$AFJVAPRG -classpath $AF_CLASSPATH -Dprotocol=imap \ |
| 208 | + -Ddbcfile=$FND_SECURE/TEST.dbc \ |
| 209 | + -Dport=993 -Dssl=Y \ |
| 210 | + -Dtruststore=/home/applmgr/.keystore \ |
| 211 | + -Dserver=email.yourdomain.com \ |
| 212 | + [email protected] -Dpassword=xxxxx\ |
| 213 | + -Dconnect_timeout=120 -Ddebug=Y \ |
| 214 | + -DdebugMailSession=Y oracle.apps.fnd.wf.mailer.Mailer |
| 215 | +``` |
| 216 | + |
| 217 | +##### Step 6: Authenticate Mailer |
| 218 | + |
| 219 | +In R12.1.3, the Oracle Workflow Notification Mailer supports SMTP authentication, enabling |
| 220 | +you to use the Notification Mailer with an enterprise SMTP server configured for SMTP |
| 221 | +authentication. |
| 222 | + |
| 223 | +According to a |
| 224 | +[2014 presentation on Oracle R12.1.3 features](https://www.slideshare.net/ravisagaram/oracle-r1212-and-r1213-features): |
| 225 | +"SMTP authentication requires the sender to authenticate by identifying itself to the mail |
| 226 | +server. After successful authentication, the mail server grants transmission of the sender's |
| 227 | +emails. SMTP authentication can be used to allow legitimate users to relay mail while |
| 228 | +denying relay service to unauthorized users, such as spammers. |
| 229 | + |
| 230 | +"Oracle Workflow currently supports the PLAIN, LOGIN, and DIGST-MD5 authentication mechanisms." |
| 231 | + |
| 232 | +##### Step 7: Cycle the services |
| 233 | + |
| 234 | +To complete the configuration, stop and start all services as needed. |
| 235 | + |
| 236 | +### Conclusion |
| 237 | + |
| 238 | +SSL secures communication by providing message encryption, integrity, and authentication. |
| 239 | +By following and implementing the preceding steps, you can easily secure workflow |
| 240 | +communications. |
| 241 | + |
| 242 | +<a class="cta red" id="cta" href="https://www.rackspace.com/data/databases">Learn more about our Data services.</a> |
| 243 | + |
| 244 | +Use the Feedback tab to make any comments or ask questions. You can also click |
| 245 | +**Let's Talk** to [start the conversation](https://www.rackspace.com/). |
| 246 | + |
0 commit comments