elastic / apm-agent-dotnet

https://www.elastic.co/guide/en/apm/agent/dotnet/current/index.html
Apache License 2.0
581 stars 207 forks source link

Proxy support #782

Open killnine opened 4 years ago

killnine commented 4 years ago

Is your feature request related to a problem? Please describe. My employer has a proxy that outbound traffic is routed through. Unfortunately, the .NET agent doesn't seem to support proxy credentials like, say, the Ruby agent does.

Describe the solution you'd like I'd like to help implement proxy support for the client where users can supply a client URI, a plaintext username, and password for the agent to use in its outbound requests to APM servers (in this case, cloud instances). Alternatively, supplying a ClientCredential or NetworkCredential might be better from a security standpoint.

Describe alternatives you've considered Long-term, we whitelist URLs or IPs for resources we commonly use. However, we're prototyping our solution and authenticating through the proxy would normally be faster for a short-term solution. However, based on what our secops folks are saying, it doesn't seem like traffic is consistently routing to and from the same locations (maybe because of load balancing or something?) so their attempts to whitelist haven't worked.

Additional context We're evaluating APM Cloud solutions right now but stopped in our tracks because we can't reach out to the URL provided by the startup documentation. We're a .NET shop so this would really help things out and at least make it consistent with some other agents.

gregkalapos commented 4 years ago

Hi @killnine,

definitely sounds like a valid use-case.

Configs similar to what the Ruby agent has would be preferred.

To be very open here - this is not one of our top priorities right now, but as always we are super happy to take community PRs and I can also try helping with it.

Some ideas and hints in this regard: