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 1482548 - Scap CLI policy update successful with no scap-profile
Summary: Scap CLI policy update successful with no scap-profile
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Ondřej Pražák
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-17 14:04 UTC by Sanket Jagtap
Modified: 2019-08-12 16:08 UTC (History)
4 users (show)

Fixed In Version: foreman_openscap-0.7.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20666 0 Normal Closed Scap CLI policy update successful with no scap-profile 2020-01-30 14:52:41 UTC

Description Sanket Jagtap 2017-08-17 14:04:36 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
policy info --id 5
Id:                        5
Name:                      test1
Created at:                2017-08-17 13:26:59 UTC
Period:                    monthly
Weekday:                   
Cron line:                 
Scap content Id:           4
Scap Content profile Id:   23
Tailoring file Id:         1
Tailoring file profile Id: 52
Locations:                 
    Default Location
Organizations:             
    Default Organization

hammer> policy update --id 5 --scap-content-id 3
Policy updated

 policy info --id 5
Id:                        5
Name:                      test1
Created at:                2017-08-17 13:26:59 UTC
Period:                    monthly
Weekday:                   
Cron line:                 
Scap content Id:           3
Scap Content profile Id:   23
Tailoring file Id:         1
Tailoring file profile Id: 52
Locations:                 
    Default Location
Organizations:             
    Default Organization

Here, the weird part , scap-content 3 , doesn't have a profile-id 23

Actual results:
Scap policy was updated without scap-profile-id parameter

Expected results:
Scap policy update should not be updated with scap-profile parameter

Additional info:

Comment 2 Ondřej Pražák 2017-08-21 10:12:06 UTC
Created redmine issue http://projects.theforeman.org/issues/20666 from this bug

Comment 3 Satellite Program 2017-08-21 12:14:13 UTC
Upstream bug assigned to oprazak

Comment 4 Satellite Program 2017-08-21 12:14:16 UTC
Upstream bug assigned to oprazak

Comment 5 Satellite Program 2017-08-25 16:13:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20666 has been resolved.

Comment 6 Nikhil Kathole 2017-09-10 07:25:36 UTC
VERIFIED

Version Tested:
Satellite-6.3 Snap 15

steps:

# hammer policy info --id 1
Id:                        1
Name:                      policy1
Created at:                2017-09-09 12:34:37 UTC
Period:                    weekly
Weekday:                   thursday
Cron line:
Scap content Id:           4
Scap Content profile Id:   22
Tailoring file Id:         1
Tailoring file profile Id: 30
Locations:
    Default Location
Organizations:
    Default Organization

# hammer policy info --id 2
Id:                        2
Name:                      rhe7_policy
Created at:                2017-09-09 13:26:05 UTC
Period:                    monthly
Weekday:
Cron line:
Scap content Id:           3
Scap Content profile Id:   5
Tailoring file Id:
Tailoring file profile Id:


# hammer policy update --id 2 --scap-content-id 4
Could not update the policy:
  Scap content does not have the selected SCAP content profile

Tried to update with invalid scap-content-profile-id
# hammer policy update --id 2 --scap-content-profile-id 5 --scap-content-id 4
Could not update the policy:
  Scap content does not have the selected SCAP content profile


# hammer policy update --id 2 --scap-content-profile-id 22 --scap-content-id 4
Policy updated

# hammer policy info --id 2
Id:                        2
Name:                      rhe7_policy
Created at:                2017-09-09 13:26:05 UTC
Period:                    monthly
Weekday:
Cron line:
Scap content Id:           4
Scap Content profile Id:   22
Tailoring file Id:
Tailoring file profile Id:

Scap policy requires scap-content-profile-id to update and Successfully updated if both scap-content-profile-id and scap-content-id are valid.

Comment 7 Satellite Program 2018-02-21 16:51:07 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-2018:0336


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