Introduction

This page just gives a few highlevel details on file locations, etc for Ubuntu Core 16.04+ (later sections will describe 15.04). Important concepts:

Snappy yaml policy example (yaml not related to policy omitted. This example uses 16.04 security-override):

name: foo
version: 1.0
apps:
  bar                        # uses default policy
    command: bin/bar
  baz                        # uses default policy with specified interfaces
    command: bin/baz
    interfaces:
    - network                # auto-connected
    - firewall-control       # manual connected (not added during install)

15.04, 15.10

Snappy yaml policy example (yaml not related to policy omitted. This example uses 16.04 security-override):

name: foo
version: 1.0
frameworks:
 - norf-framework
services:
  - name: bar                       # uses 'default' template with 'network-client' cap
  - name: baz                       # uses 'default' template with specified caps
    caps:
      - network-client
      - norf-framework_client
  - name: qux                       # uses 'nondefault' template with no caps
    security-template: nondefault
  - name: quux
    security-policy:                # uses custom security policy as defined by relative paths
      apparmor: meta/quux.aa
      seccomp: meta/quux.sc
  - name: corge                     # uses 'default' template and 'network-client' cap with overrides
    security-override:
      syscalls: [ some, thing ]
      read-paths: [ /path1, ... ]
      write-paths: [ /path1, ... ]
binaries:
  - name: cli-exe                   # uses 'default' template with no caps
    caps: []

15.04 and 15.10 policy generation is functional but for historical reasons is messy and complex (16.04 cleans these things up). It uses click-apparmor for apparmor policy generation and sc-filtergen for seccomp filter generation

References

SecurityTeam/Specifications/SnappyConfinement/Cheatsheet (last edited 2016-06-13 04:43:47 by jdstrand)