-
-
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
New qrexec policy format #4370
Comments
A few questions/remarks:
|
Yes.
We may consider separate directory like /usr/lib/qubes/policy for system policy files (with similar semantic to many XDG and systemd standards - file in higher-priority directory override a same-named file in lower-priority dir, then all files are sorted and evaluated). But given the planned GUI domain, where user have no direct access to dom0 and policy can be modified only through specific API, this shouldn't be a problem in practice, as such conflicting modifications would not be easily possible. Those files will also have a comment that they will overwritten on update, for those accessing dom0 directly anyway (this assume you already know what you're doing).
No, general rule is that default policy is installed with a component providing given service. So, for example default policy for
Shouldn't be a problem, as those files in most cases will be about different services, so order for example between any two 70-* doesn't matter. This approach works pretty well for multiple software packages (udev, fontconfig, sysctl etc).
This would be a nightmare to analyze (both by human and a script). And also to maintain. Note that there may be more than two entities ("system defaults" and "user") willing to edit policy. For example we already have Salt formulas to modify policy for Whonix needs. There may be another system like this. Adding corporate Management VMs to the picture doesn't make it easier too. With new policy format, it's enough to drop appropriately named file, no need to modify config files touched by the user or owned by another package. Theoretically it could be possible with |
Thanks for the detailed answers, it makes much more sense now (especially how there's actually no concerns about people editing policy files because of the gui domain). |
The parser is almost done (QubesOS/qubes-core-qrexec#2). Today we had discussion with @woju whether this should be included in R4.1, or R5.0. And whether the next Qubes version should be R4.1 or R5.0. @woju is on position it is such a major change that warrants bumping major number (R5.0), while I think it is not (R4.1). While the new format is not directly compatible with the old one (meaning there will be a change where and how custom policy files should be placed), we will provide conversion tool, preserving as much of user modifications as possible. Also, I don't think other changes for the next release (ingredients for GUI qube(?), without actually enabling it by default) are major enough to warrant naming it R5.0. @andrewdavidwong do you have any opinion here? |
I don't have a strong opinion about this, but one thing to consider is how many users actually "experience" qrexec. How user-facing is it? My guess is that most users don't really touch it and don't edit RPC policies (except via "yes to all" prompts). If so, then most users might be underwhelmed by the perceived lack of major changes in "5.0." Even those users who do write custom RPC policies might wonder why such a seemingly minor change merits a major version increase. |
Unfortunately it depends on particular user. I'd say this is technically incompatible change, so it should not be 4.1. @marmarek said this release in question is a preparation for 5.0, because apart from new qrexec policy there is also new, unconfigured gui protocol (am I correct?). If so, can we instead name this release 4.9 or 4.5? |
In that case, perhaps you should save this change for 5.0, and the next release should be 4.1 (without this backward-compatible change). It doesn't sound like 4.1 will suffer from not having this change. I think that naming it 4.5 or 4.9 would be confusing. People would wonder what happened to 4.1, 4.2, 4.3, 4.4, etc. |
We've discussed this some more, and I think we've found a solution that do not break compatibility and even make the migration simpler. The migration to new format will work like this:
|
@woju other notes from the discussion:
|
It should be possible to have a static analysis tool evaluate equivalence of policies. I believe such "aggregate effective policy diff" tool would be very useful for writing and reasoning about policies in general. Such a tool could be used to ensure (hopefully) safe migration to the new format. Writing such a tools is, of course, left as an exercise to the reader :P |
One thing I really want is the ability to grant qrexec rights to a specific DispVM once (until it is shut down), and not have the possibility of those rights being assumed by a later different VM whose Essentially I want capability delegation bound to specific VM instances. |
There is
What do you think about adding another syntax for domain UUID? Those are hard enough to not conflict? Alternatively, there could be a mechanism that remove policy rules involving a VM name explicitly - when you remove that VM. That would be more fragile though.
The second point would be solved by UUID. But not the first one - in the current design of rename operation you can't possibly preserve UUID, by the definition of the second "unique" there. BTW it's already possible to have similar effect using the current syntax: add a tag |
Keep it at original files, to still load it using compat rules. This way the update should not break user's policies. Note the unchanged policy files are still going to be removed - meaning those calls will use the new policy. QubesOS/qubes-issues#4370
Use a single /etc/qubes/policy.d/50-qubesctl-salt.policy policy file for dynamic rules, instead of legacy per-service files in /etc/qubes-rpc/policy. This way it's easier to manage the policies by salt (add a comment it's an automatically generated file), while it's still possible for the admin to enforce other rules (in other files). QubesOS/qubes-issues#4370
Make it conform to the convention set in qrexec documentation. And also use new policy location for included admin api policy. QubesOS/qubes-issues#4370
Make it conform to the convention set in qrexec documentation. QubesOS/qubes-issues#4370
Keep it at original files, to still load it using compat rules. This way the update should not break user's policies. Note the unchanged policy files are still going to be removed - meaning those calls will use the new policy. QubesOS/qubes-issues#4370
I came here, because this issue is mentioned in 4.1.0 release notes. |
Is there any new design of a policy not yet discussed in public? Is there a issue tracking that? This one seems relevant to qrexec v4. |
New policy format, draft specification: https://github.com/woju/qubes-core-qrexec/blob/master/Documentation/multifile-policy.markdown
The major change in using one policy, divided into separate files (
.d
approach), with service name and its argument as first two fields in each entry. This allows more flexible policy, easier backup&restore and generally manage it from scripts. Including specific policy API to manage policy itself.Tasks here:
The text was updated successfully, but these errors were encountered: