Split into simpler, more MAC friendly services

Bug #724707 reported by Jason Gerard DeRose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dmedia
Fix Released
High
Jason Gerard DeRose

Bug Description

Where MAC = Mandatory Access Control (stuff like AppArmor, SELinux, etc).

As it's highly network-enabled, dmedia needs to be carefully designed for security, which should include utilizing modern Linux MAC.

Right now the dmedia D-Bus service (`dmedia-service`) only deals with importing. However, dmedia will shortly need to deal with moving files around on the network. This bug proposes that the core, network-enabled components run in `dmedia-service`, and that the import functionality be moved into a new service (say `dmedia-import-service`). By any measure, this is a reasonable, modular design, but in particular it provides huge advantages in terms of mandatory access control.

We want the network-enabled component (`dmedia-service`) to be tightly restricted in what files it can read and write. Aside from essential files needed to run the program, `dmedia-service` only needs to read and write paths within the FileStore layouts. AppArmor permissions like this would nicely restrict to the `FileStore` layouts:

 /**/.dmedia/ rw,
 /**/.dmedia/** rw,

Despite these restrictions, a wide range of operations are possible:

 * Downloading files from other peers/services
 * Other peers uploading files to this peer
 * Transcoding (where master and temp file are both inside FileStore)
 * Rendering (where source clips(s) and temp file are both inside FileStore)
 * Playing files inside the FileStore (will always be case with Novacut player)

However, importing breaks this mold as the importer needs to be able to read basically any file on the filesystem. So rather than give the core service broad permissions, it's better to split importing into a separate executable.

This is also an important step toward splitting dmedia into finer-grained distribution packages. For example, a minimal dmedia application like the Novacut player doesn't need import functionality, so it's good to have the importer optional.

Tags: apparmor

Related branches

description: updated
Changed in dmedia:
milestone: 0.5 → 0.6
Changed in dmedia:
status: Triaged → In Progress
assignee: nobody → Jason Gerard DeRose (jderose)
Changed in dmedia:
status: In Progress → Fix Committed
Changed in dmedia:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.