Comments (3)
The NetworkManager configuration should be performed in the firewall Python module, not just as part of the CLI script, as the issue is not specific to the CLI.
The nuance here is polkit authorization. If the request is done by the firewalld daemon, then it's not representative of the user making the request via firewall-cmd (or ansible). This means NetworkManager can't apply any reasonable policy for modifying the connections (ZONE
) setting; it would always appear to come from the user firewalld runs as, i.e. root
.
My guess is the above is why it's done by the UI and not the daemon.
So the question becomes, does it make sense to allow firewalld
the daemon to modify NetworkManager's connection profiles. It may side-step NM's existing polkit policies.
I'm not sure it makes sense for firewalld (client or daemon) to forward these requests to NM on behalf of the user. It would be better to configure them through NetworkManager directly, but then users are confused because NM will alter the interface to zone assignment at runtime; overriding firewalld's own configuration. This NM integration has been in firewalld for a long time. We can't just drop it.
@thom311, any thoughts?
from firewalld.
Is it possible to run the firewall Python module without root access? If not, I don't see a reason why firewalld wouldn't go through with the changes at library level, instead of CLI level, since in the end the result would be the same, as you'd still have to run the firewalld commands as root. You also wouldn't violate NetworkManager's polkit policies, since they cannot offer capabilities that root does not have (as far as I know, there might be some niche interactions in SELinux or other other security modules).
from firewalld.
Is it possible to run the firewall Python module without root access?
Yes. It's possible to specify and customize the polkit authorization. In practice (default) config changes require root, but they don't have to.
from firewalld.
Related Issues (20)
- firewall-offline-cmd ignores the IP family when creating a new IP set HOT 3
- Deprecate and Drop Lockdown Feature
- Various test suite failure on Debian sid HOT 5
- Firewalld is blocking Network/Samba Client in KDE/Dolphin HOT 4
- Firewalld 2.0: Error from removeSource Call HOT 9
- Doc: Include better explainations of the effects various configurations (i.e. what does the setting do?)
- ipset: config checks should verify that the number of elements does not exceed ipset size
- firewall-config doesn't show policy objects
- Render, but don't apply, rules - for debugging
- In rocky8, I have a question about firewall. Can't iptables command see firewall rules? HOT 4
- Preserve source IP when using masquerade + rich-rule port-forwading
- Policy and IPv6 HOT 3
- Add port forwarding to firewalld doesn't take effect actually HOT 5
- Applet icon missing in the tray but randomly appears after relog HOT 3
- Add SCTP for DLM
- --runtime-to-permanent removing public zone from active zones HOT 2
- Should `https.xml` include `http3.xml`? HOT 1
- Bug in `wrong_args_for_callable()` causes firewall-applet to crash (regression introduced in 2.1.0) HOT 1
- rework D-Bus bindings and move away from deprecated python-dbus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firewalld.