Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoped file systems and read-only snapshots #81

Merged
merged 13 commits into from
Aug 12, 2022
Merged

Conversation

robotlolita
Copy link
Contributor

This patch properly introduces the idea of scoped file systems in Crochet, which means that each package is entirely isolated from each other. It also introduces the idea of pluggable backends for each scope. The pluggable backends are necessary for a related optimisation: bundled files for reducing network latency when Crochet projects are delivered over the web.

There's still a lot of work necessary to make this work securely, however. The new mechanism makes all of the standard library packages an archive file, and then uses an integrity hash when deciding to make them trusted. However, Crochet does not control what files are being distributed, so an attacker could still forge an archive of a standard library package with a matching hash and get native powers for free. This can be better addressed by packaging the TCB in the distribution itself, such that only those get trusted powers. But that'll be left as a follow up.

Scoped file systems also gate access for restricted writing to the underlying storage. This does not tackle the problem of application-specific storage yet (also something that will need to happen in a future PR). But it makes things a bit easier to follow than the previous approach of... passing absolute paths all over. Some good refactoring is still in order here.

@robotlolita robotlolita added enhancement New feature or request c:vm Changes to the VM, compiler,, or language semantics c:stdlib Changes to the standard library c:tooling Changes to the any of the supporting tools labels Aug 12, 2022
@robotlolita robotlolita added this to the Crochet 0.15 milestone Aug 12, 2022
@robotlolita robotlolita marked this pull request as ready for review August 12, 2022 15:13
@robotlolita robotlolita merged commit 92daac3 into main Aug 12, 2022
@robotlolita robotlolita deleted the feat/archives branch August 12, 2022 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:stdlib Changes to the standard library c:tooling Changes to the any of the supporting tools c:vm Changes to the VM, compiler,, or language semantics enhancement New feature or request
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant