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 1905225

Summary: [RFE] To be able to download ARF report for a host in CSV format in Red Hat Satellite 6
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: SCAP PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7.0CC: ahumbe, dsinglet, mhulan, thadzhie
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-04 19:25:26 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 Sayan Das 2020-12-07 18:51:03 UTC
1. Proposed title of this feature request

Generate and Download Arf report for a host in CSV format from Satellite 6.


2. What is the nature and description of the request?

Change in code for the product is required to achieve the desired goal. 


3. Why does the customer need this? (List the business requirements here)

the client needs a user-friendly tool to tabulate and graph the findings for all hosts in 1 spreadsheet. The client would use the functionality of Excel to create a spreadsheet of all hosts, with subtotals of all findings for each host.  This would be followed by a graph of the findings by host.

Customers can achieve the same if the arf report can be downloaded in CSV format instead of HTML or XML.


4. How would the customer like to achieve this? (List the functional requirements here)

Right now, there are only two options present for downloading an arf_report related to a host.

--> /api/compliance/arf_reports/:id/download  --> This downloads the data in bzip format and then after extracting it you get the XML format

--> /api/compliance/arf_reports/:id/download_html  --> This downloads the data directly in html format


Have a new API introduced e.g. /api/compliance/arf_reports/:id/download_csv to download and save the report in CSV format. 

Introduce a similar flag in hammer command as well.



5. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.
- Build a Satellite.
- Register hosts, assign SCAP profiles on the same, configure openscap run and wait for the SCAP reports to get uploaded.
- Use "/api/compliance/arf_reports/:id/download_csv" API end point to download report from any host in CSV format.


6. Is there already an existing RFE upstream or in Red Hat Bugzilla?
No.


7. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

As soon as possible


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


9. List any affected packages or components.
- foreman
- openscap


10. Would the customer be able to assist in testing this functionality if implemented?
Yes

11. Additional information:

NA

Comment 1 Ondřej Pražák 2020-12-08 07:10:00 UTC
Would it make sense to use a report template engine to generate that CSV file? A new endpoint would allow users to download only a single Arf report as CSV while report template could aggregate results for multiple hosts in one file, which seems desirable.

If users wish to 'tabulate and graph the findings', do we have any details on what columns the CSV should contain?

Comment 2 Sayan Das 2020-12-08 12:27:56 UTC
(In reply to Ondřej Pražák from comment #1)
> Would it make sense to use a report template engine to generate that CSV
> file? A new endpoint would allow users to download only a single Arf report
> as CSV while report template could aggregate results for multiple hosts in
> one file, which seems desirable.
> 
> If users wish to 'tabulate and graph the findings', do we have any details
> on what columns the CSV should contain?

Hello,

Yes and that would definitely make sense and will be helpful for the customer but since there wasn't any feature available for the same, I went ahead for the API option only for the RFE. 

I need to check back with the customer to understand what is exactly they are looking for in a consolidated report. Once I have the information, I will update here.

Comment 4 Sayan Das 2020-12-08 19:54:44 UTC
Hello Ondřej,

The customer is requesting a button in the Satellite web UI that downloads 1 csv file with the findings from only the latest OpenSCAP report for each host.

For example, let's say there are 75 hosts registered to the Satellite server (location 1) and 25 hosts registered to the Capsule server (location 2).  Each host has been OpenSCAP scanned once a month for the last 3 months (so there are 300 OpenSCAP reports).  The CSV file should contain the findings from only the latest OpenSCAP report for all 100 hosts.

The columns in the csv file should be: Host, IP Address, Id, Group Title, Version, Description, DISA Id, Mitre Id, Severity, Passed.


Let me know if this information helps in understanding the exact requirement.



-- Sayan

Comment 5 Ondřej Pražák 2021-01-11 10:23:28 UTC
Created redmine issue https://projects.theforeman.org/issues/31605 from this bug

Comment 15 Brad Buckingham 2022-12-02 18:42:02 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 17 Brad Buckingham 2023-01-04 19:25:26 UTC
Thank you for your interest in Red Hat Satellite. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.