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

Improving integration with keyring and pip authentication. #11827

Open
1 task done
mangin opened this issue Mar 2, 2023 · 1 comment
Open
1 task done

Improving integration with keyring and pip authentication. #11827

mangin opened this issue Mar 2, 2023 · 1 comment
Labels
S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature

Comments

@mangin
Copy link

mangin commented Mar 2, 2023

What's the problem this feature will solve?

In the current implementation of integration between keyring and pip authentication we could ask username of keyring user and use this method of authentication as 401 fallback.

I would like to improve the integration by:

  1. removing all logic that asks people to promt password. In the CI scripts it couldn't possible to type in some environments
  2. start to use keyring authentication as an optional method like netrc file (not as fallback)
  3. changing a way how we pick up username for keyring:
  • from artifact url
  • from index url
  • from pip.cong parameter (I added a new parameter)

These changes improve integration with keyring and help private companies to block anonymous access to their internal PyPi reposiotires by setting up keyring authentification on their dev machines and CI clusters.

Describe the solution you'd like

Instead of describing the solution I already prepared the fix:
#11823

I didn't create new test cases for my logic because first I would like to here your oppinion about this change and only after that add unittest/integration tests + update docs.

Alternative Solutions

As an alternative solution we can use:

  1. Basic HTTP authentication in index urls and artifact urls
    But in this case people should store unencrypted passwords/tokens in their home directories.
    => user processes will be able to read passwords/tokens => some viruses could steal passwords/tokens
  2. netrc
    There are the same problem

Keyring allows storage encryption on dev devices and CI machines.

Additional context

I don't have any additional context.

Code of Conduct

@jfly
Copy link
Contributor

jfly commented Jun 5, 2024

changing a way how we pick up username for keyring

  • from artifact url
  • from index url
  • from pip.cong parameter (I added a new parameter)

This feels wrong to me, as keyring already has support for discovering a username. I've put together a POC with support for that here: #12748.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants