docker snap does not support custom apparmor profiles per container

Bug #1882894 reported by Alfonso Sanchez-Beato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Incomplete
Undecided
Jamie Strandboge

Bug Description

docker supports loading custom apparmor profiles that can be different for each container [1] by using the option "--security-opt apparmor=<your_profile>".

However, this does not work with the docker snap because the docker snapd interface only allows sending signals to a profile named "docker-default" (the default profile for docker containers), so if the name of the profile is different, you cannot stop the container using the docker cli. You get denials when trying to send the kill signal to the container.

Allowing the docker snap to handle custom apparmor profiles for the containers would allow further confinement of the payloads.

[1] https://docs.docker.com/engine/security/apparmor/

James Jesudason (jamesj)
Changed in snapd (Ubuntu):
assignee: nobody → Jamie Strandboge (jdstrand)
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

The docker snap should be updated to plugs 'process-control'. I'd prefer not to change the docker-support interface for this when process-control already handles it.

Changed in snapd (Ubuntu):
status: New → Incomplete
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Removing the 'docker' task as that package is for a KDE component (the deb should be docker.io) and because this doesn't affect the deb.

no longer affects: docker (Ubuntu)
Revision history for this message
Ian Johnson (anonymouse67) wrote :

Jamie, I thought that the docker snap was not allowed to transition to an apparmor profile other than docker-default by design/policy? Has that policy changed?

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Ian, docker:privileged allows it: 'change_profile unsafe /**,'. This is technically for transitioning to unconfined (since there isn't an 'unconfined' profile, we can't specify it in the policy), but it allows transitioning containers (and itself) to other profiles.

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.