Bug 1672648

Summary: Combination of SCAP Compliance report for multiple profiles does not show up in Satellite web ui.
Product: Red Hat Satellite Reporter: Jaskaran Singh Narula <janarula>
Component: SCAP PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: mhulan, oprazak, pcreech
Target Milestone: 6.7.0Keywords: 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: 2020-04-14 13:23:49 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:
Attachments:
Description Flags
Search Results with ~ none

Description Jaskaran Singh Narula 2019-02-05 14:14:13 UTC
Description of problem:
After creating SCAP policy with a number or name pattern and running the scan on the same and even on different client systems the compliance report does not show up if multiple policies is selected.
 

Version-Release number of selected component (if applicable):
rubygem-smart_proxy_openscap-0.6.11-1.el7sat.noarch
scap-security-guide-0.1.40-12.el7.noarch
perl-Pod-Escapes-1.04-294.el7_6.noarch
puppet-foreman_scap_client-0.3.16-3.el7sat.noarch
openscap-scanner-1.2.17-2.el7.x86_64
openscap-1.2.17-2.el7.x86_64
tfm-rubygem-foreman_openscap-0.10.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_openscap-0.1.6-1.el7sat.noarch
rubygem-openscap-0.4.7-3.el7sat.noarch


How reproducible:
Fully reproduceable. 


Steps to Reproduce:
1. Simple setup of scap on satellite and on client system. 
2. Make policies with names such as 
    a. 2019 New
    b. 2019 New1 
    c. 2019 New2 
    d. 2019 standard New1 
3. Apply the scan and run the scan on one single host or on different hosts. 

4. After reports get uploaded search with below search options. 

[1] last_for = host and policy ~ "2019"  No result
[2] last_for = host and policy = "2019 New" and policy = "2019 New1" No result
[3] policy = "2019 New" and policy = "2019 New1"  No result


Actual results:
No report comes up. 


Expected results:
Reports associated with the profiles should show up.  

Additional info:

Comment 3 Ondřej Pražák 2019-02-06 11:12:59 UTC
Report always belongs to one policy and there can never be a report that has more that one policy. Because of that, condition 'policy = "2019 New" and policy = "2019 New1"' will always be false, so the examples [2] and [3] return correctly no results. Maybe the search meant to be 'policy = "2019 New" or policy = "2019 New1"'? 

There is a bug in '~' operator, so example [1] returns incorrectly no results. Searching by exact match worked for me: 'last_for = host and policy ="2019 New"'

Comment 4 Ondřej Pražák 2019-02-06 11:19:51 UTC
Created redmine issue http://projects.theforeman.org/issues/26001 from this bug

Comment 5 Bryan Kearney 2019-05-14 08:06:36 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26001 has been resolved.

Comment 6 Sanket Jagtap 2019-12-31 11:39:46 UTC
Build: Satellite 6.7 snap7 


The issue with ~ is fixed and now we can see search results for it on Compliance reports page

PFA

Comment 7 Sanket Jagtap 2019-12-31 11:40:41 UTC
Created attachment 1648786 [details]
Search Results with ~

Comment 10 errata-xmlrpc 2020-04-14 13:23:49 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, 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-2020:1454