-
Notifications
You must be signed in to change notification settings - Fork 114
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
Implement labels for examples #1066
Comments
Are hash-based labels already supported in Oak? |
Regarding the use of signature labels in the TIR example, I don't think that hash-based labels or signature-based labels are appropriate for the TIR example, as it should use per-user labels to be secure. If hash- or signature-based labels are used, the output from the node is public once the data leaves the node. If an untrusted node receives the output (rather than the gRPC server pseudo node) then the response can be sent anywhere, not only to the user who requested it. |
But if we will use per-user labels, will Oak be able to send requests to an external database? |
Sending a query to an external database is not appropriate for private information retrieval either. The typical use case for private/trusted information retrieval is to not leak the sensitive information that is required to do the query. If the sensitive information that should be protected is removed by the node during declassification, the query can no longer be based on this sensitive data. My understanding was that the external database would be sent into the node (perhaps in batches if it is too big to be send all at once) that has the user data, rather than the node making a query. |
I think I agree with @conradgrobler . @ipetr0v how do you think using a signature-based label helps with this example in particular? Perhaps could you describe the workflow you have in mind including who signs what, and why they should be trusted? |
Currently we have two modules in TIR:
Client sends requests for a specific database entry E to TIR, but client doesn't trust TIR module, because it's just a specific implementation created by a third-party. Client trusts the database_proxy (ex. that was signed by Google) to request E from a database. Thus, client assigns a Google's public key to its data, because only database_proxy is trusted to know E and request it from an external database without revealing it. And database_proxy was created by Google in order for it to be used by multiple third-party applications, that want to benefit from private information retrieval. |
What labels are associated with TIR and database_proxy? Where does the output from database_proxy go? |
There are no labels for TIR and a
|
In our case, is it TIR that requests it? If TIR has no labels, what is stopping it from leaking E or any other data received from the user? |
The idea behind database_proxy was to create a separate generic module, that doesn't depend on specific user requests and just provides a string id lookup in database (TIR just parses the response and sends it back to user).
I think once #1357 is implemented we would be able to add user token labels to a request, but it will also create the following problem:
I think in our case user needs to trust database_proxy's public key, and probably TIR's hash. And TIR also will need to declassify the data (but I don't know if declassification is implemented already). |
Also, data is labeled with the public key, so IIUC only modules labeled with it can declassify this data. |
There are two things that are unclear to me:
|
I think it can, it just cannot send it outside of Oak.
In this case, it looks like we need to trust both modules (TIR and proxy) and use |
Let us start with a simpler case, in which the entire database is already in-memory in the node (no lookups to an external server). @ipetr0v in this case, what is the label of the incoming data, and of the various nodes? |
IFC will stop data with a non-public label from being read by a node with a public label. A node with a public label can always send data outside of Oak.
This just moves the problem elsewhere. A malicious application owner could add another public untrusted module that then receives the declassified output from TIR and sends it elsewhere. The user connecting to the application has no way of knowing whether the output from TIR goes back to the gRPC server, or to some other node. |
Currently it's just public. I started to add a public key label for Problems arise when we cannot fit the whole database (need to make requests) and also want to prohibit the result from being sent somewhere else. |
Also, the problem that @conradgrobler is describing probably may arise in any application, where developers try to use third-party modules for routines involving declassification. |
I think one possible solution to this problem will be to use disjunctions (#1207) So the user assigned label would be |
I am not sure disjunctions would help, a disjunction used in a confidentiality label is strictly weaker than either of the original principals, right? |
But it would mean that either |
What labels should we use with the other examples? All of the label types are a bit inconvenient to maintain:
I think that per-user labels would require the least amount of ongoing maintenance, even though it requires more upfront work. |
These are not interchangeable options, they have different meaning and security properties, we should not choose between them from a convenience point of view, rather based on what makes sense for the individual examples. In particular, I think:
|
Since we probably will implement |
main and router can be in the same module. The module that does declassification will be in a separate one. I think this should be enough, and makes sense in terms of reusability. |
I also think that it makes sense to use Certificate labels for simple examples - since it's easier to maintain and it also captures the notion of updatable modules better. |
Also |
Correct, @rbehjati is adding support to gRPC |
This change updates Trusted Database example to use Router pattern. Ref #1066
I think, for |
I think the following commit (29822e2) was the last one for this issue. |
Similar to #972, but for the rest of the examples (which presumably will need simpler labels).
The text was updated successfully, but these errors were encountered: