Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2217928

Summary: [RFE] Need api call to delete host puppet certificates in Satellite 6.
Product: Red Hat Satellite Reporter: Akshay Kapse <akapse>
Component: PuppetAssignee: Zuzana Lena Ansorgova <zuansorg>
Status: CLOSED CANTFIX QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.11.5CC: ahumbe, dsinglet, emil.solinski, lstejska, rlavi, zuansorg
Target Milestone: UnspecifiedKeywords: Documentation, FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-01-16 18:11:12 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 Akshay Kapse 2023-06-27 13:54:12 UTC
1. Proposed title of this feature request
- Ability to delete host puppet certificates using api call.

2. What is the nature and description of the request?
- Adding functionality that would remove Puppet certificates.
- Puppet certificates are not getting removed from Satellite even after deleting the host and these needs to be removed manually. An api call will be helpful in this but there is no such option in api.
    
3. Why does the customer need this? (List the business requirements here)
- Automation of the server reinstallation process. (Systems are connected using curl or subscription-manager...)
- Delegating permisons for server reinstallation to individuals outside the Satellite administrators group.

    
4. How would the customer like to achieve this? (List the functional requirements here)
- Enable the removal of the Puppet certificate from a Satellite server or capsule using the Satellite API. When removing a host object via the Satelllite API, the associated Puppet certificat of the removed server should also be deleted.

5. Is there already an existing RFE upstream or in Red Hat Bugzilla?
- No, old https://bugzilla.redhat.com/show_bug.cgi?id=1456782 but got closed as wontfix.

6. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. satellite 7.0)?
- Is it preferable to implement this functionality in Satellite version 6.11.x, if not possible, version 6.12.x of Satellite is also acceptable.

7. Is the sales team involved in this request and do they have any additional input?
-  No

Comment 4 Dana Singleterry 2023-11-29 13:42:42 UTC
Recommended manual workaround: # curl -X DELETE -s -k -u admin:<password> https://satellite.example.com:443/api/v2/hosts/hostname

Comment 5 Emil 2023-11-29 14:06:33 UTC
(In reply to Dana Singleterry from comment #4)
> Recommended manual workaround: # curl -X DELETE -s -k -u admin:<password>
> https://satellite.example.com:443/api/v2/hosts/hostname

Has the solution been verified? According to me and the test in our environment, removing a host via api does not delete the Puppet certificate. 
See point 4.

Comment 6 Zuzana Lena Ansorgova 2024-01-16 18:11:12 UTC
I have verified that the recommended workaround, which deletes the host, does not delete nor revoke the host Puppet certificate.

Obviously, I cannot document a workaround that does not work nor a feature that is not implemented.
Therefore, I am closing this BZ as CANTFIX.

Feel free to re-open if you decide that it should be implemented in the software first.