getsentry / sentry-python

The official Python SDK for Sentry.io
https://sentry.io/for/python/
MIT License
1.86k stars 483 forks source link

Load Balancer with 2-way SSL authentication support #3256

Open grammy-jiang opened 2 months ago

grammy-jiang commented 2 months ago

Problem Statement

Hi,

I am configuring Nginx as load balancer in front of Sentry and 2-way SSL authentication is enabled.

I can visit the web GUI as usual after I add the client cert and key to the browser. But the server can't receive the log messages, and I notice that in sentry-python it doesn't support two-way SSL authentication as a client - from the source code no client cert related options are passed to the urllib3.PoolManager:

The document of urllib3.PoolManager:

Solution Brainstorm

From these lines of options defined, I think it can be configured in the same way:

szokeasaurusrex commented 2 months ago

Hi @grammy-jiang, thanks for the feature suggestion! This is something we can definitely look into adding.

I will put the issue on our internal backlog, but it will likely take us some time to get around to implementing this feature, since we have other higher-priority projects that we are working on at the moment. However, if you would like to contribute a PR, we would be happy to review it and help get it merged.

grammy-jiang commented 2 months ago

Thanks for your reply, @szokeasaurusrex .

Yes, this is a quite simple change, I can do it.

grammy-jiang commented 2 months ago

I also find another issue about Gitlab Integration with two-way SSL authentication:

Currently, the Gitlab integration in Sentry does not support the Gitlab instance with two-way SSL authentication enabled.

I haven't got a chance to investigate the reason, but I can give it a try.

szokeasaurusrex commented 2 months ago

I also find another issue about Gitlab Integration with two-way SSL authentication

@grammy-jiang Please raise this issue in the getsentry/sentry repo, since it seems like this is related to the Sentry server, not the Sentry Python SDK. The SDK does not integrate with GitLab, only the Sentry server does.