Description
Heroku allows us to perform one-off tasks directly on the server, and we have the crates-admin
binary in this project which allows this. This tool locks us into platforms that support this kind of direct server access though, which would make it harder for us to potentially switch hosting providers in the future.
The way to resolve this problem is to convert all of the existing tools in crates-admin
into private API endpoints. These endpoints should be protected by checking if the current user is part of a specific GitHub team.
These are the tools that will need to be converted:
- delete_crate
- delete_version
- populate
- render_readmes
- test_pagerduty
- transfer_crates
- verify_token
- Increase rate limit - @carols10cents is working on this in WIP: Admin interface #5376
- Lock/unlock account
render_readmes
appears to be somewhat special here because it is a potentially long-running operation. Converting this might involve creating a new swirl
background task that performs the actual operation.