Bug 993079 - RFE: Ability to remove SCAP scans from RHN Satellite database
RFE: Ability to remove SCAP scans from RHN Satellite database
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: New Feature (Show other bugs)
550
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Šimon Lukašík
Lukas Pramuk
:
Depends On:
Blocks: sat560-blockers
  Show dependency treegraph
 
Reported: 2013-08-05 11:07 EDT by Šimon Lukašík
Modified: 2014-01-22 18:17 EST (History)
6 users (show)

See Also:
Fixed In Version: spacewalk-schema-2.0.2-4 spacewalk-java-2.0.2-41 satellite-branding-5.6.0.16-1
Doc Type: Release Note
Doc Text:
Previously, Satellite SCAP results could not be deleted. In Satellite systems where there are a great number of SCAP scans being performed, there is a degradation in web interface performance. This has been fixed in the present version of SCAP. The Satellite/Organization administrator may now choose the period of time that a SCAP scan will be retained. When a scan falls out of the retention period, the "delete scan" link appears in the scan details page. Scans from a specific system may also be deleted via the system's scan list page.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-03 08:15:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Šimon Lukašík 2013-08-05 11:07:30 EDT
Description of problem:
Satellite should allow for deletion of SCAP results. In deployments
where are thousands of SCAP scans performed the web interface
experiences slowdown.

Version-Release number of selected component (if applicable):
RHN Satellite 5.5+
Comment 2 Šimon Lukašík 2013-08-05 11:13:41 EDT
This has been implemented in upstream project.

spacewalk.git 1fae462932207..6b4ccd7994780
spacewalk.git 7d06206839128..dd1d0122387a7
spacewalk.git 0f60532652c4e
Comment 3 Šimon Lukašík 2013-08-05 11:33:45 EDT
Scope of the work done and the test plan:

General Info
------------
We do not allow deletion of SCAP results by default. The deletion has
to be explicitly allowed for each organization in the Organization
Configuration dialog (or using org.setPolicyForScapResultDeletion() API).
User can specify retention period (in days) for each organization,
default is 90 days (arbitrary choice). Only those SCAP Scans can be
deleted which have passed their retention period.

Changes to WebUI
----------------
The choice of retention period has been added to Organization
Configuration dialog (admin/multiorg/OrgConfigDetails.do).

If the given scan can be deleted, the 'delete scan' link appears at
the Scan's details page toolbar (systems/details/audit/XccdfDetails.do).
This link redirects to deletion confirmation page
(systems/details/audit/XccdfDeleteConfirm.do).

At the page which lists all the scans for the given single system
(systems/details/audit/ListScap.do), there are select boxes added.
User is able to select any scans and hit <Remove Selected Scans> button.
The button again redirects to a confirmation page.

If the scan is deleted, any assigned files (detailed results) are deleted
as well.

Added Frontend API
------------------
system.scap.deleteXccdfScan()
org.getPolicyForScapResultDeletion()
org.setPolicyForScapResultDeletion()

+ added 'deletable' property to system.scap.getXccdfScanDetails() result dict.
Comment 16 Lukas Pramuk 2013-10-02 10:53:40 EDT
VERIFIED. At least for now ;-)

Verified webui funcionality together with API funcionality.
Missing API calls are in place. (comment #8)

spacewalk-schema-2.0.2-13.el5sat
spacewalk-java-2.0.2-46.el5sat
satellite-branding-5.6.0.22-1.el5sat
Comment 17 Lukas Pramuk 2013-10-02 10:55:36 EDT
BUT, I don't like the feeling it ignores me somehow, see:

API:
>>> client.org.setPolicyForScapResultDeletion(key, 1, {'retention_period': 15, 'enabled': False})
1
>>> client.org.getPolicyForScapResultDeletion(key,1)
{'retention_period': 0, 'enabled': False}

'retention_period': 0 !!!

Oh, no, it simply discarded retention period when switching to false

WEBUI:
same behavior - unchecking Allow Deletion of SCAP Results: [_] will discard value of Allow Deletion After (period in days) and set it to 90 days. 


Possibly new BZ...
Comment 19 Lukas Pramuk 2013-10-08 10:05:29 EDT
Possibly? No, definitely ;-)

On behalf of comment #17 filed new bz #1016675

Note You need to log in before you can comment on or make changes to this bug.