Skip to content
September 28, 2017 / kiranpatils

Talking to inaccessible API using Membrane Service Proxy

Challenge:

This post is not directly related to Sitecore. But indirectly it is. Because Sitecore is what we do at Horizontal Integration

While working for one of our client, We had to call REST API Service built and hosted by them in their environment. Which is not yet live and accessible within their network only. We were doing development from local machine, connected to client network over VPN. But the service was inaccessible via VPN connection.

Due to some technical and security reasons. They were not able to make service accessible over VPN. It was accessible from one of their environment which we could access over VPN. So, Our Development team had to go on that box and do testing from there [Load Visual Studio, Code and Debug]. This was working. But slowing down our team. As we had heavy API Integration.

You are also facing similar issue? Or If not then interested to not how we crossed this brick wall? Let’s have a look at it:

https://i2.wp.com/www.azquotes.com/picture-quotes/quote-the-brick-walls-are-there-for-a-reason-the-brick-walls-are-not-there-to-keep-us-out-randy-pausch-35-67-71.jpg

Solution:

Pictorial representation of challenge and solution

I thought to draw an image, Which helps you visualize overall challenge and solution. Main pointers are:

  • A – Call to REST API Service from Developer machine was failing via VPN
  • B – Call to REST API Service was working from QA/UAT Machine [Within their network]
  • C – We installed Proxy Service on QA/UAT which contacts REST API Proxy and from Developer machine [Connected over VPN] calls Our proxy service rather than REST API Service

So, as you can see to solve this challenge. We configured proxy on QA/UAT Box. When we did an initial search we found the lot of great options. But it involved heavy installation and configuration. We were looking for something light weight. Which can be configured without lot of installation and configuration.

And we found this : http://www.membrane-soa.org/service-proxy/

Quickstart Guide : http://www.membrane-soa.org/service-proxy-doc/4.4/rest-quickstart.htm

It is JAVA Based Application. So, make sure you have JAVA Installed. And ensure Environment Variables are configured properly. As I took sometime to make it work. Here are my steps:

  1. Follow steps 1-3 from Quickstart Guide
  2. Keep it under c:\ [You can keep wherever you need to have it]
  3. set environment variable – MEMBRANE_HOME – <PATH TO YOUR MEMBRANE PROXY FOLDER]
  4. Do Step 4
  5. You are all set!
Advertisements

2 Comments

Leave a Comment
  1. nickhillstc / Sep 28 2017 3:24 pm

    We’ve setup a very similar model which has worked well and uses IIS as the proxy with ARR (if you don’t fancy java :))

  2. Venkata Phani Abburi / Sep 28 2017 11:58 pm

    Will ngrok be a solution here. https://ngrok.com/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: