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

Requiring keyring authentication when repository returns 403 #9871

Closed
wants to merge 1 commit into from
Closed

Requiring keyring authentication when repository returns 403 #9871

wants to merge 1 commit into from

Conversation

ffissore
Copy link

This fixes #9870

@sbidoul
Copy link
Member

sbidoul commented Apr 26, 2021

At first sight, I'd say that handling 401 and 403 in the same way is not the correct thing to do for pip.

It is surprising that a package index would return a 403 when accessed without credentials which is what pip should be doing as a first try (if I understand correctly the discussion in #8687).

@ffissore
Copy link
Author

I'm very new to pip, so I don't have an opinion on this matter. I've also contacted google, asking them to review the status code they return when anonymous users attempt to access a private repo.
Maybe they'll fix the problem on their end.

Still, folks like me are currently forced to stick to an older version of pip to keep on working, and I think that one way or the other this must be fixed

@sbidoul
Copy link
Member

sbidoul commented Apr 26, 2021

Thanks @ffissore !

Pinging @hroncok, @zooba, @chrahunt who were involved in #8687 and might have an advice.

@hroncok
Copy link
Contributor

hroncok commented Apr 26, 2021

I don't have an opinion. Looks reasonable to me, but my knowledge of indexes with limited access is nonexistent.

@pfmoore
Copy link
Member

pfmoore commented Apr 26, 2021

I agree with @sbidoul this seems wrong to me. I guess "403 forbidden" could mean "you're not allowed to access this anonymously", but surely that's what "401 needs auth" is for?

I can see this as working around buggy index servers, but is it going to cause false keyring requests on index servers that use 403 correctly?

I'm willing to let the people involved in the implementation make the decision, though.

@sbidoul
Copy link
Member

sbidoul commented May 17, 2021

Closing, as discussed in the related issue.

@sbidoul sbidoul closed this May 17, 2021
@ffissore ffissore deleted the handle_401_403 branch May 17, 2021 08:28
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keyring auth stopped working since 21.1
4 participants