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

fix auth cache to allow for username in index url #10288

Merged
merged 1 commit into from
Sep 22, 2021

Conversation

rittneje
Copy link
Contributor

@rittneje rittneje commented Aug 8, 2021

Currently, if the index url itself contains a username, and the password comes from keyring, then the auth cache is never consulted on subsequent requests. This leads to the undesirable behavior of continually spamming the repository with unauthenticated requests, and also spamming keyring with password lookups. This fixes the auth cache lookup logic to work for this case as well.

Fixes #10269 (in spirit).

@rittneje
Copy link
Contributor Author

rittneje commented Aug 9, 2021

@uranusjr I have confirmed that this patch resolves my original issue. I can't get tox to run the tests properly, but at least the ones in test_network_auth.py are all passing.

@rittneje rittneje marked this pull request as ready for review August 9, 2021 13:13
@rittneje
Copy link
Contributor Author

ping @uranusjr

@adaschmac
Copy link

👍 I am also running into this issue and it looks like this PR would fix it. The rapid 401 requests against our private Artifactory hosted Pypi repo is causing Artifactory to return 403s, which causes pip to fail out.

@uranusjr uranusjr added this to the 21.3 milestone Sep 4, 2021
@rittneje
Copy link
Contributor Author

rittneje commented Sep 5, 2021

@uranusjr Is there something more I need to do? The merge gate shows it is waiting on a news entry, but I included one in my PR.

@uranusjr
Copy link
Member

uranusjr commented Sep 5, 2021

Likely not, this should be good. Feel free to ping maintainers if this stay unmerged in October though, to make sure this go into 21.3.

@uranusjr uranusjr closed this Sep 5, 2021
@uranusjr
Copy link
Member

uranusjr commented Sep 5, 2021

Close-reopen to trigger CI again. The news entry check was stuck for unknown reason.

@uranusjr uranusjr reopened this Sep 5, 2021
@rittneje rittneje force-pushed the fix-credential-cache branch from 35e299b to d05d3c1 Compare September 6, 2021 14:04
@rittneje
Copy link
Contributor Author

rittneje commented Sep 6, 2021

@uranusjr I had to fix a linter issue. Can you re-trigger the workflow?

@DiddiLeija DiddiLeija closed this Sep 6, 2021
@DiddiLeija DiddiLeija reopened this Sep 6, 2021
@pradyunsg
Copy link
Member

I'm not a 100% familiar with the history of this PR, so I'm not gonna click the merge button on this one. @uranusjr has approved this though, so I'll defer to him for merging this. :)

@pradyunsg pradyunsg added the S: awaiting response Waiting for a response/more information label Sep 21, 2021
@uranusjr uranusjr merged commit f6665f3 into pypa:main Sep 22, 2021
@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Sep 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 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.

Add flag to force pip to always fetch password from keyring
5 participants