Cannot delete images using external registry (docker registry 2.7) with gitlab jwt auth
Summary
When using external docker registry version 2.7 we are unable to delete images through web nor through Docker API.
This is probably caused by change of access authorization request which in previous versions sent action:*
for requesting delete permissions. Since 2.7 (AFAIK) it is sending action:delete
which is not handled in (https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/services/auth/container_registry_authentication_service.rb#L111)
Steps to reproduce
- Install gitlab + setup external registry
- Push some images
- Try to delete them
What is the current bug behavior?
Unable to delete docker images from registry because of gitlab cannot authorize delete
action
What is the expected correct behavior?
It should authorize delete
action for owner/maintainer user?
Possible fixes
Add delete
case next to *
case in:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/services/auth/container_registry_authentication_service.rb#L114