Skip to content

Commit

Permalink
added some docs on apparmor
Browse files Browse the repository at this point in the history
  • Loading branch information
damouse committed Jun 23, 2015
1 parent f9d4f66 commit a154f18
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions docs/apparmor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Snappy Confinement
==================

Snappy confines running applications in two ways: directory isolation and mandatory access control. Directory isolation means the application cannot leave its installed directory. MAC means the application cannot execute any system commands or access any files it does not have explicit, predetermined permissions to.

MAC is the more serious hurdle for paradrop development. Snaps declare permissions through an `AppArmor profile <https://wiki.ubuntu.com/AppArmor>`_.

Getting started with Profile Generation
---------------------------------------

Install tools and profiles::

sudo apt-get install apparmor-profiles apparmor-utils

List active profiles::

sudo apparmor_status

Profiles in complain mode log behavior, while those in enforce mode actively restrict it.sudo apt-get install apparmor-utils

The following steps assume paradrop is installed on the system and not on a virtualenv.

Create a new, blank profile::

cd /etc/apparmor.d/
sudo aa-autodep paradrop

Use aa-complain to put the profile in complain mode::
sudo aa-complain paradrop

Excercise the application! AppArmor will surreptitiously watch the program in the background and log all behavior. Once finished, use the following command to go through the resulting requests, approve or deny them, and autogenerate a profile::

sudo aa-logprof

1 change: 1 addition & 0 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Contents:

quickstart
build system
apparmor
doctests

1 change: 0 additions & 1 deletion meta/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: paradrop
version: 0.0.1
vendor: Paradrop Labs <snappy-devel@lists.ubuntu.com>
icon: meta/hello.png
frameworks: docker
binaries:
- name: bin/start
caps:
Expand Down

0 comments on commit a154f18

Please sign in to comment.