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

"login" or dry-run validity check for tokens #6407

Open
bryevdv opened this issue Aug 10, 2019 · 4 comments
Open

"login" or dry-run validity check for tokens #6407

bryevdv opened this issue Aug 10, 2019 · 4 comments
Labels
APIs/feeds feature request needs discussion a product management/policy issue maintainers and users should discuss tokens Issues relating to API tokens

Comments

@bryevdv
Copy link

bryevdv commented Aug 10, 2019

What's the problem this feature will solve?

Our project has to simultaneously publish docs, PyPI, conda, and npm packages. If one of those fails (e.g. because a token has expired) then it's a really bad day. So it's really ideal for us to be able to "test" all the credentials are valid up front, before actually really attempting any of the uploads.

Describe the solution you'd like

npm provides npm login and there is also an anaconda login Any reasonable way to peform a dry-run of an upload without actually doing the upload would be helpful to ensure that we don't get partway through a release before discovering a credentials problem.

@brainwane brainwane added feature request needs discussion a product management/policy issue maintainers and users should discuss tokens Issues relating to API tokens labels Aug 10, 2019
@brainwane
Copy link
Contributor

I think the best way to do this is to implement #726.

@di
Copy link
Member

di commented Aug 12, 2019

I think to address this issue, we'd probably need to provide an API for testing credentials separate from #726, as it doesn't quite solve the problem of "once we built everything, our upload failed due to bad credentials, and we can't test credentials without trying to upload something".

Presumably once #726 is implemented, maintainers could attempt to upload some dummy release to test credentials, but this isn't as ideal as just providing an API for something like twine login.

However there is an additional complication to consider here (also discussed in pypa/twine#355 and pypa/twine#475) which is that the validity of API tokens depends on what's being uploaded along with them.

Edit: and similarly for basic authentication, the validity of credentials would need to be considered on a per-project basis.

@bryevdv
Copy link
Author

bryevdv commented Aug 12, 2019

which is that the validity of API tokens depends on what's being uploaded along with them.

For sure, tho just from my own perspective, I am willing to own that risk (we have never run in to that particular problem, but we have definitely had botched releases due to a credential issue on some or other account mid-process)

@woodruffw
Copy link
Member

This might fall under #13409.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APIs/feeds feature request needs discussion a product management/policy issue maintainers and users should discuss tokens Issues relating to API tokens
Projects
None yet
Development

No branches or pull requests

5 participants