<p>I have followed this pattern in the past for LDAP synchronisation, where a &quot;permission&quot; group was synched with LDAP and then invited into a &quot;projects&quot; group with a specific role.</p>
<p>This used the <a href="https://docs.gitlab.com/ee/administration/auth/ldap/ldap_synchronization.html" rel="nofollow noreferrer">Gitlab ldap group synch</a> feature.</p>
<p>There are a few benefits over adding users directly:</p>
<ol>
<li>you can manage identities exclusively in the IdP (<em>e.g.</em> Active Directory) - onboarding/offboarding/privilege escalation all done from the IdP.</li>
<li>You make simple declarative statements about which (user) groups need to be in which (project) groups, with given roles.</li>
<li>This makes it easier to think about the authn/authz model and indeed makes it feasible to write declarative infrastructure as code for the configuration of the projects themselves -- which group can merge, which branches are protected, <em>etc</em>.</li>
</ol>
<p>On the topic of a &quot;senior review&quot; group which will never produce code - I agree this is a tricky permission to model. You want someone who can approve merge requests and perhaps merge them (thereby effectively making a commit and therefore &quot;producing code&quot; however). However, it's called privilege <em>escalation</em>, when what you want is true role-based authorization. I'm not sure you can do that yet with Gitlab.</p>

CC BY-SA 4.0
2022-07-13T17:38:06.943Z
2022-07-13T17:38:06.943Z
Bruce Becker
<p>I have a many repos all of which can be edited by a different &quot;Senior Review Group&quot; group. <a href="https://devops.stackexchange.com/questions/16177/does-gitlab-support-assigning-a-reviewer-based-on-the-contributor">I've detailed this idea here.</a> Should I use the GitLab Group functionality to assign reviewers are say who can merge? Or should I create external tooling around this?</p>
<p>A big concern I have is that a Group in GitLab seems to be focused on Development. But for example a &quot;Senior Review Group&quot; will never produce code.</p>

<gitlab>
GitLab "Groups" for permissions only?
Evan Carroll
# GitLab "Groups" for permissions only?

(Asked by: username_0 on 2022-07-13)

I have a many repos all of which can be edited by a different "Senior Review Group" group. [I've detailed this idea here.](https://devops.stackexchange.com/questions/16177/does-gitlab-support-assigning-a-reviewer-based-on-the-contributor) Should I use the GitLab Group functionality to assign reviewers are say who can merge? Or should I create external tooling around this?

A big concern I have is that a Group in GitLab seems to be focused on Development. But for example a "Senior Review Group" will never produce code.

**Tags:** gitlab


---

## 1 answers

### Answer by username_1 on 2022-07-13. Score: 1

I have followed this pattern in the past for LDAP synchronisation, where a "permission" group was synched with LDAP and then invited into a "projects" group with a specific role.

This used the [Gitlab ldap group synch](https://docs.gitlab.com/ee/administration/auth/ldap/ldap_synchronization.html) feature.

There are a few benefits over adding users directly:

1. you can manage identities exclusively in the IdP (*e.g.* Active Directory) - onboarding/offboarding/privilege escalation all done from the IdP.
2. You make simple declarative statements about which (user) groups need to be in which (project) groups, with given roles.
3. This makes it easier to think about the authn/authz model and indeed makes it feasible to write declarative infrastructure as code for the configuration of the projects themselves -- which group can merge, which branches are protected, *etc*.

On the topic of a "senior review" group which will never produce code - I agree this is a tricky permission to model. You want someone who can approve merge requests and perhaps merge them (thereby effectively making a commit and therefore "producing code" however). However, it's called privilege *escalation*, when what you want is true role-based authorization. I'm not sure you can do that yet with Gitlab.


---

