Discover if a proxy is chained

Is there a way to tell if a proxy is chained and if so what is the root proxy?

Solved Solved
0 1 212
1 ACCEPTED SOLUTION

I know of no way to answer the question "what proxies call this proxy via chaining?" , except by individually examining each proxy, looking at the target endpoints as well as ServiceCallout. The latter can chain to a  proxy, too! 

So you'd have to do a recursive search through all your configured proxies, and even sharedflows. SharedFlows may contain ServiceCallout! 

I don't know of a tool that accomplishes that, but ... there is a tool that will get you part of the way there.  findProxyWithTargetType.js will find proxies in your organization that use a local target connection.  Example usage:

 

node ./findProxyWithTargetType.js -v --token $TOKEN --apigeex -o $ORG --targettype local --filter=deployed

 

 Building a tool that will find a LocalTargetConnection for A PARTICULAR proxy, is something you would have to do yourself. Or you could just scan through the results from the above and look for what you want. 

This tool doesn't look for ServiceCallouts.  But there are other (similar) tools that could help you do that.  For example, ScanProxiesForPolicyType.js will find proxies with a ServiceCallout. You could start with that and extend it, to look for ServiceCallouts with a local target connection. 

View solution in original post

1 REPLY 1

I know of no way to answer the question "what proxies call this proxy via chaining?" , except by individually examining each proxy, looking at the target endpoints as well as ServiceCallout. The latter can chain to a  proxy, too! 

So you'd have to do a recursive search through all your configured proxies, and even sharedflows. SharedFlows may contain ServiceCallout! 

I don't know of a tool that accomplishes that, but ... there is a tool that will get you part of the way there.  findProxyWithTargetType.js will find proxies in your organization that use a local target connection.  Example usage:

 

node ./findProxyWithTargetType.js -v --token $TOKEN --apigeex -o $ORG --targettype local --filter=deployed

 

 Building a tool that will find a LocalTargetConnection for A PARTICULAR proxy, is something you would have to do yourself. Or you could just scan through the results from the above and look for what you want. 

This tool doesn't look for ServiceCallouts.  But there are other (similar) tools that could help you do that.  For example, ScanProxiesForPolicyType.js will find proxies with a ServiceCallout. You could start with that and extend it, to look for ServiceCallouts with a local target connection.