Allow access to registry API of the current project using the job token [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Merged Mathieu Parent requested to merge sathieu/gitlab:ci_job_token_delete_registry_images into master

What does this MR do?

Allow access to registry API of the current project using the job token

Including DELETE (Fixes: #19606 (closed))

Later, this feature can be used to fix #225352, #20649, #221192, #17511, #37136 (closed), #28825, #24269, #6179 (closed).

Also related to &3559, #233496.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Fabio Pitino