MVC: Define the product requirements for 1st iteration
Background
The GitLab Duo add-ons require seat assignment to individual users to use. Today, for Self-managed customers seats can be assigned through the GitLab UI or through a rake task.
Many customers rely on user management protocols to assign GitLab seats. We'd like to extend these protocols to be used for GitLab Duo. Specifically, this issue will be used to define the requirements for Duo seat provisioning through LDAP (Lightweight Directory Access Protocol).
Notes about LDAP
- Once per day, GitLab runs a worker to check and update GitLab users against LDAP.
- Ensure the user is still present in LDAP.
- If the LDAP server is Active Directory, ensure the user is active (not blocked/disabled state). This check is performed only if active_directory: true is set in the LDAP configuration.
- We should use this to check for Duo status having changed
Expected Customer Flows
New User, Duo seat available
- Customer admin creates account for LDAP user.
- On LDAP user account, customer admin specifies
TBD Duo settingthat indicates the user should be assigned a Duo seat. - When user is created in GitLab, if
TBD Duo settingis enabled and a Duo add-on seat is available, we should create auser_add_on_assignmentrecord for the user.
Requirements
- Customers should be able to assign Duo Add-on seat to LDAP User via LDAP group membership.
Decision
-
LDAP is only available in Self-Hosted instance (Self-managed/Dedicated)
-
We will add new attribute in the
config filefor LDAP to specifygroup(s)that will have automatic Duo add-on seat assignedgitlab_rails['ldap_servers'] = { 'main' => { 'group_base' => 'ou=groups,dc=example,dc=com', 'admin_group' => 'my_admin_group', 'duo_add_on_group' => ['my_duo_add_on_group_1'] # array? } }-
Question: Should we support multiple group or only single group to start?
- Answer: We can have it as array.
-
Question: Should we support multiple group or only single group to start?
-
When the
duo_add_on_groupis set, it will be "Single Source of Truth" for "All LDAP enabled user". -
Whenever a
usersigns in via LDAP, we check if the user is a member of theduo_add_on_groupin LDAP server- If the
user, is member of theduo_add_on_group, we assign user aDuo Seat, if not already assigned. - If
useris not member of anyduo_add_on_groupserver, we remove theDuo Seatof theuser, if any.
- If the
-
This approach will not consider any user that is not LDAP enabled or does not use LDAP sign in.
-
The existing "Manual Duo User management" remain as it is, as it can be used to manage any
non-LDAPuser, if intended.- This will also probably mean no frontend work required, for now.
Design
See Blueprint : Duo Add-on seat assignment via LDAP (#507449 - closed) for technical blueprint.