Protected containers: Add REST API for container protection rules

Context

  • As part of the epic &9825 , project maintainer or owner need to have a way to define the ContainerRegistry::Protection::Rule of the project via REST API
  • At the moment, there is a GraphQL API and a frontend UI that can be used to CRUD container protection rules; however, the REST API is important because some tools clients are not able to use the GraphQL API, e.g. terraform, etc.

🛠 with at Siemens

Proposal

  • Authorization: ContainerRegistry::Protection::Rule can only changed by project maintainer or higher => consider implementation with declarative framework
GraphQL Operations MR
GET endpoint for container protection rules !155798 (merged)
POST endpoint for creating new container protection rule !157925 (merged)
PATCH endpoint for updating existing container protection rule !158756 (merged)
DELETE endpoint for deleting container protection rule !159619 (merged)

Checklist / Implementation plan

  • GET endpoint for container protection rules
  • POST endpoint for creating new container protection rule
  • PATCH endpoint for updating existing container protection rule
  • DELETE endpoint for deleting container protection rule
Edited by Nicholas Wittstruck