-
Notifications
You must be signed in to change notification settings - Fork 46
manage proxied vault account per shard #1467
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
ecdf920
add design document with some mermaid diagrams
brenzi 347e187
support enclave signing with changing keypairs at runtime
brenzi 81e94dd
tame nervous polling of not yet finalized block
brenzi 6ddd043
shard vault account creation works
brenzi 156aac3
prepare vault account getter. not working yet
brenzi f1d3d77
fix build and add trusted_call dummy for unshielding
brenzi 9911098
fix transfer call indexes
brenzi ead3662
unshieldind dummy with real vault account and proxy call
brenzi b20d978
await vault account creation before registering proxy
brenzi 4524b9f
proxied unshielding call encodes correctly and would be executed if t…
brenzi 6587f1b
start MU_RA doc diagrams and refactor namings for improved readability
brenzi d5ce0c7
refactoring MU RA functions for better readability. try to extract cl…
brenzi cd3562d
logging pubkey of counterparty now during MU RA. but seems skip_ra wo…
brenzi 36bdc5c
add client account to MU RA request
brenzi b5da3a2
starting to modularize vault logic
brenzi ed26be7
secondary worker is registered as a vault proxy now
brenzi da6bea0
Merge remote-tracking branch 'origin/master' into ab/proxied-vault-ac…
brenzi b72c063
cleanup
brenzi 4d2c000
clippy
brenzi 9bc2e60
doc cleanup
brenzi 757c07a
doc pimp
brenzi 2b7ed16
cleanup
brenzi bb69ebd
reverting polling fix which is solved in another PR
brenzi 42fac49
fix diagram bug
brenzi f5acb2d
fix mock test
brenzi 6e03fff
avoid panic if add_shard_vault_proxy fails
brenzi 2109bd2
skip shard vault stuff for offchain-worker
brenzi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactoring MU RA functions for better readability. try to extract cl…
…ient pubkey form cert. builds but fails
- Loading branch information
commit d5ce0c7f01a2c3372332900766a66230609ee15a
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -234,6 +234,31 @@ pub fn percent_decode(orig: String) -> EnclaveResult<String> { | |
| Ok(ret) | ||
| } | ||
|
|
||
| pub fn parse_cert_issuer(cert_der: &[u8]) -> SgxResult<Vec<u8>> { | ||
| // Before we reach here, Webpki already verified the cert is properly signed | ||
|
|
||
| // Search for Public Key prime256v1 OID | ||
| let prime256v1_oid = &[0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07]; | ||
| let mut offset = cert_der | ||
| .windows(prime256v1_oid.len()) | ||
| .position(|window| window == prime256v1_oid) | ||
| .ok_or(sgx_status_t::SGX_ERROR_UNEXPECTED)?; | ||
| offset += 11; // 10 + TAG (0x03) | ||
|
|
||
| // Obtain Public Key length | ||
| let mut len = cert_der[offset] as usize; | ||
| if len > 0x80 { | ||
| len = (cert_der[offset + 1] as usize) * 0x100 + (cert_der[offset + 2] as usize); | ||
| offset += 2; | ||
| } | ||
|
|
||
| // Obtain Public Key | ||
| offset += 1; | ||
| let pub_k = cert_der[offset + 2..offset + len].to_vec(); // skip "00 04" | ||
|
|
||
| Ok(pub_k) | ||
| } | ||
|
|
||
| // FIXME: This code is redundant with the host call of the integritee-node | ||
| pub fn verify_mra_cert<A>( | ||
| cert_der: &[u8], | ||
|
|
@@ -346,6 +371,7 @@ where | |
| verify_attn_report(attn_report_raw, pub_k, attestation_ocall) | ||
| } else { | ||
| // TODO Refactor state provisioning to not use MURA #1385 | ||
| // TODO DCAP is currently just passed through! SECURITY!!! | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't aware that our MU RA is insecure for DCAP. Increases the urgency for #1385 |
||
| Ok(()) | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this is currently not used. I wrote it because I tried to derive the MU RA client from the TLS certificate. fell back to passing it as a payload instead. Still, I think this fn might be useful on its own. webpki and rustls hide the issuer all too well behind private fields