Add delete button to GPG keys view in the Admin Credentials Inventory

Why are we doing this work

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.

We need to give Admin's the ability to delete GPG keys but not revoke them for keys which need to be cleared out but are not compromised.

Relevant links

#218701 (closed)

Non-functional requirements

  • Documentation:
  • Performance:
  • Testing:

Implementation plan

backend

  1. Update the destroy service for GPG keys in app/services/gpg_keys/destroy_service to follow similar conventions to the revoke service
  2. Update the existing use of the destroy service for GPG keys in lib/api/users.rb:408 and lib/api/users.rb:870
  3. Update destroy method in app/finders/keys_finder.rb to include GPG keys and use the destroy service
  4. Add tests

frontend

  1. Add GPG keys delete button to view
  2. Add GPG keys deletion modal to button
  3. Add tests
  4. Add QA tests