Hi there! Thanks for all you do with Sentry -- it adds incredible value to our team.
I have a question about support for HTTP proxy authentication in sentry_sdk.
TL;DR: Is proxy authentication supported? If not, can it be? Without support for proxy auth, we can't use Sentry from a significant portion of our services.
More details:
I see that we can pass a https_proxy kwarg to sentry_sdk.init(), such as:
sentry_sdk.init("https://...@foo.ingest.sentry.io/...", https_proxy="http://user:pass@proxy")
However, it looks like that proxy string eventually gets passed to urllib3.ProxyManager() here:
|
return urllib3.ProxyManager(proxy, **opts) |
Unfortunately, urllib3.ProxyManager does not appear to respect credentials passed in this string. The documentation isn't super clear on this, but it does allude to it in the description of the proxy_headers kwarg: "Could be used for proxy authentication." We verified with packet captures that urllib3.ProxyManager is not adding a Proxy-Authorization HTTP header to requests when the proxy string includes credentials.
Thanks so much for your consideration and help with this!
Hi there! Thanks for all you do with Sentry -- it adds incredible value to our team.
I have a question about support for HTTP proxy authentication in
sentry_sdk.TL;DR: Is proxy authentication supported? If not, can it be? Without support for proxy auth, we can't use Sentry from a significant portion of our services.
More details:
I see that we can pass a
https_proxykwarg tosentry_sdk.init(), such as:However, it looks like that proxy string eventually gets passed to
urllib3.ProxyManager()here:sentry-python/sentry_sdk/transport.py
Line 293 in 0da369f
Unfortunately,
urllib3.ProxyManagerdoes not appear to respect credentials passed in this string. The documentation isn't super clear on this, but it does allude to it in the description of theproxy_headerskwarg: "Could be used for proxy authentication." We verified with packet captures thaturllib3.ProxyManageris not adding aProxy-AuthorizationHTTP header to requests when the proxy string includes credentials.Thanks so much for your consideration and help with this!