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

More restrictions on API keys #2755

Closed
3 tasks done
ioquatix opened this issue Aug 13, 2021 · 7 comments
Closed
3 tasks done

More restrictions on API keys #2755

ioquatix opened this issue Aug 13, 2021 · 7 comments
Labels

Comments

@ioquatix
Copy link

ioquatix commented Aug 13, 2021

Expanding on #2601

I think ideally what I'd like is:

  • API key specific to one or more gems (minimise blast radius if compromised).
  • Enable/disable OTP requirement per key (allow for automated use).
  • Ability to specify key via command line e.g. ENV (don't need to write it into ~/.gem/credentials).

The value in this is to allow per-project API keys which can publish gems.

Edit: third point is already supported. use --otp or GEM_HOST_OTP_CODE env rubygems/rubygems#4697

@duckinator
Copy link
Member

duckinator commented Aug 26, 2021

Came here to say basically exactly this. I went to automate a release of a gem like I do with my Python packages, and it turns out I can't do so without reducing the security on my entire account, or setting up a second account.

@Novidwi

This comment has been minimized.

@jchestershopify
Copy link
Contributor

Should this be a single issue or broken down into standalones? I ask because I can think of at least two other wishlist items: that push tokens can only push (because token leaks are likely to occur in CI/CD), and that all tokens expire without exception (following the Let's Encrypt precedent).

@ioquatix
Copy link
Author

ioquatix commented Nov 5, 2021

As long as token expiration is something decent like 12 months I'd be fine with it.

@jchestershopify
Copy link
Contributor

I'd argue for more frequently -- 12 months is long enough that people totally forget about how they rotated the token last time. Let's Encrypt set their expiries at 90 days to encourage routines and automation.

@duckinator
Copy link
Member

To me, an expiration time of 90 days or 6 months seem like the best options. 12 months might be okay.

It feels like a "sweet spot" where the maintenance burden for not automating it is only a periodic concern, but the tokens still gets cycled regularly.

@simi
Copy link
Member

simi commented Oct 31, 2023

API scoped gems were added at #2944, closing for now 💪

@simi simi closed this as completed Oct 31, 2023
@iMacTia iMacTia mentioned this issue Dec 7, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants