Bug 2228505

Summary: services "included" are not in effect when part of 'rich-rules'
Product: Red Hat Enterprise Linux 9 Reporter: lejeczek <peljasz>
Component: firewalldAssignee: Eric Garver <egarver>
Status: CLOSED MIGRATED QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jwboyer, todoleza
Target Milestone: rcKeywords: MigratedToJIRA
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-21 14:01:59 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:

Description lejeczek 2023-08-02 13:30:12 UTC
Description of problem:

-> $ firewall-cmd --info-service=kube-control-plane-secure 
kube-control-plane-secure
  ports: 
  protocols: 
  source-ports: 
  modules: 
  destination: 
  includes: etcd-client etcd-server kube-apiserver kube-controller-manager-secure kube-scheduler-secure
  helpers:

-> $ firewall-cmd --info-service=kube-apiserver 
kube-apiserver
  ports: 6443/tcp
  protocols: 
...

-> $ _FIRE=kube-control-plane-secure; firewall-cmd --zone=internal --add-rich-rule=\"rule family="ipv4" source address=${_IP} service name=${_FIRE} accept\"

-> $ nmap 10.3.1.61 -p 6443 # result -> filtered

-> $ _FIRE=kube-apiserver; firewall-cmd --zone=internal --add-rich-rule=\"rule family="ipv4" source address=${_IP} service name=${_FIRE} accept\"

-> $ nmap 10.3.1.61 -p 6443 # result -> open

Does that make sense?
Also, if such service - eg. kube-control-plane-secure - is allowed "normally", in 'service' then what happens is what I'd expect - included services get allowed too.

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

firewalld-filesystem-1.2.1-1.el9.noarch
firewalld-1.2.1-1.el9.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 RHEL Program Management 2023-09-21 12:26:31 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 2 RHEL Program Management 2023-09-21 14:01:59 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.