Microgateway to perform basic authentication to forward proxy before accessing apigee edge

We have a requirement where microgateway hosted inside client network has to pass through forward proxy before reaching to Apigee edge .

Any calls going through forward proxy requires basic authentication. for sending analytics does microgateway have any capabilities to perform this task, is there any node js package i can refer to proceed further.

Any suggestion will be helpful.

1 5 591
5 REPLIES 5

Maybe this module could work if both volos-analytics-apigee and microgateway-core outbound requests could be configured to use a specific agent.

A global proxy is another option, however, all outbound requests will be affected.

Former Community Member
Not applicable

Microgateway respects the 'HTTP_PROXY' variable. You can specify the authentication credentials in the variable. For example:

export http_proxy='http://user:password@proxyserver:port/'

Hi @anil paduchuri,

These settings will make the entire node instance use a proxy server. Is that what you are looking to accomplish? If so, these settings should work.

  1. npm config set proxy http://<username>:<password>@<proxy-server-url>:<port>;
  2. npm config set https-proxy http://<username>:<password>@<proxy-server-url>:<port>;
If this response answers your question, please click accept.

Hi @Robert Johnson,

I only want to use proxy server for Micro to Edge cloud communication. For example, on startup, for Microgateway config, sending analytics to Edge, and when micro needs to call the auth proxy.

Any calls through my own created micro proxies should not route through forward proxy as these are microservices behind firewall.

I need my proxy calls to stay within internal network.

Thanks

Hi @anil paduchuri

Got it. My suggested approach won’t work in this case as all traffic would be routed, including your micro proxies. Well, it might be ok if the customer can make that forward proxy “aware” of those internal services.

It would be nice if there were a config available within Microgateway such as “product forward proxy” that was specifically for the product functionality but didn’t impact the actual proxies we build. However, perhaps there is a more elegant solution?