Created attachment 1843598 [details] Tailoring profile file: ssg-rhel7-ds-xccdf-tailoring.xml Description of problem: When you 'Edit' the Policy and select the 'XCCDF Profile in Tailoring File' it allows saving. But if you 'Edit' again it selects the first id, not the selected id. Version-Release number of selected component (if applicable): How reproducible: 1. Create a Tailoring Files 2. Create a new Policy 3. Edit the Policy and select a different tailoring profile 4. Check the selected tailoring profile again Steps to Reproduce: 1. Create a Tailoring Files -> Satellite WebUI -> Hosts -> Compliance -> Tailoring Files -> Upload New Tailoring file -> Upload the file attached 'ssg-rhel7-ds-xccdf-tailoring.xml' 2. Create a new Policy -> Satellite WebUI -> Hosts -> Compliance -> Policies -> New Compliance Policy -> Deployment Options - Select: Ansible -> Policy Attributes - Name: policy_test -> SCAP Content: SCAP Content: Red Hat rhel7 default content XCCDF Profile: Default XCCDF profile Tailoring File: ssg-rhel7-ds-xccdf-tailoring XCCDF Profile in Tailoring File: CIS Red Hat Enterprise Linux 7 Benchmark for Level 1 - Minimal [CUSTOMIZED] -> Schedule (any period): Period: Weekly Weekday: Sunday -> Submit * In 'Effective Profile', we can see: CIS Red Hat Enterprise Linux 7 Benchmark for Level 1 - Minimal [CUSTOMIZED] 3. Edit the policy 'policy_test' -> SCAP Content: SCAP Content: Red Hat rhel7 default content XCCDF Profile: Default XCCDF profile Tailoring File: ssg-rhel7-ds-xccdf-tailoring XCCDF Profile in Tailoring File: CIS Red Hat Enterprise Linux 7 Benchmark for Level 1 - WebServer [CUSTOMIZED] <-- Changed to WebServer (before Minimal) * After the change, we can see in 'Effective Profile': CIS Red Hat Enterprise Linux 7 Benchmark for Level 1 - WebServer [CUSTOMIZED] 4. Edit the policy 'policy_test' -> SCAP Content: SCAP Content: Red Hat rhel7 default content XCCDF Profile: Default XCCDF profile Tailoring File: ssg-rhel7-ds-xccdf-tailoring XCCDF Profile in Tailoring File: CIS Red Hat Enterprise Linux 7 Benchmark for Level 1 - Minimal [CUSTOMIZED] <-- Showing Minimal and should select WebServer Actual results: By default, it selects the first tailoring profile id, not the selected profile. Expected results: See the selected tailoring profile Additional info: Possible patch attached 'tailoring_profile_selected.patch'. To apply it: # patch -p0 /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-4.3.3/app/helpers/policies_helper.rb < tailoring_profile_selected.patch
Created attachment 1843599 [details] Possible patch: tailoring_profile_selected.patch
Connecting redmine issue https://projects.theforeman.org/issues/33972 from this bug
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33972 has been resolved.
FailedQA. Version Tested: Satellite 7.0.0 Snap 7.0 Steps followed: 1. Create Tailoring Files 2. Create a new Policy 3. Edit the Policy and select a different tailoring profile 4. Check the selected tailoring profile again Observation: Not able to see the selected tailoring file. Tested with below: XCCDF Profile in Tailoring File: CIS Red Hat Enterprise Linux 7 Benchmark for Level 1 - Minimal [CUSTOMIZED] XCCDF Profile in Tailoring File: CIS Red Hat Enterprise Linux 7 Benchmark for Level 1 - WebServer [CUSTOMIZED]
Thanks, we just realized that the version of foreman_openscap with the fix didn't make it to the snap, I released foreman_openscap.1 to address that
Verified. Tested on: Satellite-7.0.0 Snap 10.0 Steps followed: 1. Create Tailoring Files 2. Create a new Policy 3. Edit the Policy and select a different tailoring profile 4. Check the selected tailoring profile again Observation: Able to see the correct selected tailoring file.
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 (Moderate: Satellite 6.11 Release), 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-2022:5498