Open adrelanos opened 1 year ago
I think the real problem here is that VM names should never be hardcoded in default RPC policy rules. Users aren't supposed to edit the default policies. Even if they do, those changes can be overwritten by an update at any time. Users who copy the relevant rules into 30-user.policy
with their new VM names won't get any important changes to those rules that are pushed to the default policy files.
Besides, it's bad practice for the system to rely on any user-defined property having a specific value; that should be handled by some kind of system-defined property instead. The names of VMs must be assumed to be user-defined properties, since all the user interfaces in the system present these VMs alongside user-created VMs, and the system presents the user with a GUI to change the name on the "Basic" settings tab, which suggests to the user that it's a safe and reasonable thing to do.
If there's a component of the system that the user isn't supposed to touch, don't display it prominently alongside the user's own data, and don't invite the user to edit it in any GUIs. Instead, tuck it away in some "Expert" or "Advanced" area, or make it accessible only via the command line (possibly requiring an --expert
flag).
I can rename my Whonix templates without causing any problems for the default RPC policy rules, since they use @tag:whonix-updatevm
instead of hardcoding the default Whonix template names. Is a similar solution available for sys-net
and sys-whonix
, at least as a short-term stopgap measure?
Your suggestion is valid however should that be a separate ticket?
The feature / bugfix that I'd like to see for this ticket would be for Qubes to make it more prominent if the user attempts to use a non-existing UpdateVM or UpdatesProxy. Only showing this in dom0 journal makes it too hard to debug.
It does not matter how the error case was reached.
Tags work great for selecting which qube given policy rule applies to, in this case "all Whonix-related templates" or similar. But tags (currently) cannot be used to select call target (allow target=...
part in the policy), this needs explicit name to guarantee it points at a specific thing, not multiple qubes (with the same tag). This part is not updated automatically when you rename qube.
I see several possible solutions here:
message
parameter to the deny action, a final deny rule like this: qubes.UpdatesProxy * @anyvm @anyvm deny message="UpdateVM not set for this qube, check Qubes Global Config tool"
, even though I don't like explicit final deny... or maybe service-specific messages defined elsewhere, similar to discussed service-specific prompt dialogs https://github.com/QubesOS/qubes-issues/issues/5853These are all good ideas.
These could all be worth doing and could all go into separate tickets.
Qubes OS release
R4.2
Brief summary
After renaming,
sys-net
tosys-net-customized
orsys-whonix
tosys-whonix-customized-name
,Template upgrades are broken.
Steps to reproduce
Expected behavior
Functional upgrades or at least some error message with advice how to fix the issue.
Actual behavior
Broken upgrades.
Additional
Maybe there should be an error popup (or something):
"Check your Qubes UpdatesProxy configuration."
Still not terribly useful. Hence I will shortly suggest an alternative in a related ticket: