-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Add pip-system-certs to python dependencies #3123
Comments
Hi @daltonv Thanks for the suggestion. |
Hi @memsharded, Thanks for the quick response. Is the conan conf for adding certs setting the My intention is that ideally you don't have to do anything extra if you have some self-signed cert in your system store, although I definitely appreciate not wanting to adding a less mature dependency. So maybe this dep isn't the ideal solution, but it would be nice to have a seamless solution. Maybe that's just a larger problem with how |
We are basically passing that
So yes, it seems the common practice is to have a directory with the desired certs, and point the |
I also see the Pip is also experimenting with it https://pip.pypa.io/en/stable/topics/https-certificates/#using-system-certificate-stores So maybe I really want a deeper solution, and I would suggest conan should at least have some documentation specifically talking about self-signed certs. Dealing with them is not intuitive if you don't deal with certs everyday. Just a simple FAQ about getting self-signed cert issues when calling |
Sounds reasonable, lets move this ticket to docs repo, and lets watch what python and requests will be doing with it. |
Looks like pip settled on implementing a So maybe conan could/should grow a |
Also some interesting discussion (from the author of pip-system-certs), about how definitely sounds like he thinks they did it better, and the remaining difference is just whether it's done by the app or via a .pth hook for the whole python installation/venv. Which is moot if it was going to be something controlled by the app (e.g. pip's feature flag or a similar conf for conan). |
This seems interesting. There could be some problems, like for example the library only works with Python 3.10 and certain system apis, which means it can be almost impossible to make it available by default in Conan, so there should be some kind of opt-in. |
Yeah, you'd just make it a conditional requirement in requirements.txt : Then gate the |
Nevermind, truststore itself already does that with a custom |
The dependency on >= 3.10 is (unfortunately) quite real: sethmlarson/truststore#107 (comment), that's when the |
I am still a bit concerned about adding this kind of dependency to Conan for every Conan users with Python 3.10, that could have issues with system requirements for example, so I'd be more inclined to make it opt-in initially protecting the |
Fair. I was looking at adoption within cpython and pypa, more so than github stars. pip >= 23.3 has it always-installed (though not automatically imported/used). Though pip of course has vendored it rather than listed in requirements.txt, since pip itself can't rely on getting things via pip. And this version of pip which bundles a vendored truststore is what's being built for the now in the cpython 3.11 and 3.12 branches. Though this has only happened in the last few months, of course, but " Pip hasn't make So I was leaning toward that same practice - installed by default (to avoid the chicken-and-egg problem that you can't install it because your SSL settings don't work without without it), but keeping actual use opt-in for now. |
What is your suggestion?
As conan seems to be widely used in corporate networks it seems like it would be a good idea to add pip-system-certs to the dependencies.
This should help anybody who has corporate self-signed certificates due to ssl inspection policies, as it forces python
requests
to use the system certificate store as well as thecertifi
store. The self signed cert aught to be on the system store, so no extra work is needed by the dev to getconan install
to work.Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: