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

Consider UUID syntax in qrexec policy #8510

Closed
marmarek opened this issue Sep 14, 2023 · 2 comments · Fixed by QubesOS/qubes-core-qrexec#135 or QubesOS/qubes-core-qrexec#180
Closed
Assignees
Labels
C: core P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. release notes This issue should be mentioned in the release notes. security This issue pertains to the security of Qubes OS.

Comments

@marmarek
Copy link
Member

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 disp[0-9]{1,4} happens to collide. The best way to achieve this is not clear to me with the current architecture.

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.
On the other hand, there are similar issues not only about DispVM:

  • policy after VM rename (clone & remove) - would be nice to have an option to adjust policy here (including target= arguments)
  • unrelated re-creation of a VM with a name that got a special permission before - in most cases, should not inherit that permission; but probably not all the cases - for example restoring a VM from a backup probably should not invalidate policy (but this particular case could be solved by also included policy in the backup)

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 uuid-.... and use that in the policy (@tag:uuid-...). It will even work for renames (tags are preserved). But tags will be also inherited during non-rename clone operation. Which may or may not be a good thing here. It will not solve target= and similar arguments.

Originally posted by @marmarek in #4370 (comment)

@marmarek marmarek added T: enhancement C: core release notes This issue should be mentioned in the release notes. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Sep 14, 2023
@andrewdavidwong
Copy link
Member

  • policy after VM rename (clone & remove) - would be nice to have an option to adjust policy here (including target= arguments)
  • unrelated re-creation of a VM with a name that got a special permission before - in most cases, should not inherit that permission; but probably not all the cases - for example restoring a VM from a backup probably should not invalidate policy (but this particular case could be solved by also included policy in the backup)

FWIW, I do sometimes intentionally (re)create and (re)name my qubes in such a way that I assume my custom RPC policies with hardcoded names will match the eventual arrangement of qubes. (For example, I want to recreate qube abc, but I need to keep some files, so I create abc-1, transfer from abc to abc-1, delete abc, then rename abc-1 to abc.) If my custom RPC policies were changing out from under me as I tried to perform deletions and renames, I would be frustrated that I had to "fight against" the system to get it to do what I want. Just one data point from one user. :)

@DemiMarie DemiMarie added security This issue pertains to the security of Qubes OS. affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. labels Nov 21, 2023
@DemiMarie DemiMarie self-assigned this Nov 21, 2023
@andrewdavidwong andrewdavidwong removed affects-4.1 This issue affects Qubes OS 4.1. affects-4.2 This issue affects Qubes OS 4.2. labels Nov 21, 2023
@DemiMarie
Copy link

This requires:

@marmarek marmarek moved this to In review in Current team tasks Mar 13, 2024
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Mar 14, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
@DemiMarie DemiMarie added the pr submitted A pull request has been submitted for this issue. label Mar 14, 2024
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Mar 15, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Apr 14, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Apr 16, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Apr 19, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Apr 20, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue May 1, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue May 2, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Jun 27, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Jul 21, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Jul 21, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Jul 25, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Jul 28, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Jul 28, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Jul 29, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Aug 16, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
DemiMarie added a commit to DemiMarie/qubes-core-qrexec that referenced this issue Aug 16, 2024
This allows using UUIDs in qrexec policy, using the syntax uuid:VM_UUID.
This works anywhere a VM name is expected.  Since ':' is not allowed in
VM names, there is no ambiguity.  This requires the corresponding change
to qubes-core-admin so that qubesd supports UUIDs in the admin and
internal APIs.

Fixes: QubesOS/qubes-issues#8510
marmarek added a commit to QubesOS/qubes-core-qrexec that referenced this issue Oct 9, 2024
A lot of parts assume remote_domain_uuid is set, enforce it.
And also, add it to the help message.

QubesOS/qubes-issues#8510
marmarek added a commit to QubesOS/qubes-core-qrexec that referenced this issue Oct 9, 2024
marmarek added a commit to QubesOS/qubes-core-qrexec that referenced this issue Oct 9, 2024
@github-project-automation github-project-automation bot moved this from In review to Done in Current team tasks Oct 9, 2024
marmarek added a commit to QubesOS/qubes-core-admin that referenced this issue Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. release notes This issue should be mentioned in the release notes. security This issue pertains to the security of Qubes OS.
Projects
Archived in project
3 participants