QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
541 stars 48 forks source link

Provide an easy way for users to have an audio qube (for wired USB audio devices) #8504

Open DemiMarie opened 1 year ago

DemiMarie commented 1 year ago

How to file a helpful issue

The problem you're addressing (if any)

Users like @rapenne-s want to use USB audio devices. Using wireless audio is very risky, but using wired USB audio is quite safe if other devices passed to sys-usb are trusted. However, right now, making sys-usb an AudioVM requires either:

  1. Patching some Salt states.
  2. Making magic changes to system configuration.

The solution you'd like

Make it easy to enable and disable using sys-usb as an AudioVM.

The value to a user, and who that user might be

@rapenne-s (and others) won’t have to ask the Qubes developers why using USB passthrough for sound devices doesn’t work (#8495) because using sys-usb as AudioVM will work.

andrewdavidwong commented 8 months ago

Possible duplicate of #1590.

ben-grande commented 8 months ago

Make it easy to enable and disable using sys-usb as an AudioVM.

I am doing this with Salt, not yet finished, what I am not doing is automatically switching the client audiovm preference, this still requires user intervention. I see the biggest problem is with the policy:

## Soundcard audio
admin.vm.List * sys-audio @tag:audiovm-sys-audio allow target=dom0
## USB audio
admin.vm.List * sys-usb @tag:audiovm-sys-usb allow target=dom0
## All types of audio
admin.vm.List * @tag:audiovm @adminvm allow target=dom0

Notice that for every new AudioVM, the same rules with different values have to be added to avoid an audiovm being able to now information about audio clients from other AudioVMs. It would be nice if Qrexec supported something like @self replacing it by the calling qube name:

admin.Events * @tag:audiovm @self allow target=dom0
admin.Events * @tag:audiovm @adminvm allow target=dom0
admin.Events * @tag:audiovm @tag:audiovm-@self allow target=dom0

I know the @self tag is a change to the Qrexec policy, but it is a change that would make the policy easier to manage for the audio use case, especially useful when the user has multiple USBVMs, they will have different names.

DemiMarie commented 8 months ago

@ben-grande I suggest filing a feature request for that.