Skip to content

Look through old apparmor profile to find possible codejail-service problems #966

@timmc-edx

Description

@timmc-edx

The existing apparmor profile for 2U's deployment of edxapp has additional permissions that the new profile doesn't have. We should look through this to discover additional functionality test cases that might not show up during the dark launch period. (For example, matplotlib.)

Analysis

There are two apparmor profiles in the configuration repo:

Working from the one in the edxapp role:

  • /tmp/codejail-*/ -- same as in new profile
  • Various things in /usr/lib/ -- I suspect abstractions/base actually takes care of this? But it's possible that things that use json, ctypes, heapq, io, csv, datetime, elementtree, pyexpat, and future builtins would fail.
    • Confirmed, abstractions/base should permit all of these:
        /{usr/,}lib{,32,64}/**                r,
        /{usr/,}lib{,32,64}/**.so*       mr,
      
  • Various matplotlib related things:
    • A claim that matplotlib needs to be able to write inside the .config and .cache subdirectories of the sandbox venv, for temp caches. This is sort of true; we just need to give it some temp dir to use -- otherwise import matplotlib fails. ARCHBOM-2180 (matplotlib) #972 will take care of this.
    • More /usr/lib things related to matplotlib (termios, parser) -- again, abstractions/base takes care of these
    • Ability to read system fonts (harmless, but should have test case if we need to add this to the profile). We'll check on this in matplotlib testing in codejail-service #976
  • /proc/*/mounts r, -- this is just weird and I'm skeptical that it's actually needed

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done - Long Term Storage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions