Skip to content

Mechanism to regenerate an API token #12765

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

Open
PeterJCLaw opened this issue Jan 5, 2023 · 2 comments
Open

Mechanism to regenerate an API token #12765

PeterJCLaw opened this issue Jan 5, 2023 · 2 comments
Labels
blocked Issues we can't or shouldn't get to yet feature request tokens Issues relating to API tokens

Comments

@PeterJCLaw
Copy link
Contributor

What's the problem this feature will solve?

When rotating API tokens it is currently somewhat laborious to remove the old token and re-create it with a new one with the same scope(s).

Describe the solution you'd like

It would be great if there was a button in the UI, perhaps in the dropdown which currently hosts the option to delete a token, to regenerate the token. Doing so would be a single operation that removes the old token and creates a new one with the same scopes.

Additional context

https://circleci.com/blog/january-4-2023-security-alert/ means I imagine quite a few tokens are going to be rotate this week. (Not that that would be a good reason to rush this though!)

@PeterJCLaw PeterJCLaw added feature request requires triaging maintainers need to do initial inspection of issue labels Jan 5, 2023
@di di added tokens Issues relating to API tokens and removed requires triaging maintainers need to do initial inspection of issue labels Jan 6, 2023
@woodruffw
Copy link
Member

As a subcomponent of this: now that OIDC publishing is in beta, it might make sense to expose an API endpoint for invalidating API tokens: a user (or automation) could POST a currently valid API token to the endpoint, and PyPI would consider it invalid from that point on.

That wouldn't address the second half of this (regeneration), but it would help with the first half (letting people bulk invalidate tokens after a CI breach).

@di
Copy link
Member

di commented Apr 11, 2023

Blocked on #13409.

@di di added the blocked Issues we can't or shouldn't get to yet label Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issues we can't or shouldn't get to yet feature request tokens Issues relating to API tokens
Projects
None yet
Development

No branches or pull requests

3 participants