-
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
Assign labels on channel creation #975
Conversation
Expand `channel_create` host function call to accept a Label parameter, similar to `node_create`. Add `Client::new_with_label` method to allow creating a gRPC client pseudo-node at a specific IFC label. This will act as a declassification, once more IFC rules are implemented in the Runtime. Update ABI documentation. Fix aggregator example documentation. Ref project-oak#972 project-oak#630
fn create_node_more_public_label() { | ||
let secret_label = Label { | ||
fn create_node_less_secret_label_err() { | ||
let initial_label = Label { | ||
secrecy_tags: vec![oak_abi::label::authorization_bearer_token_hmac_tag(&[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason for somtimes creating the label explicitly rather than using test_label
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, when I want to make it obvious that there is a relationship between two labels used in the same test case, in which case I prefer having them together and defined locally.
secrecy_tags: vec![oak_abi::label::authorization_bearer_token_hmac_tag(&[ | ||
1, 1, 1, | ||
])], | ||
integrity_tags: vec![], | ||
}; | ||
let less_secret_label = Label { | ||
secrecy_tags: vec![], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for not using public_trusted
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the reason above :) I want to be able to see the difference between the two spelled out.
#[ignore] | ||
#[should_panic] | ||
fn panic_check() { | ||
let label = test_label(); | ||
run_node_body( | ||
Label::public_trusted(), | ||
Box::new(|runtime| { | ||
&label, | ||
Box::new(|_runtime| { | ||
panic!("testing that panic works"); | ||
}), | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daviddrysdale FYI I am adding this (currently ignored) test in this PR, feel free to un-ignore or remove entirely when you get to the bottom of the synchronization issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've stolen it for #978
@@ -15,24 +15,12 @@ output. | |||
Build and run the Backend with the following command: | |||
|
|||
```bash | |||
export RUST_LOG=info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @ipetr0v FYI I am making slight changes to these scripts, let me know if you have any comments, I will send you more PRs soon to make this example work with proper labels anyways.
Reproducibility index:
|
Expand
channel_create
host function call to accept a Label parameter,similar to
node_create
.Add
Client::new_with_label
method to allow creating a gRPC clientpseudo-node at a specific IFC label. This will act as a
declassification, once more IFC rules are implemented in the Runtime.
Update ABI documentation.
Fix aggregator example documentation.
Ref #972 #630
Checklist
cover any TODOs and/or unfinished work.
construction.