-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
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:
- I'm pretty sure the one we actually use is https://github.com/edx/configuration/blob/master/playbooks/roles/edxapp/templates/code.sandbox.j2 (via the path main -> python_sandbox_env)
- There's also one in the codejail role but I'm pretty sure this is unused.
Working from the one in the edxapp role:
/tmp/codejail-*/-- same as in new profile- Various things in
/usr/lib/-- I suspectabstractions/baseactually takes care of this? But it's possible that things that usejson,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,
- Confirmed, abstractions/base should permit all of these:
- Various matplotlib related things:
- A claim that matplotlib needs to be able to write inside the
.configand.cachesubdirectories of the sandbox venv, for temp caches. This is sort of true; we just need to give it some temp dir to use -- otherwiseimport matplotlibfails. 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
- A claim that matplotlib needs to be able to write inside the
/proc/*/mounts r,-- this is just weird and I'm skeptical that it's actually needed
Reactions are currently unavailable