Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review set_nftables_loopback_traffic for RHEL7 #11529

Closed
marcusburghardt opened this issue Feb 1, 2024 · 0 comments · Fixed by #11537
Closed

Review set_nftables_loopback_traffic for RHEL7 #11529

marcusburghardt opened this issue Feb 1, 2024 · 0 comments · Fixed by #11537
Assignees
Labels
Ansible Ansible remediation update. productization-issue Issue found in upstream stabilization process.
Milestone

Comments

@marcusburghardt
Copy link
Member

marcusburghardt commented Feb 1, 2024

Description of problem:

The set_nftables_loopback_traffic apparently was never used in RHEL 7, specially when iptables is the default backend for RHEL 7. RHEL8 also uses firewald and this rule is not included in any RHEL8 profile. But the rule is supported on these systems and is included in the Datastream.

Recently the Ansible remediation for this rule was updated (#11465) because the Ansible module sysctl belongs to different collections depending on the system version:

  • ansible.posix collection in RHEL8
  • ansible.builtin collection in RHEL7.

So, the mentioned PR makes it correct for both versions.

This is not an issue when executing the respective playbooks for a local system, but could be a problema when the Ansible controller in one version tries to execute the Playbook for a client in another version.

SCAP Security Guide Version:

master and stabilization-0.1.72 as of 2024-02-01

Operating System Version:

RHEL7 and RHEL8

Steps to Reproduce:

Execute this process both on RHEL 7 and RHEL 8

  1. ./build_product rhel7 rhel8
    2.a. ansible-playbook --syntax-check build/rhel7/fixes/ansible/set_nftables_loopback_traffic.yml
    2.b. ansible-playbook --syntax-check build/rhel8/fixes/ansible/set_nftables_loopback_traffic.yml

Actual Results:

Example in RHEL 7:
ERROR! couldn't resolve module/action 'ansible.posix.sysctl'. This often indicates a misspelling, missing collection, or incorrect module path.

Expected Results:

No errors detected by ansible-playbook --syntax-check

Additional Information/Debugging Steps:

One option would be to not use FQCN for sysctl, but this is going against the Ansible best practices and might not be a good solution for the long-term. Also changing the module in this specific remediation doesn't seem worthwhile.

@marcusburghardt marcusburghardt added Ansible Ansible remediation update. productization-issue Issue found in upstream stabilization process. labels Feb 1, 2024
@marcusburghardt marcusburghardt added this to the 0.1.72 milestone Feb 1, 2024
@marcusburghardt marcusburghardt self-assigned this Apr 8, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ansible Ansible remediation update. productization-issue Issue found in upstream stabilization process.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant