Expand my Community achievements bar.

POC- How to integrate salesforce with AEM using charles reverse proxy- SSL Proxying

Avatar

Level 8

PROBLEM STATEMENT /USE CASES:

1) You are doing a POC on Salesforce integration with AEM for a client

2) There can be a scenario where you dont have SSL configured on my local/dev/stage environment. Generally we have SSL configured on stage env's but I found it missing with some website.

3) The environment that you are working on doesn't have DNS configured and salesforce doesn't allow to add ip address without https protocol as callback url

4)  Error while entering Callback URL in salesforce: Cannot be an HTTP url: (http://youripaddress:port/etc/cloudservices/salesforce/test.html)

SOLUTION

Steps

1) Download and install charles proxy software https://www.charlesproxy.com/ . Note this is a licensed software but you can use 30 days trial

2) Follow the steps mentioned in this article to integrate AEM with salesforce Integrating with Salesforce

3) After successful integration and charles installation , open charles software

4) Go to proxy tab and deselect the windows proxy option

5) Now go to Reverse proxies option under the same tab , click on add and enter the following values as mentioned below and click ok

a) Enter the virtual port that you want to proxy e.g. 4503

b) enter the ip address of localhost/dev/stage in remote host field

c) enter the port on which your local/dev/stage AEM instance is running

1393424_pastedImage_7.png

6) Now login to salesforce e.g. login.salesforce.com or test.salesforce.com

7)  Edit the connected app which your created in step 2

8) Change the callback url from localhost:4502 to the value which you entered in 5.a

e.g change http://localhost:4502/etc/cloudservices/salesforce/test.html  to https://youripaddress:4503/etc/cloudservices/salesforce/test.html

Note you changed the protocol here from http to https.

9)  Save the connected app and go back to the AEM salesforce configuration page in AEM.

1393434_pastedImage_18.png

10)  Now open page your_ip_address:4502/etc/cloudservices/salesforce/test.html , click on connect to salesforce and you will be successfully connected with different URLS in callback URL and the AEM Salesforce configuration page URL

1393436_pastedImage_21.png

0 Replies