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

Permissions check for Firewall rely on pkcheck; fall back to root check #17669

Closed
ancorgs opened this issue Aug 24, 2022 · 1 comment
Closed

Comments

@ancorgs
Copy link

ancorgs commented Aug 24, 2022

Explain what happens

If the firewalld configuration is considered to be read-only, then the interface does not allow the authenticated user to start/stop the Firewall or to modify the zones. That's good, but I think the check for read-only needs to be improved.

It's done by executing the command pkcheck --action-id org.fedoraproject.FirewallD1.all --process $$ --allow-user-interaction (see here), which needs polkit to be installed. So no PolicyKit -> no pkcheck -> no firewall configuration.

In a system in which polkit is not installed, it should still be possible to manage the firewall if you log into Cockpit as root. I did a test in such a system just hacking Cockpit to remove the pkcheck call and it certainly worked. So PolicyKit is not really a requirement to manage Firewalld from Cockpit (at least with a privileged user).

I just saw #11033 which states the check done by the Firewall page should be adopted everywhere. Please, improve the Firewall check first. Adopting it everywhere in its current form would make Cockpit totally dependent on polkit.

Version of Cockpit

271

Where is the problem in Cockpit?

Firewall

Server operating system

openSUSE

Server operating system version

ALP

What browsers are you using?

Firefox

System log

No response

@ancorgs ancorgs added the bug label Aug 24, 2022
@martinpitt martinpitt changed the title Permissions check for Firewall rely on pkcheck, which may not be always correct Permissions check for Firewall rely on pkcheck; fall back to root check Aug 30, 2022
@martinpitt
Copy link
Member

You are right -- let's fall back to our usual root permission check, and add a recommends/suggests for pkcheck. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants