This means currently only members of group sudo can run upgrade-nonroot to perform passwordless operating system upgrades.
When package qubes-core-agent-passwordless-root is not installed, then user user is no longer a member of group sudo. Hence, this breaks.
To fix this, to be able to perform passwordless operating system upgrades as user user, one solution is to allow group members of group user [1] need to be allowed to run sudo upgrade-nonroot.
Default or luxury? if default then dont fix, not the purpose. user need to use dom0 then use root to do root works inside Appvm/Template.
No passwordless operating system upgrades as a user user (doesnt matter fixed for admin to replace that or not currently, implementation is no root given to user).
This is probably a bit of a twist on things, but personally Iâd recommend omitting upgrade-nonroot entirely from the Qubes VMs. The reason for this is because upgrading qubes without using Qubes Update or application of Salt states is strongly recommended against for security reasons. Updates with Qubes Update should be doable without root even when qubes-core-agent-passwordless-root is absent (though I need to test this to be sure), but even if that doesnât work, upgrade-nonroot should still be avoided on Qubes OS.
In theory, thatâs correct. In practice, Qubes documentation is written as if Qubes Update tool did not have critical issues. In other words, Qubes Update tool does have critical issues.
It would be rather involved to find out the current state of things (going through the Qubes Update tool bug list) but in any case, manual update commands inside a Template arenât the end of the world, unless thereâs a technical rationale why that would be the case.
Default.
Using Qubes Update tool also results in âsome actions that require rootâ (such as running âsudo apt dist-upgradeâ). Passwordless upgrades. So passwordless upgrades arenât a bad thing by definition.
Flatpak updates are also possible with a simple flatpak update [1] run as user.
Why not? Thatâs how itâs done by:
Qubes Update tool
Android / iOS (most devices come with [non-root enforcement](Administrative Rights user freedom restriction by default), where users can update and install apps.
Probably any Linux distribution going âall-inâ on flatpak / snap.
Probably any immutable and maybe verified boot supported Linux distribution. For many use cases, immutable + no root + no updates / app installation possible at all does not satisfy user requirements.
Depends on definition of âno root is given to userâ.
On Android (according to https://www.youtube.com/watch?v=EkL1sDMXRVk, if I remember right), there is not even a root user or anything running as root user. Yet, the user is capable to perform actions which traditionally were reserved for root, such as apps installations, updating apps, configuring network (WiFi), power and battery management (users can control app battery usage, enable battery saver modes, and monitor power consumption without root), VPN configuration, airplane mode, accessibility settings, parental controlsâŚ
For example, WiFi configuration app on Android has only minimal permissions to change settings related to WiFi only. It doesnât have real root rights. Similarly, sdwdate on Kicksecure or Whonix doesnât run as root. It runs under user sdwdate but with capability accessibility (among other restrictions seen in its systemd unit file).
On Linux desktop distributions itâs similar. Battery management, WiFi setup, accessibility, app installation and updates are often possible without root.
Therefore âno root is given to userâ can still remain true even if upgrade-nonroot exists.
Even user admin in non-Qubes (and even root in Qubes) could appreciate upgrade-nonroot as it combines âsudo apt update && sudo apt full-upgradeâ.
The boundary root / non-root is getting more and more blurry. Itâs more about permissions, designing who can do what and how (for example, based on Linux capabilities system).
It will also complicate the source code and documentation. Will require a lot âif non-Qubes, this; if Qubes, thatâ.
Its not about passwordless vs password (yes), its about is there a capability to have a root access from the user when opening the terminal yes or not? yes bad, no good. simple
Out of scope for this discussion.
Debian is not Android nor IOS, because they are immutable OSs while kicksecure/debian are not.
If we were immutable that would the desired case but sadly we are not, so what we can achieve is to no ability to perform any actions which only privileged user/s can do like installing,removing,upgradingâŚetc unless he logged-in (non-qubes) or if in qubes case used dom0 terminal to enter root (or any username with privileges) to perform root/admin actions.
Thats the only way to reach as close as possible to the immutable security.
Its not, thats why they are separated, but it depends on the OS design, what each really mean and capable to do or if at all needed to be available to begin with. (same as above immutable VS mutable).
I didnât suggest to add the capability to have root access from user user terminal.
The purpose of this ticket is the opposite.
It seems root access isnât well defined yet. Root access wonât be possible from user user by default. This includes (non-exhaustive list):
sudo su
su
lxsudo xfce4-terminal
upgrade-nonroot under my definition doesnât grant root access to user user.
Flatpak itself is out-of-scope but examples on how to describe the root / user boundaries are in-scope. The question is, how does flatpak implement that? Answer: pkexec. File: /usr/share/polkit-1/actions/org.freedesktop.Flatpak.policy
upgarde-nonroot can be implemented whether immutable or not. (Implementation details are different but from user perspective there is no big difference.)
For this discussion to make sense, it is required to have a basic understanding of the following two folders:
/etc/sudoers.d
/usr/share/polkit-1/actions/
These show, that the boundary between root / non-root is already âblurryâ.
For instance, take /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy.
<description>Enable or disable system networking</description>
<description>Reload NetworkManager configuration</description>
<description>Put NetworkManager to sleep or wake it up (should only be used by system power management)</description>
<description>Enable or disable Wi-Fi devices</description>
<description>Enable or disable mobile broadband devices</description>
<description>Enable or disable WiMAX mobile broadband devices</description>
<description>Allow control of network connections</description>
<description>Allow control of Wi-Fi scans</description>
<description>Connection sharing via a protected Wi-Fi network</description>
<description>Connection sharing via an open Wi-Fi network</description>
<description>Modify personal network connections</description>
<description>Modify network connections for all users</description>
<description>Modify persistent system hostname</description>
<description>Modify persistent global DNS configuration</description>
<description>Perform a checkpoint or rollback of interfaces configuration</description>
<description>Enable or disable device statistics</description>
<description>Enable or disable connectivity checking</description>
These are all actions which traditionally would have required the user to login as root or have full sudo access to edit arbitrary files and run arbitrary commands.
Nowadays the user can perform these actions âwithout requiring root or sudoâ.
But what does âwithout requiring root or sudoâ mean? It means the user does not need to use root/sudo. However, from the kernel / file systemâs perspective, this is still a privileged action that requires ârootâ access.
So how does it work? Because the process is moderated by a helper utility. In this case, pkexec.
The pkexec configuration files in folder /usr/share/polkit-1/actions/ have file extension .policy. And that makes sense, because these files define the policy.
Should user user be allowed to restart sdwdate? (sdwdate-gui â VM name â restart sdwdate)
Currently: allowed using /etc/sudoers.d snippet.
Should user user be allowed to view sdwdate logs using sdwdate-log-viewer? (sdwdate-gui â VM name â Open sdwdateâs log)
Currently: allowed using /etc/sudoers.d snippet.
user ALL=NOPASSWD: /usr/bin/sdwdate-log-viewer
Letâs suppose the answer is ânoâ. Then sdwdate-gui would need to run as user admin (or root). But that isnât possible (or useful) because Qubes runs only 1 X server under user user. So saying ânoâ here would effectively mean to deprecate the functionality.
Should the user user be allowed to configure Tor using anon-connection-wizard / tor-control-panel?
Letâs suppose the answer is ânoâ. Then anon-connection-wizard / tor-control-panel would need to run as user admin (or root). But that isnât possible (or useful) because Qubes runs only 1 X server under user user. So saying ânoâ here would effectively mean to deprecate the functionality.
Should the user user be allowed to acquire administrative (ârootâ) rights using sudo su or similar?
Currently: allowed by default because package qubes-core-agent-passwordless-root is installed by default.
Planned: A purpose of this ticket is to no longer install qubes-core-agent-passwordless-root by default.
Should user user be allowed to acquire administrative (ârootâ) rights using sudo su or similar?
Currently: Allowed by default because package qubes-core-agent-passwordless-root is installed by default.
Planned: A purpose of this ticket is to no longer install qubes-core-agent-passwordless-root by default.
Should user user be allowed to run systemcheck?
Currently: Allowed using /etc/sudoers.d snippet.
Letâs suppose the answer is ânoâ. Maybe it should be ânoâ. But without Qubes supporting user admin it will not be possible to run systemcheck anymore. Could systemcheck be run as root? Might be possible but would actually be less secure.
Should the user user be allowed to update flatpak packages using flatpak update?
Currently: Allowed by flatpak defaultâs pkexec policy.
Letâs suppose the answer is ânoâ. We might need config-package-dev hide that policy file. Or even more drastic measures⌠[1] Then this would require some investigation. Flatpak would need to run system-wide as root. Or under user admin. If that is even possible. It might even turn out, that running flatpak as user instead of root is more secure.
Should the user user be allowed to run sudo apt-get upgrade && sudo apt-get dist-upgrade?
Currently: Allowed due to qubes-core-agent-passwordless-root (and upgrade- nonroot, which is just a wrapper to combine the two commands).
Planned: Makes sense to keep upgrade-noonroot.
[1] A system without any sudo at all. And/or a system without pkexec. Both provide functionality, but also have attack surface. This might require separate tickets.
I hope the point of the blurry boundary between user and root was made. /etc/sudoers.d and pkexec (policykit) are blurring that boundary. When considering user/root hardening, these have to be considered.
sudoers.d and pkexec enable controlled privilege escalation, allowing non-root users to perform specific actions safely, balancing usability with security. Overly restrictive systems risk users resorting to unsafe workarounds, so by providing access to essential functions without full root access, sudoers.d and pkexec support a secure, usable system.
By providing upgrade-nonroot, users are encouraged to upgrade more easily and more often. I donât see anything insecure about upgrade-nonroot compared to already existing sudoers.d and pkexec exceptions (implemented by upstream projects, Debian, Qubes or Kicksecure).
In scope for this discussion, because Qubes sudo / su / root hardening needs answers for above questions. It cannot really be hardened without these considerations.