Bug 993079 - RFE: Ability to remove SCAP scans from RHN Satellite database
Summary: RFE: Ability to remove SCAP scans from RHN Satellite database
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: New Feature
Version: 550
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Šimon Lukašík
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks: sat560-blockers
TreeView+ depends on / blocked
 
Reported: 2013-08-05 15:07 UTC by Šimon Lukašík
Modified: 2014-01-22 23:17 UTC (History)
6 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-10-03 12:15:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Šimon Lukašík 2013-08-05 15:07:30 UTC
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 15:13:41 UTC
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 15:33:45 UTC
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 14:53:40 UTC
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 14:55:36 UTC
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 14:05:29 UTC
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.