Skip to content

Support for Proxy Authentication #676

@emenendez

Description

@emenendez

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!

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions