Skip to content

Add GPG key information to the credential inventory

Problem to solve

In 12.6 we introduced the Credentials Inventory to help compliance-minded organizations manage their user's access credentials. Currently, this inventory contains information on PATs and SSH keys. The inventory does not include information about GPG keys that are in use, which can be an additional element of managing credentials in a complex context for customers.

Intended users

User experience goal

Cameron should be able to view GPG key information in the credentials inventory.

Proposal

Add GPG key information to the credential inventory.

Implementation plan

Split into three implementation issues:

  1. Add the GPG keys list view: #282429 (closed)
  2. Add the GPG keys revoke button: #282431
  3. Add the GPG keys delete button: #282432

backend

  • Add GPG keys to app/finders/keys_finder.rb
  • Add GPG keys path to CredentialsInventoryActions
  • Add GPG keys to CredentialsInventoryActions#filter_credentials
  • Create a revoke service for GPG keys in app/services/gpg_keys/...
  • Update revoke method in app/finders/keys_finder.rb to include GPG keys and use the new revoke service
  • Update the destroy service for GPG keys in app/services/gpg_keys/destroy_service to follow similar conventions to the revoke service
  • Update the existing use of the destroy service for GPG keys in lib/api/users.rb:408 and lib/api/users.rb:870
  • Update destroy method in app/finders/keys_finder.rb to include GPG keys and use the destroy service
  • Add tests

frontend

  • Add GPG keys tab to ee/app/views/shared/credentials_inventory/index.html.haml
  • Create GPG keys HAML view in ee/app/views/shared/credentials_inventory/gpg_keys/...
  • Add GPG keys delete and GPG keys revoke modals
  • Add tests
  • Add QA tests
Edited by Robert Hunt