Distributors entering Flatpakland
Distributors entering Flatpakland
Posted Jul 9, 2022 15:04 UTC (Sat) by smcv (subscriber, #53363)In reply to: Distributors entering Flatpakland by pabs
Parent article: Distributors entering Flatpakland
For Snap, the portals rely on looking at the AppArmor LSM label, which requires snapd running as root with CAP_MAC_ADMIN to set up (no ability to run completely unprivileged like Flatpak can) and is not great at being cross-distro (works in Debian, Ubuntu and I think openSUSE by default, but won't work on SELinux distros like the Red Hat family, or on machines where AppArmor is on by default at the distro level but has been disabled locally).
For Flatpak, the portals rely on the fact that Flatpak sets up the app's mount namespace in a specific way, with a file /.flatpak-info describing which app this is, in a way that individual apps are not allowed to override.
It would be entirely possible to design a third set of conventions for how app identity works, teach the portals to look for those, and build a non-Flatpak convenience layer around bubblewrap that uses this third set of conventions - but nobody has done this yet, because the people doing the work are sufficiently happy with either Flatpak or one of the other frameworks that already exist.
bubblewrap is mechanism rather than policy, and is a relatively thin and user-unfriendly mechanism layer, because in some system configurations (notably, older Debian and older RHEL) it needs to be setuid root, making it important to minimize the amount of code in it to keep its attack surface small (Firejail is a sandboxing layer that does a lot more than bubblewrap, and it pays for this with the number of root privilege escalation CVEs in its history). If what you want is a non-Flatpak sandboxing mechanism based on bubblewrap, then you're going to need policy and convenience layers similar to the ones in Flatpak.
