Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 35,777
    • Issues 35,777
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 1,247
    • Merge Requests 1,247
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Metrics
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #36742

Closed
Open
Opened Nov 19, 2019 by Matt Gonzales@mattgonzalesContributor

PAT/SSH Inventory MVC

Problem to solve

We've explored this issue and now need to implement the MVC for this feature.

Proposal

A "Credentials" view in the admin panel showing all PAT and SSH credentials for a GitLab instance.

  • Columns (should be sortable and filterable)
    • Owner: User it's associated with, if any.
    • Type: Type of credential, PAT, SSH key, etc.
    • Scope: How it's scoped, if relevant (api, etc.)
    • Last used: Last time this key was used.
    • Expiration: When the credential expires, if any.
Rough Idea Prototype Draft Working Concept
Screen_Shot_2019-11-21_at_10.47.19_AM Desktop_HD

working concept

Our initial concept for this inventory of credentials. The first draft of a prototype for the inventory. Concept designed by @manojmj with backend considerations taken into account.

Working Concept Breakdown

Separate out the type of credentials in the view to make this feature more performant and future proof instead of loading all kinds of credentials in one single view.

Advantages:

  1. Different types of credentials are stored in different tables in the db and hence to show all these credentials in a single view would mean that we'd have to query multiple tables at once and then sort them in memory (possibly).
  2. A homogeneous list of items is much easier to sort and filter than a heterogeneous list.
  3. The attributes in these tables also differ, eg: PAT has expiry and scopes but SSH does not. SSH has last_used_at but PAT does not and as far as I understand, it would mean a bunch of if..else statements to display this properly.
  4. Separating out the different types of credentials scales - if we have to add a third kind of credential to the view, it'd be very easy.

We use a similar approach in /admin/users already, ie, tabs for Deactivated, Blocked users etc.

Default to Most Recent to Oldest sort order based on the "Last Used" column.

Users should be able to sort and filter to see desired data subsets.

Permissions and Security

Only Administrators should be able to view this.

Edited Dec 18, 2019 by Daniel Mora
Assignee
Assign to
12.6
Milestone
12.6 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab#36742