Skip to content
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

Kerberos support #6708

Closed
chrahunt opened this issue Jul 14, 2019 · 10 comments
Closed

Kerberos support #6708

chrahunt opened this issue Jul 14, 2019 · 10 comments
Labels
C: download About fetching data from PyPI and other sources type: feature request Request for a new feature

Comments

@chrahunt
Copy link
Member

What's the problem this feature will solve?

pip cannot currently use Kerberos for authentication with web servers that support it, which may be acting as PyPI mirrors or private package repositories.

Describe the solution you'd like

If required dependencies are present, and a request to the configured server fails with headers that indicate Kerberos is supported, then attempt Kerberos authentication.

Alternative Solutions

N/A

Additional context

This is an attempt to progress #4854 by allowing discussion without the noise associated with a PR.

Currently pip only supports basic authentication with credentials provided either via keyring or inclusion in the index/index-url URL itself. Kerberos, as described here, would not be able to use the current basic auth mechanism for negotiation.

@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Jul 14, 2019
@chrahunt chrahunt added C: download About fetching data from PyPI and other sources type: feature request Request for a new feature and removed S: needs triage Issues/PRs that need to be triaged labels Jul 14, 2019
@chrahunt
Copy link
Member Author

Related to #4475.

@pradyunsg
Copy link
Member

pradyunsg commented Aug 12, 2019

Specifically, how is this not achievable with the keyring support?

The bootstrapping issue with keyring (you'd need keyring and your backend installed) is that's the tradeoff for having a minimal core utility with extensive support for authentication backends.

@chrahunt
Copy link
Member Author

chrahunt commented Aug 12, 2019

Keyring is a pluggable interface for providing a username and password. Currently we only support using that username/password for basic auth i.e. Authentication http header with Basic and base64 encoded credentials. Kerberos uses a different flow altogether. See wiki.

@chrahunt chrahunt reopened this Aug 12, 2019
@cryvate
Copy link

cryvate commented Aug 26, 2019

It would be great if we could finally get something in so that pip can have Kerberos support.

@pradyunsg
Copy link
Member

Oh, I didn't realize this issue existed when I made #4854 (comment).

Anyway, thanks for all the work you've done on this @cryvate! It's much appreciated. ^>^

@pradyunsg
Copy link
Member

pradyunsg commented Aug 26, 2019

Edited the PR description to link to here.

@schlamar
Copy link
Contributor

schlamar commented Mar 3, 2020

Please see my comment at #4475 (comment)

@christophvw
Copy link

We need kerberos-proxy authentication in pip otherwise our developers cannot install any packages (our proxy support only kerberos authentication).

I already wrote a patch for requests-kerberos: requests/requests-kerberos#148

@enzolis
Copy link

enzolis commented Mar 12, 2020

Same situation here.
For internet access we are required to authenticate via Kerberos towards our proxy.

Regarding the details:
Please understand there is no possibility to achieve this via keyrings.
During log-in (or unlock screen) a ticket (TGT) is acquired which is used in a single sign-on manner.
When accessing the internet, the proxy sends a 407 (request to authenticate). Using the TGT and the service name (SPN, e.g. HTTP/proxy.big.company.com) a service ticket is acquired from the TGS.
This service ticket together with the original request is then sent again to the proxy which then allows you to proceed.

PS: @christophvw I added a few lines of code to your patch

@uranusjr
Copy link
Member

I’m going to use #4475 as an aggregated tracking issue for all these similar problems, since it is unlikely pip is going to add support for each authentication methods separately.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: download About fetching data from PyPI and other sources type: feature request Request for a new feature
Projects
None yet
7 participants