Skip to content

Update policies and models to support groups credentials inventory

Drew Blessing requested to merge dblessing_cred_inv_policies_models into master

What does this MR do and why?

Update policies and models to support groups credentials inventory

This is the first in a series of changes that will enable credentials inventory for Groups on SaaS. This change updates model associations as well as policies for further changes.

This MR contains no documentation or Changelog because very little if anything changes for the end-user. This will come with the last MR in the series - likely !164126 (merged). Look at that MR for more context on where these changes are going. I was originally going to have it all in one MR but it became too large.

Model changes

The existing implementation of Groups Credentials Inventory relied on Group Managed Accounts. This is a defunct feature. The new feature will key off of enterprise users of a group. Enterprise users are effectively owned by the managing top-level group. The linked page describes all the criteria for a user to be marked enterprise user.

These model changes add a new set of associations so we can query a group's enterprise users.

Policy changes

Because enterprise users are owned by the top-level group, the top-level group owners become like an instance administrator. These policy changes will (after the next MR) allow a top-level group owner to access the credentials inventory and revoke a user's personal access token, if desired. The group policy, in particular, does not change any existing behavior until the next MR. That's because the credentials inventory is still not accessible due to helper permission checks. In the next MR I will modify those to solely use these group policy updates.

Related issue: Make credential inventory GA on gitlab.com with... (#297441 - closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Drew Blessing

Merge request reports

Loading