Skip to content

Security concern: Enterprise User can be "owned" by the incorrect group

Stemming from https://gitlab.com/gitlab-com/support/support-team-meta/-/issues/5005 where I'm proposing we revert the definition update that would allow for this.

There is a possible security concern with the way we identify Enterprise Users, which follows the current definition with a recent update: gitlab-com/www-gitlab-com@1ee40a32

Concern

Marking a user an "Enterprise User" of a group means that the owner of the top-level group has various controls over the user account, such as disabling 2FA.

Example scenario

  1. A malicious actor creates a SCIM app that provisions GitLab user accounts with @company.com email addresses.
  2. A user deletes/ignores the confirmation email.
  3. Sometime later, company.com sets up SAML (and optionally SCIM) for their users.
  4. The user confirms their account, and starts using GitLab.
  5. The user account is now confirmed, has access and is using GitLab.
  6. The user is an Enterprise User under the malicious actor's group.
  7. Somehow the malicious actor gets access to the user's email, then on GitLab:
    1. Disables 2FA for the user.
    2. Triggers a password reset link.
    3. Gets access to the account, and everything in company.com's group as well.

While this is an unlikely scenario, it's possible.

In general, a user should not be an "Enterprise" user except when the paid group owns a domain and the user's primary email matches.

Customer scenario

We have 2 customers saying they "own" the same users:

The complication:

Many of the users are provisioned by (and therefore Enterprise Users of) GroupB. However, their email address matches GroupA, who has a verified domain.

According to the original definition, they should belong to GroupA, but they are marked as Enterprise Users of GroupB.

Solution

Other Enterprise User features that require follow up

  • If a new attribute is added to identify enterprise users, it should be available via (users) API to admins at least. | Completed in #416657 (closed)
  • Expose attributes in admin UI: !132938 (merged)

Follow up issues:

  1. Visibility of private emails to group owners: https://docs.gitlab.com/ee/api/members.html#limitations | Related issue #391453 (closed)
  2. Update can_create_group and projects_limit via SAML: https://docs.gitlab.com/ee/user/group/saml_sso/index.html#supported-user-attributes | See #412898 (closed)
    • Note: I suggest we only update these for Enterprise Users, because what if they have SAML with multiple top-level groups?
  3. Optional. Expose enterprise_group_id and enterprise_group_associated_at via members API for group owners when enterprise_group_id matches top-level group.
  4. Maintenance. List of provisioned users API endpoint. We may want to deprecate this endpoint in favour of having the "enterprise user" designation included in the members API. | See #429285 (closed)
Edited by Cynthia "Arty" Ng