cesanta / docker_auth

Authentication server for Docker Registry 2
Apache License 2.0
1.28k stars 305 forks source link

Gitlab auth: Restrict access to users from a certain group (organization?) #334

Open domma opened 2 years ago

domma commented 2 years ago

I need some help setting up authentication via Gitlab. We had been using docker_auth for a while, but are now moving to Gitlab and would like to use it as authentication backend. Using the example files we managed to setup Gitlab authentication in general. But it only requires users to be authenticated via Gitlab. So every user could access our registry, which is of course not the idea.

We managed to restrict access to individual users, but not to "groups". I checked the code (not a Go developer, but able to read most of the code) and the Gitlab implementation looks like it has an "organization" feature. But I don't see how checkGitlabOrganization is ever called!?

Could somebody provide a working example on how to restrict access to a Gitlab group / organization?