Add protected packages support for RubyGems Package Registry
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
The protected packages feature currently supports npm, PyPI, Maven, Conan, NuGet, Helm, and Generic packages, but does not support RubyGems.
With the RubyGems Package Registry moving from Experiment to Beta (see #601973), users need the ability to protect their Ruby gems from accidental or unauthorized modifications, just as they can with other supported package formats.
Proposal
As part of the epic &5574, add support for protecting RubyGems packages. When a RubyGems package protection rule is configured, the following restrictions should apply:
- Push protection: Only users with at least the configured minimum role can push new gem versions matching the protection rule's name pattern.
- Delete protection: Only users with at least the configured minimum role can delete gems matching the protection rule's name pattern.
- Deploy token restriction: Protected gems cannot be pushed with a deploy token.
This should follow the same patterns established for other protected package formats (npm, PyPI, Maven, Conan, NuGet, Helm, Generic), including:
- Feature flag for gradual rollout (e.g.,
packages_protected_packages_rubygems) - Name pattern matching with wildcard (
*) support - Configurable minimum access levels for push and delete operations
- API support for managing RubyGems protection rules
Related issues
- #601973 - RubyGems Package Registry Beta Program: Feedback & Graduation Criteria
- #323974 (closed) - Protected RubyGems (previously closed)
- &5574 - Identify packages as protected to prevent accidental deletion or updates