GitLab.com groups credentials inventory
What does this MR do and why?
There is an existing implementation of credentials inventory for groups, but it is tied to Group-Managed Accounts. GMA is deprecated and much of the code has been removed. This MR updates the groups credentials inventory to use enterprise users instead. No UI elements are changed in this MR.
This MR adds a feature flag just in case we find some show-stopping bug on rollout. We can safely roll it back without an incident.
Related to 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.
- Simulate SaaS, including setting a premium or ultimate plan for a test group.
- Add one or more members to the group.
- Use the Rails console to specify a member user as an enterprise user:
user = User.find_by_username 'the_username' group = Group.find_by_full_path 'the_group_path' user.user_detail.enterprise_group = group user.user_detail.enterprise_group_associated_at = Time.zone.now user.save!
- Enable the feature
Feature.enable(:group_credentials_inventory)
- Navigate to the group. Find the credentials inventory - Secure > Credentials.
- You will now see the enterprise user's personal access tokens, SSH Keys, and project/group access tokens in each respective tab. If none are present, go create either a PAT or SSH key for the enterprise user, or create a group/project access token in the hierarchy.