Bug 2052904

Summary: [RFE] Prevent the deletion of content credentials when they are in use in Satellite 6.x
Product: Red Hat Satellite Reporter: momran
Component: Content CredentialsAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: David Moore <damoore>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.2CC: chrobert, damoore, momran, satellite6-bugs, thadzhie
Target Milestone: 6.13.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: https://projects.theforeman.org/issues/35588
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-03 13:21:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description momran 2022-02-10 09:17:12 UTC
Description of problem:
=======================

Content credentials (e.g. GPG keys) that are in use by products or repositories in Satellite 6.x can be deleted. We need to implement a safety mechanism to prevent this from happening, and only allow content credentials that are no longer in use to be deleted.


Version-Release number of selected component (if applicable):
=============================================================
Red Hat Satellite 6.8, 6.9 and 6.10


How reproducible:
=================
Always


Steps to Reproduce:
===================

1. Create a GPG key in Red Hat Satellite's web UI under Content --> Content Credentials.

2. Create a custom product/repository in Red Hat Satellite's web UI, and configure it to use the GPG key created in step (1).

3. Go back to Content --> Content Credentials and deleted the GPG key.


Actual results:
===============

The GPG key is deleted.


Expected results:
=================

As the GPG key is still in use by an existing product/repository, the deletion of the GPG key should be blocked.

Comment 2 Chris Roberts 2022-06-28 16:56:40 UTC
This is a valid RFE, adding to our sprint backlog

Comment 6 Bryan Kearney 2022-10-10 16:03:50 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35588 has been resolved.

Comment 8 Brad Buckingham 2022-12-16 20:37:47 UTC
Satellite 6.13 SNAP3 has been confirmed to include these changes; therefore, aligning to 6.13 for verification.

Comment 14 errata-xmlrpc 2023-05-03 13:21:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.13 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2097