pip should support custom authentication handlers for private pypi
See original GitHub issue- Pip version: 9.0.1
- Python version: 2.7.13
- Operating system: MacOS X Sierra 10.12.4
*
*
any OS, really
Description:
This is a feature request.
It would be super-awesome++ if pip supported custom authentication handler configuration so private pypi repositories are not restricted to http basic auth only. Basically, make MultiDomainBasicAuth the default and no longer the ONLY option in a PipSession as it is today: https://github.com/pypa/pip/blob/9.0.1/pip/download.py#L331-L332
This limitation prevents easy integration with stronger authentication (e.g. 2-way TLS, 2FA, etc.) and SSO schemes at enterprises with private pypi repositories. The lack of support makes basic auth credential distribution and leaking unnecessarily difficult problems to address and combat.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:42
- Comments:28 (19 by maintainers)
Top Results From Across the Web
Authentication - pip documentation v22.3.1
pip supports basic HTTP-based authentication credentials. This is done by providing the username (and optionally password) in the URL:.
Read more >pypiserver · PyPI
A minimal PyPI server for use with pip/easy_install. ... In particular, it does not officially support being used as a custom package index...
Read more >pip install requests==2.9.2 - PyPI
Requests allows you to send organic, grass-fed HTTP/1.1 requests, without the need for manual labor. There's no need to manually add query strings...
Read more >djangosaml2 - PyPI
Python users need to pip install djangosaml2[test] in order to run the ... This way you can perform your custom cleaning or authorization...
Read more >requests 0.13.8 - PyPI
Python HTTP for Humans. ... Private SSL Certificate support. Remove select.poll from Gevent monkeypatching ... Allows for custom Auth Handlers ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Things I’d want to see in any concrete proposal to handle this:
requests
tohttpx
for our network protocol? It’s not impossible that we would do this…)Reasons I think these are important:
It’s really hard to thrash out this sort of “wider issue” in the context of an open source issue tracker/pull request workflow. That’s where a funded project, with a clear scope and a remit to look at the broad implications, is a potential way forward for proposals like this. And where the use case is specifically around “corporate” infrastructure like private repositories, some sort of funding can help bridge the gap between volunteer resources who have no “itch to scratch” in this area, and businesses that depend on such support but don’t otherwise have a means to influence what features get accepted.
Remember, the pip developer team consists of a very small number of wholly volunteer contributors. We’re working on trying to make things more sustainable, but in the meantime we have to be careful how we manage feature additions. Funded developments is one way we’re exploring of doing this.
(And yes, I understand that the above makes something that “seems simple” into quite a big project. I don’t apologise for that - changes to pip can have a huge impact, and we owe it to all of our users to do our best to ensure they are well managed).
I’ve cleaned up the previous comments a bit to focus this thread on the remaining this at hand: implementing a way to plug in custom authentication backends, to support using methods such as Kerberos (#6708) and Windows Integrated Authentication (#8163).
The solution will likely be some kind of a plug-in system, so a user can install a backend alongside with pip, and use a flag to tell pip to use that. So the next questions from what I can tell would be to a) come up with a design, and b) identify places that need to be pluggable. I’m marking this as deferred till PR since some actual code would likely be the easiest way to kick off the discussion.