possibility of contributing to portal support (USB mass storage)

Alexander Larsson alexl at redhat.com
Fri Dec 6 08:45:48 UTC 2019


On Tue, Dec 3, 2019 at 2:37 AM Winnie Poon <winniepoon_home at hotmail.com>
wrote:

> Hi Alex,
>
> Thanks for making things clear.
>
> I would like to explore the possibility of contributing to the portal
> support for USB mass storage.   A few questions below to help myself and my
> teammates to get a better idea.
>
>
>    - i understand there's no general portal that works for all USB
>    devices, may i know what USB device types we currently have portal support?
>    - from what you said below, it seems like making it work for USB mass
>    storage would be difficult, but would it be possible to come up with a
>    secured solution for that given we have the time and resources to put into
>    it?
>    - if we would like to contribute to the portal support for USB mass
>    storage, we definitely need help from the flatpak developers, what're the
>    general steps/process?
>    - based on your experience from other portal support,  what would be
>    the risks or you have a rough estimate how much time it may take to
>    implement the portal support for USB mass storage?
>
>
> Your inputs  (or from others who have the experience) would be greatly
> appreciated.
>

There is no specific "usb devices" portal, but things like usb webcams are
supported via pipewire, usb printers via the printing portal, and the goal
for e.g. usb joypads is to deliver input events via wayland. Basically we
want to target the solution on the highest level, rather than focusing on
transmission details like what bus is sending the data. This way the
portals are easier to develop against, easier to make a nice user
experience for, and it is easier to reason about their security.

I'm not sure exactly what it is you want to do with USB mass storage, but
generally it is *completely* unsafe to allow any user process access to
block devices, even in a non-sandboxed environment (you need root access).
The "proper" way to handle them is for the host operating system to mount
them (automatically or via some interaction) and then access them via the
filesystem, using whatever permissions system we have for the files (like
the document portal and --filesystem access permissions).

Can you explain your goals at a higher level? What is it the user want to
do in a sandboxed app that you want to facilitate?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20191206/4fb10d99/attachment-0001.html>


More information about the Flatpak mailing list