Skip to content

Add "Managed Account" badge for GMA users

What does this MR do?

See #214385 (closed)

Adds a "Managed Account" badge to user accounts that are part of a Group Managed Account. This MR also does some refactoring of the existing badges to remove redundant code and improve consistency of styling.

Local Testing

  1. Install an EE license: https://about.gitlab.com/handbook/developer-onboarding/#working-on-gitlab-ee.
  2. Enable the following feature flags: group_saml, enforced_sso, group_managed_accounts, sign_up_on_sso, and convert_user_to_group_managed_accounts
  3. Add group_saml to config/gitlab.yml. See https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/howto/saml.md#gitlab-configuration. Note: Ensure this is added to the development: section of your config
  4. Follow the instructions in https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/howto/saml.md for setting up a local SAML provider using docker. You will need to enable HTTPS
  5. Create a group
  6. Navigate to "Settings -> SAML SSO"
  7. Toggle on "Enable SAML authentication for this group." and add the "Identity provider single sign on URL" and "Certificate fingerprint" from https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/howto/saml.md#configuring-the-group
  8. Navigate to "GitLab single sign on URL" found in "Settings -> SAML SSO" and authorize your account.
  9. In "Settings -> SAML SSO" enable "Enforce SSO-only authentication for this group" and "Enforce users to have dedicated group managed accounts for this group"
  10. In a private/incognito window navigate to the "GitLab single sign on URL" found in "Settings -> SAML SSO" and create a user with the user2 credentials (https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/howto/saml.md#credentials)
  11. With your group owner account navigate to the "Members" section of the group. user2 should have the "Managed Account" badge.

Screenshots

Expand
Page Before After
GMA members gdk.localhost_3443_groups_gma-group_-group_members__2 gdk.localhost_3443_groups_gma-group_-_group_members
GMA members mobile gdk.localhost_3443_groups_gma-group_-group_members_iPhone_6_7_8___2 gdk.localhost_3443_groups_gma-group_-group_members_iPhone_6_7_8
GMA members (all badges shown) gdk.localhost_3443_groups_gma-group_-group_members__3 gdk.localhost_3443_groups_gma-group_-group_members__1
GMA members mobile (all badges shown) gdk.localhost_3443_groups_gma-group_-group_members_iPhone_6_7_8___3 gdk.localhost_3443_groups_gma-group_-group_members_iPhone_6_7_8___1

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Hegman

Merge request reports

Loading