harbor: Users must be Harbor admins to query docker registry catalog (v2/_catalog)
request
Allow a harbor user to query docker registry v2/_catalog
endpoint without being a Harbor admin
issue
We want to integrate Harbor with external tools that benefit from the v2/_catalog
API (such as Spinnaker ). Without the catalog endpoint, configuring these tools requires manually enumerating all images.
While Harbor supports the endpoint, testing has shown that a user must be a Harbor admin (not project admin) to access it. This is unfortunate as it requires us to promote these tool accounts.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 22
- Comments: 16 (1 by maintainers)
just to add after a few more tests: I can confirm what supposed on the reply https://github.com/goharbor/harbor/issues/14145#issuecomment-825593691 of issue #14145. After configuring the system permissions to read the catalog the project permissions doesn’t work anymore. I get an access denied when trying to pull an image on a project where the robot account has all the grants. After editing the robot account removing the system/catalog read permission I am able to use the account to pull the same image from the same repository. It seems that the mixing of system and project ACLs breaks the project permissions evaluation. Really disappointing since the addition of the catalog read grant via the API was a really nice step forward in the integration of an external tool like VS Code, without the need to use an admin account.
I have exactly the same problem described by @whysi using Harbor v2.5.3. It seems that “project” and “system” permissions does not work well together. 😭 Unfortunately this behavior cannot permit external tools integration that use Docker HTTP API v2. I described my use case here --> https://github.com/goharbor/harbor/issues/13653#issuecomment-1205438111
Hey everyone, I applied a simple workaround, and now my environment has full access to /v2/_catalog
Authorization "Basic cm9ib...
Ingress block to reverse proxy
Nginx configuration
Part of
nginx-catalog-deployment.yaml
Harbor(v2.4+) supports to use robot account to call catalog API but it’s not exposed in UI, so you have to create the robot with API.
Any updates?
We use Visual Studio Code docker extensions to access the remote harbor registry, it’s not safe to give everyone the admin access privilege just for listing the catalog
Is there any update on this, We would like to integrate with Spinnaker. Also is it possible for project admin to query
v2/_catalog
which lists only the images/charts for his specific project.@coolpalani yes we have it working with some caveats…
Here is the command we use to add Harbor.