Conversation
functions/gh_repo/workload.py
Outdated
|
|
||
| resp = syscall.github_rest_get("/repos/%s/tarball/%s" % (req["repository"]["full_name"], req["after"])); | ||
| syscall.write_key(bytes(key, "utf-8"), resp.data) | ||
| syscall.fscreate_file(base_dir, '%s.tgz' % req['after'], syscall.get_current_label()) |
There was a problem hiding this comment.
Ideally, here we would label the output file with secrecy corresponding to the owners of the repository.
functions/grades/workload.py
Outdated
| base_dir = os.path.join('/', func, user, context['metadata']['assignment']) | ||
| file = os.path.join(base_dir, 'grade.json') | ||
| syscall.endorse_with([[func]]) | ||
| target_label = syscall.new_dclabel([[user]], [[func]]) |
There was a problem hiding this comment.
How does this target_label relate to the current_label? Ideally the current label in this function would more or have at least the right secrecy component at this point (whatever data it reads should be exactly secret to the same people who can read the final grades)
|
A description (potentially as a comment at the top of each function or something, plus some overall description somewhere) of what labels each function expects and how it modifies the current label (through reads or explicit tainting/endorsing) would be really useful. |
|
@alevy In this commit, I switched to a new set of file system syscalls
*See Python's syscalls.py. |
|
@alevy
|
This PR contains ported
go_grader&gradesand changes to test them.TLDR:
./test_ported_functions.shshould build the correct versions of binaries & filesystem images, test run the two functions, andcatthe two functions' output files to thestdout.Changes are:
write_keyandread_keywithfsread,fscreate_[dir|file]andfswriteand callingendorse_withanddeclassify_to.userandfunctionkeys in thecontextso that a function can use the values to label files it creates and to exercise its privilege.faastenbranch ofsnapfaasincludes a new binarysffsthat supports interactions with the labeled file system from the command line.prepfstarget. The target recipe creates directories and files which test runs of functions assume exist usingsffs. The recipe also tells how these files and directories are labeled.snapfaasandsnapfaas-imagesrepositories and builds the binaries and filesystem. Then it makes use of Makefile to test run the ported functions. Last, itcats to thestdoutthe files each function writes to the labeled file system.