-
Notifications
You must be signed in to change notification settings - Fork 113
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
Distribution of pre-compiled Wasm modules #1183
Comments
Thinking some more about this:
My current thinking is that there should be a mechanism in the app config serializer to specify that a particular module is to be downloaded from a URL, and checked against a provided hash. For instance, in the aggregator example, we should have a step that builds the Wasm node from sources and publishes that on Google Cloud Store, or as a GitHub release artifact (I think we need to split the aggregator logic from the part of the application that actually creates the gRPC node etc, cc @ipetr0v ). We already have hashes generated for all the Wasm modules. Then as part of the overall application, we would build the untrusted part of the application locally (does not even need to be reproducibly buildable), and reuse the pre-compiled aggregation logic (which is the one that actually uses its declassification privilege in IFC) by downloading it from from where it is published. |
FYI, https://github.com/WICG/webpackage might be useful prior art for distributing signed content on the web as files (see signed http exchange). It would also be a way to bundle resources with a module. |
Thanks @seefeldb , from a quick look that seems aimed at preserving TLS-like signatures in content that was saved offline, but I'll follow the various links and try to understand it better, it may be that it helps with something in Oak. In terms of the original discussion, I think it could be separated into the following orthogonal issues:
|
Yes, it's just a way to sign one or more files with a TLS key, reusing that infrastructure. Would apply to what authors and reviewers do. I imagine there are other standards for signing files with a key that we could look at. Would be nice to leverage existing public key infrastructure (letsencrypt.org is doing a lot of useful stuff, though of course depends on domains). Either way, we should have binary transparency for modules and reviews. |
I think @benlaurie mentioned https://github.com/FiloSottile/age for signing / encryption at some point, though from a quick look I cannot figure out how to actually use it for signing only (@benlaurie do you know how?) |
A few pointers that were discussed in a team meeting earlier today:
|
I think as a first step we could rewrite the Config Serializer in Rust (#740), and add the ability to download Wasm modules from Google Cloud Storage. |
I agree porting the config serializer should be the first step. I don't think we should limit it to download from google cloud though. I would suggest coming up with a manifest file (TOML or protobuf) for applications that describes where to get the various modules (locally or URLs, specify their names, hashes, any other details about the application). Then use this instead of the partially filled-in text protobuf version of the application configuration. |
If we will implement and add hashed to example |
One of the reasons for having the manifest for the application is that the compiled modules will be dowloaded instead of built locally, so I am not sure how such a script would possibly work. But sure, if you can think of any reasonable way of automating that, it would be great! |
Currently saving compiled Wasm modules in Google Storage in a bucket called
|
This change: - Adds the ability to load external Wasm modules with `oak_config_serializer` - Makes TIR example use an external precompiled Wasm module Ref #1183
This change adds a script for saving example modules in Google Storage. Ref #1183
Should this issue be closed after #1232 or we need a different mechanism for module distribution? |
I don't think we need a different mechanism, but also I don't think the current mechanism is sufficiently documented that a developer would actually know how to publish a Wasm module if they wanted to. |
One of the main features of Oak is to allow declassification by nodes that have a WebAssembly logic that is trusted by the owner of the data. For instance, a client may want to specify, via the label / IFC system, that a piece of data can be declassified by a particular Wasm node that aggregates or anonymizes the data before releasing it or further processing it.
In practice this is done by labelling the data with the principal corresponding to that specific node (e.g. the actual hash of the Wasm module, or a key belonging to an entity that is trusted to sign a family of nodes with the desired functionality, or some other schemes involving verifiable logs).
Ideally, an (untrusted) developer of an Oak Application would reuse pieces of logic that implement declassification functionality that have been written / verified by other parties that are more trusted by actual clients / users. For this, we should clarify how a developer would go about including pre-built (and potentially also signed) Wasm modules in a larger Oak Application.
cc @project-oak/core
The text was updated successfully, but these errors were encountered: