-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Provide way for Flatpak to retrieve credentials #209
Comments
@Marukesu I created a topic over at the GNOME forum just to double check if we miss something here: https://discourse.gnome.org/t/flatpack-retrieve-credentials-from-host-eds/7359 Meanwhile: Any chance you can add such a DBus service to this Online Accounts plug as custom branch? We'll most likely need to put it elsewhere before shipping - but this way we can do a quick proof of concept and try to access it from the Tasks app. If this works, we should ultimately be able to package Mail as Flatpack as well 🥳 |
I created the dbus-daemon branch implementing the password lookup part on the host. |
@Marukesu I created the online-accounts-dbus companion branch in Tasks - but I keep getting a I compiled and ran your dbus-daemon manually in Terminal with |
I also came across the Wondering if we really need to roll our own DBus service for this - or if we can simply configure the accounts through the goa lib, grant access to the goa DBus for our Flatpacked, EDS using apps (Calendar, Tasks & Mail) and they pick up the accounts and credentials configured in goa automagically... @tintou? |
You need to add
That happens when the daemon successfully register itself to the session bus. |
Ok; retrieving the credentials works now and I'm again able to modify the task lists color for example. So this is definitely an improvement.
UPDATE: We don't want GNOME Online Accounts. We will need our own credential portal indeed but that requires a lot of thought. |
What we really want for this is a Flatpak Portal. Here's the corresponding discussion from Slack: You need an authorization flow that would be like this:
So basically, that's not just a credential portal, we don't want to mimic libsecret on D-Bus which isn't exposed for reasons - because we need a way to tell if the credentials requesting app is authorized. Otherwise a malicious app could request any credentials and/or spoof another app's id to do so. So a simple DBus handing over whatever credentials are requested is a serious security hole. That's why it's a portal, you always know the origin of the request that way. We should be able to start out with a minimal proof of concept: A portal supporting the full flow for CalDAV accounts only (since this is essentially only three properties uri, username and password) - and then build from there for IMAP/SMTP, OAuth, ... Also remember that for OAuth, each app will need to provide a different Client Secret, only elementary official apps can use the elementary one. |
So, my proposal for the portal API:
The
in the PermissionStore, we can store the permission like this:
Some observations:
The portal is a host process, and we can't use the host EDS to remove/add accounts on the sandboxed EDS, so, we should provide a EDS Module and do the configuration there. The plug should have they own backend, that would serve as the portal backend too. It's means that apps don't depend on host having EDS, and alls the
So apps using it would end unusable in others distros, we can provide a API either in a new library or in granite that would handle the account creation internally in the sandbox when the portal isn't available, or at least warning the developers to provide a fallback by themselves. |
Started to work on the portal in elementary/portals#20 |
@marbetschar @tintou throughts about the proposal? specially the part about removing EDS from the plugin. |
Problem
Flatpacked apps using EDS are not able to retrieve credentials from the host system. Thats why we did not Flatpack Mail till now (elementary/mail#591) and also ran into problems with Tasks for certain operations (elementary/tasks#263).
Proposal
Ideally we should re-use an existing way to retrieve the credentials from the host system.
Prior Art
@Marukesu found a way to escape the sandbox and retrieve the credentials from the host system: elementary/tasks#263 (comment)
The text was updated successfully, but these errors were encountered: