-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Migrate old Whonix RPC rules to new qrexec policy system #7724
Comments
Actually probably belongs to A Qubes developer (didn't check git history who) already defined Whonix related Qubes UpdatsProxy settings in So perhaps just https://github.com/QubesOS/qubes-core-admin/blob/master/qubes-rpc-policy/qubes.UpdatesProxy.policy needs to be deleted. |
Because legacy. Already replaced by `/etc/qubes/policy.d/90-default.policy`. part of QubesOS/qubes-issues#7724
In QubesOS/qubes-core-admin#487 legacy style This is using the same deprecation mechanism as used and approved (merged) in the past: Getting commented out instead of deleting the file to ensure:
|
Is there something else to do here such as Qubes salt? @marmarek |
Re-posting the comment I left in QubesOS/qubes-core-admin#487 I was curious about this because I still use Here's my
|
If you modified it, it won't be changed for you as per Qubes / Fedora dom0 default for updating config files in /etc. I discovered that the default rule in
Seems to be the default an update Whonix Templates through sys-whonix? I don't think there's an issue? |
No, that file is the default file, as referenced above.
The recommendation is that modifications to the default policy should be done
in a lower numbered file in that directory.
That is what the cacher package is doing.
|
Yes, exactly, user modifications won't be overridden. At some point we'll force migration of all the policies (also modified by the user) to the new location, but it will preserve the changes - just move them. Thanks @adrelanos for QubesOS/qubes-core-admin#487. One remaining change is where the "update every template via sys-whonix" is set: https://github.com/QubesOS/qubes-mgmt-salt-dom0-virtual-machines/blob/master/qvm/updates-via-whonix.sls. I'll open PR for that one. BTW, in R4.2 we'll have a GUI for configuring updates proxy: https://github.com/marmarta/qubes-config-manager#updates |
Without cacher: There's also a fail-safe preventing Qubes-Whonix Templates updated over clearnet. The Templates check if they are connected to a torified Qubes UpdatesProxy. However, even update attempts through sys-net that fail would be an issue because that would effectively break this config. I am testing commenting out my See also: With cacher: I didn't look into cacher yet. Also being discuses here: That ticket would be a full solution I suppose. For an easier solution (fail-safe, non-working cacher) what could be done about this? Would it be a good idea for Qubes-Whonix specifics to be removed from So move Then cacher could use a number higher than I don't have a strong opinion about the file naming and numbering. Some thoughts here: Seems to be a stylistic question for a big part. |
Whonix templates will be using sys-whonix but I'm talking about other Templates like Fedora and Debian. The needed line is commented by default even if you asked to update everything using sys-whonix:
Like @marmarek said, |
Now I understand. Thank you. In other words, a migration path for users who chose |
On Tue, Aug 30, 2022 at 04:53:02AM -0700, Minimalist wrote:
> Seems to be the default an update Whonix Templates through sys-whonix? I don't think there's an issue?
Whonix templates will be using sys-whonix but I'm talking about other Templates like Fedora and Debian. The needed line is commented by default even if you asked to update everything using sys-whonix:
```
# Upgrade all TemplateVMs through sys-whonix.
#qubes.UpdatesProxy * @type:TemplateVM @default allow target=sys-whonix
```
Like @marmarek said, `updates-via-whonix.sls` need to be updated to make the change in the new policy file, otherwise sys-net is the default even if sys-whonix was applied with salt.
Same thing happens with the installer option, the line is not uncommented, but it should be coming from salt too I suppose.
![2022-08-30](https://user-images.githubusercontent.com/51658826/187429046-cf769948-d631-4fb4-a44f-8579edeecb35.png)
I think this is a misunderstanding.
The entries in 90-default.policy are the defaults.
If you select "updates via whonix", in line with the qrexec policy, the
default file is not changed..
Instead, currently the file at /etc/qubes-rpc/policy/qubes.UpdatesProxy
has a new line prepended, directing all templates to sys-whonix.
4.1 has a mechanism that allows for files in /etc/qubes-rpc/policy/.
These files, like lower numbered files in /etc/qubes/policy will
override the default settings in 90-default.policy - that file shouldn't be
directly edited.
As to *what* file should hold the Whonix settings, I favor
30-user.policy
This is because it's possible that users will already have made custom
entries- if they have it's likely they will have used 30-user.policy
because that is referenced in the 90-default file.
Any other file would have to be *guaranteed* to take priority over the
file they have used: that's quite difficult to manage..
|
I know that. My point is if the |
On Tue, Aug 30, 2022 at 07:54:51AM -0700, Minimalist wrote:
> I think this is a misunderstanding. The entries in 90-default.policy are the defaults. If you select "updates via whonix", in line with the qrexec policy, the default file is not changed.. Instead, currently the file at /etc/qubes-rpc/policy/qubes.UpdatesProxy has a new line prepended, directing all templates to sys-whonix. 4.1 has a mechanism that allows for files in /etc/qubes-rpc/policy/. These files, like lower numbered files in /etc/qubes/policy will override the default settings in 90-default.policy - that file shouldn't be directly edited.
I know that. My point is if the `/etc/qubes-rpc/policy/qubes.UpdatesProxy` file is fully commented, it will fall back to the policy in `/etc/qubes/policy.d/90-default.policy` which is not edited based on user choice to use whonix to upgrade all Templates, so by default it will use sys-net.
I'm obviously missing something.
How is it that that file is fully commented?
|
Yes, the PR will comment it out, but that's intended to go hand in hand
with a new policy file - adrelanos suggests 80-whonix, but I prefer (for
reasons already given) 30-user.policy
The PR only makes sense if the new policy is set *somewhere*
|
A Then the top of that file would have to say something similar again like If going for that path, such changes should at least be clearly marked as such by salt. Example:
(Certainly a lot room to make that look nicer.) However, in any case what was
But yeah, designing the Qubes qrexec configuration drop-in folder seems kinda hard. Defaults shipped by packages, auto generated configuration snippets created by Qubes salt and manually created configuration snippets by the user. That's quite complex, quite a few use cases and different approaches possible. I haven't seen that standardized anywhere for any Linux application yet. These For changes made by salt, perhaps a file such as Detail but might be important for migration: For users where all Templates were set to update over sys-whonix using salt |
I find this approach unnecessarily prescriptive and overly complicated.
I don't think it will help users at all.
…-----------------
However, in any case what was `/etc/qubes-rpc/policy/qubes.UpdatesProxy` shipped as a default by a dom0 package shouldn't become `30-user.policy`? A few things here:
* A) the new `/etc/qubes-rpc/policy/qubes.UpdatesProxy`, i.e. `/etc/qubes/policy.d/xx-whonix.policy` shipped by a package;
* B) the policy file when using `updates-via-whonix.sls`
* C) policy for user manually created config ("`30-user.policy`")
-----------------
I don't understand what you mean by this.
|
Confusion amongst users https://forum.qubes-os.org/t/denied-qubes-updatesproxy/2863 Tried to clarify things under https://forum.qubes-os.org/t/denied-qubes-updatesproxy/2863/36?u=insurgo which refers to here and stalled QubesOS/qubes-core-admin#487 |
Waiting for @marmarek. |
This has been done in QubesOS/qubes-mgmt-salt-dom0-virtual-machines@81eab07 (forgot to add this issue to the description). |
old:
/etc/qubes-rpc/policy/qubes.UpdatesProxy
new:
/etc/qubes/policy.d/80-whonix.policy
related:
/etc/qubes/policy.d/90-default.policy
For issue tracking purposes:
This is a technical migration. Qubes developers most likely know what this is about. Related to Qubes dom0 qrexec.
The text was updated successfully, but these errors were encountered: