doc/administration/duo_add_on_seat_management_with_ldap.md
{{< details >}}
{{< /details >}}
{{< history >}}
{{< /history >}}
GitLab administrators can configure automatic GitLab Duo add-on seat assignment based on LDAP group membership. When enabled, GitLab will automatically assign or remove add-on seats for users when they sign in, depending on their LDAP group memberships.
duo_add_on_groups configuration settings.duo_add_on_groups, they are assigned an add-on seat (if not already assigned).The following diagram illustrates the workflow:
%%{init: { "fontFamily": "GitLab Sans" }}%%
sequenceDiagram
accTitle: Workflow of GitLab Duo add-on seat management with LDAP
accDescr: Sequence diagram showing automatic GitLab Duo add-on seat management based on LDAP group membership. Users sign in, GitLab authenticates them, then enqueues a background job to sync seat assignment based on their group membership.
participant User
participant GitLab
participant LDAP
participant Background Job
User->>GitLab: Sign in with LDAP credentials
GitLab->>LDAP: Authenticate user
LDAP-->>GitLab: User authenticated
GitLab->>Background Job: Enqueue 'LdapAddOnSeatSyncWorker' seat sync job
GitLab-->>User: Sign-in complete
Background Job->>Background Job: Start
Background Job->>LDAP: Check user's groups against duo_add_on_groups
LDAP-->>Background Job: Return membership of groups
alt User member of any duo_add_on_groups?
Background Job->>GitLab: Assign Duo Add-on seat
else User not in duo_add_on_groups
Background Job->>GitLab: Remove Duo Add-on seat (if assigned)
end
Background Job-->>Background Job: Complete
Note over GitLab, Background Job: Additionally, LdapAllAddOnSeatSyncWorker runs daily at 2 AM to sync all LDAP users
To turn on add-on seat management with LDAP:
duo_add_on_groups setting to your LDAP server configuration.The following example is a gitlab.rb configuration for Linux package installations:
gitlab_rails['ldap_servers'] = {
'main' => {
# Additional LDAP settings removed for readability
'duo_add_on_groups' => ['duo_users', 'admins'],
}
}