Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Feature request: Add DBus communication permissions #1976

Open
Talkless opened this issue Apr 24, 2022 · 3 comments
Open

Feature request: Add DBus communication permissions #1976

Talkless opened this issue Apr 24, 2022 · 3 comments

Comments

@Talkless
Copy link

Description of the feature

Pure Maps can use OSMScout Server to get offline maps from it, but in order to achieve "map-matching" (to get current allowed speed on the way) DBus interface is used.

We can see that Pure Maps's DBus calls are (naturally) denied by AppArmor:

Apr 24 14:45:38 ubuntu-phablet dbus[3227]: apparmor="DENIED" operation="dbus_method_call"  bus="session" path="/io/github/rinigus/OSMScoutServer/mapmatching" interface="org.freedesktop.DBus.Properties" member="Get" mask="send" name="io.github.rinigus.OSMScoutServer" pid=26900 label="pure-maps.jonnius_pure-maps_2.9.0" peer_pid=25166 peer_label="unconfined"

If app manifest somehow could specify "DBus" permission for path /io/github/rinigus/OSMScoutServer/mapmatching, to call Get via org.freedesktop.DBus.Properties interface, ability for cross-app communicaton could be echieved.

Maybe it could be done in more abstract way. OSMScoutServer would define what could be invoke by some other app, naming this ability as "OSMScout DBus Server" permission/interface, while PureMaps (and uNav ar any other) app would specify that it needs to be a "OSMScout DBus Client", thus joining them together. PureMaps AppArmor profile then would be generated to include AppArmor rules for DBus communication, as specified by OSScoutServer package.

Workaround would be to make BOTH apps unconfined. Or implement communication via IP socket channels, but that means different implementation just for UBports specifics...

PureMaps issue is here: rinigus/pure-maps#604

@fredldotme
Copy link

I would welcome this addition and agree, we need something like this.

The way that Snaps handle this is by providing the interface in snap, and letting packages provide/consume those interfaces.
The way you are describing could lead to some wild growth of different AppArmor permissions for various packages,
but in principle those should be manageable.

@mardy
Copy link
Member

mardy commented Jun 25, 2022

An alternative, which might work for this specific case (assuming that these applications get their maps via the QtLocation APIs), would be to write a QtLocation QGeoMappingManagerEngine plugin for OSMScout. It would be a very nice project, because you could even submit it upstream and it wouldn't be restricted to Ubuntu Touch.

@Talkless
Copy link
Author

@mardy PureMaps developers said they don't want "exceptions" for Ubuntu Touch. Other systems use DBus directly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants