Skip to content

Allow container registry with disabled repository

What does this MR do and why?

Allow container registry with disabled repository

https://docs.gitlab.com/ee/user/project/deploy_tokens/#pull-images-from-a-container-registry does not mention the requirement of having the repository enabled.
The doc link from the security HackerOne report leads to a section which does not exist anymore.
The container registry toggle is also not listed in the repository section anymore.

Screenshots or screen recordings

No UI changes.

Before After

How to set up and validate locally

  1. Have the container registry enabled
  2. Create a root/registry project
  3. Pull a random image that you can push (e.g. alpine) and tag it for the registry (docker image tag alpine 127.0.0.1:5000/root/registry)
  4. Disable the repository in the root/registry project
  5. Push the image to the project (docker push 127.0.0.1:5000/root/registry)
  6. Pull the image from the project (docker pull 127.0.0.1:5000/root/registry)
  7. In both cases, you should have a success and no error caused by something being forbidden

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #349179 (closed)

Edited by Greg Myers

Merge request reports