Skip to content

add star for action scope, in order to delete image from registry

username-removed-644813 requested to merge pralut/gitlab-ce:master into master

What does this MR do?

Right now if we want to delete an image from the registry via docker registry API, we are blocked as there is no way to specify the action: * in the scope.

$ token=`curl 'https://root:password@gitlab.local/jwt/auth?account=root&scope=repository:g_1/janus:*&service=container_registry' | jq .token | tr -d '"' `; curl -vH "Authorization: Bearer $token" -X DELETE --http1.1 https://registry.local/v2/g_1/janus/manifests/sha256:c62cac498085c0d9b9d56930ef58a5dd8c62859b099528faffd2eb5e39b6fd45

< HTTP/1.1 401 Unauthorized
< Server: nginx
< Date: Mon, 01 Aug 2016 03:41:55 GMT
< Content-Type: application/json; charset=utf-8

This fixes it, I assume that someone who is able to push is also able to delete. I guess one could disagree.

Are there points in the code the reviewer needs to double check?

No

Why was this MR needed?

Impossible to delete via API with jwt.

What are the relevant issue numbers?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

Merge request reports