Network permission portal #1166
Replies: 10 comments 12 replies
-
Personally, I would prefer to have a specific badge rather than being asked for network access. For example, it wouldn't make sense to be asked for network access for a chat or web browser app... And, for such applications, you won't mark them as sandboxed because they need permanent network access? In short, it's more complicated than it appears. |
Beta Was this translation helpful? Give feedback.
-
It is better to have network permission (at least for Internet access) when needed. With an "on startup" permission, the problem arises when the user sometimes wants to use network features, and sometimes not. In this case, the user will not choose to always grant (or not) permission, and will have to be asked each time the app is started. With a "when needed" permission, the user has their files protected from Internet access (from the app's perspective and if it is fully sandboxed), and Internet access can only be granted for target files. However, a "when needed" permission requires:
Here, this is the case for apps that can share files with web services. Another case that can be discussed, if what I mentioned above is possible, is the case of streaming (especially for apps that have recording and streaming options like OBS Studio). I don't know if there are other cases. |
Beta Was this translation helpful? Give feedback.
-
I think there's limited value in having a long discussion about what people want, if there is nobody with the necessary level of knowledge and availability to be able to say what is and isn't possible, and actually write the code. (I am not that person: I'm responsible for too many projects already and I have very limited time available for flatpak and xdp.) The elephant in the room here is: is a network portal even implementable? If it isn't possible, then it can't happen, however desirable it might be to have one. If it is indeed implementable, I don't see a way for this to happen without significant amounts of design and coding in both the app framework (Flatpak, Snap, etc.) and the portal. In Flatpak, I believe this would require unsharing the network namespace, having some sort of bridge (slirp4netns or similar) between the app's netns and the host machine's netns, and then having that bridge be remote-controllable so it will selectively block or allow traffic under xdg-desktop-portal's control (presumably starting in a state where nothing is allowed, and selectively allowing things from there). I don't know how feasible that is. Has anyone attempted to prototype it? In non-Flatpak app frameworks, if the app framework has a way to do the equivalent of what I described for Flatpak, then it would have to do that, and if not (for example if it unconditionally shares the host netns with the app), then this feature will be impossible to implement for that framework. |
Beta Was this translation helpful? Give feedback.
-
What exactly is the true goal of the portal, apart from being marked "safe"? What exactly is the network portal trying to prevent, that isn't solved already with the network permission we do have? The only reason given so far is to get a nice green "safe" badge. (Trying not to word it like I'm mean, I'm only curious :D) Onward, what safety difference is there between an application with unfettered network access, compared to one that prompts before every network access? Is it to prevent malicious applications, or give more transparency to users? I think it's important to mark this line in the sand. Apart from the reasoning, I would argue that it's really bad UX to give users control over the stopping applications from interacting with the network (which it almost always needs.) I suspect that's why almost no operating system gives you that knob, or if they do you have to go searching for it. At most they'll give you permissions for allowing local network access, which is a much rarer case.
If I can ask, under what conditions would a user be expected to not give network access to an application? A non-comprehensive list of cases I can think for typical network access:
Apart from the portal, would it make sense to let applications explain why they need to connect to the network? That way users can make the distinction between "unsafe because we have no real idea what it's doing" and "it's for playing videos from the internet :)". I also think it makes sense to have a way to prevent local network access, and have that separate from allowing internet access. |
Beta Was this translation helpful? Give feedback.
-
As a general rule of thumb it seems that Flatpak is trying to move away from sandbox holes to more dynamic matters of permission handling like portals. I think based on that reason alone this idea for a portal should be considered. Furthermore, I think it's a good idea to introduce a network portal because it further improves the ability to follow the 'principle of least privilege'. A portal that would be able to communicate and deliver the following for applications would be of benefit, granted I am not intensily familiar with other ways of accessing this information:
This would also nicely integrate with the future applications as described by OP:
I think this portal idea is a great idea, and would be of great use in unifying different network managers into a single usable API for application developers. |
Beta Was this translation helpful? Give feedback.
-
I re-read and realized you wrote this:
I think it would be better if apps had the option to make the request when they need network access rather than only at runtime. Requesting at runtime is relevant for web browsers, while requesting when needed is relevant, for example, for task apps (tasks can be stored locally or be synchronized). As such, there might be two types of dialogues, in the following directions (wording to express direction, not wording necessarily for dialogues):
|
Beta Was this translation helpful? Give feedback.
-
I'm a UX designer for GNOME, Fedora and Red Hat Enterprise Linux, and from a UX perspective I have some fairly major concerns about this proposal. I think that it needs wider discussion before any work is done on it. Ultimately network access requests will have a negative UX impact: it's yet another authorization request that people will have to deal with, and my sense is that it will be quite surprising and confusing for users. One of the main reasons for this is that network access requests are not something that people are used to on other platforms. Network access is also a technical implementation detail which has a wide range of applications, meaning that legitimate reasons for using the network will not be apparent to users, and could be difficult to explain. Access to files or a camera is something that people readily understand. Network access is rather different. |
Beta Was this translation helpful? Give feedback.
-
I understand the desire behind the idea to make it impossible for a malicious app to exfiltrate anything. I don't think that's a realistic goal however. The sandbox prevents a malicious app from exfiltrating data that it doesn't have access to, but to be useful, users will give apps (malicious or not) enough access to be useful to them. IMO the big issue with flatpak networking right now is that it has the exact same access as the host and can connect and expose tcp and udp services on all of localhost. The German AusweisApp (government online identification app) for example works by a browser connecting to a well-known tcp port, so all flatpak'ed apps can access, and man-in-the-middle it as well. We really have to fix this by not giving access to localhost and ideally also not to the local network by default. A portal to get access to the local network would be much easier to understand. Anyway, my point is that unfortunately this is focusing on the wrong thing. It's something one might explore some time into the future but there are more pressing and easier targets when it comes to networking and flatpak. |
Beta Was this translation helpful? Give feedback.
-
Another aspect to consider: Some in GNOME are very interested in local-first networking. Things like apps syncing with each other across your devices and with your friends. I've spent a while planning a "local first" portal with @adzialocha from @p2panda, to enable this kind of functionality without giving apps networking permissions. Notably: this portal wouldn't prompt for permission and would let apps talk to other instances of themselves across devices / friend groups (done in a way that the user ultimately controls). I think increasing the friction of using the network would give incentive for apps to try more local-first approaches. Instead of asking for network permissions (which allow for anything including tracking, leaking personal data, and ads), an app could rely on the OS's built-in peer-to-peer local-first network plumbing to get a connection to other instances of itself running on other devices. Such apps wouldn't have (or even need) a network connection. My point is: we're working on ways to make great app experiences work without a network connection (by leaving the networking to the OS). Network permissions aren't actually necessary to make a chat app, or a document sharing app, or etc. We can build other platform features into the OS to make networking less important. Once we do that, I think starting to lock down networking (especially for new apps) would be great. I also agree that prompting for network permissions every time for every app would be quite annoying from a UX perspective right now. Maybe we could do something like this:
|
Beta Was this translation helpful? Give feedback.
-
Sandbox apps should be able to request network permission at runtime. This is a discussion to get the ball rolling.
Goal
Applications that do not need the network on start or as part of their core features should be able to request the network permission at runtime in order to be considered safe by GNOME Software or flathub.org.
Users should be informed about the request and allowed to reject it if they don't need or want the application to connect to the internet.
Design
To be considered safe, the permission cannot be given without explicit user consent
The permission dialog should explain in clear terms to the user what it means to give network permission and what is the risk.
Future applications
In the future we might want to use a socks proxy for sandboxed app network which could allow for the following use cases that are out of scope for now:
Beta Was this translation helpful? Give feedback.
All reactions