-
Notifications
You must be signed in to change notification settings - Fork 152
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
Replace VerificationReport With New Evidence Types #3602
Conversation
Decoding an empty EvidenceMessage will fail already, so pass up EvidenceKind because we don't need to handle a None value anywhere else after it has been successfully decoded as Some.
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.
There's a lot to digest here, so I made a first pass but I'll probably have more questions and will need to defer a lot to @nick-mobilecoin since he's much more familiar with this than I am.
My biggest confusion right now is that there seems to be places where DCAP is explicitly handled, places where it is skipped, and some confusing (to me) places that sometimes pass along serialized VerificationReport bytes, sometimes DcapEvidence, and try to deserialize either both or just one...
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.
I realize Eran got comments in first so there may be some duplicates hopefully it's not too bad.
Co-authored-by: Nick Santana <nick@mobilecoin.com> Co-authored-by: Eran Rundstein <eran@rundste.in>
Co-authored-by: Nick Santana <nick@mobilecoin.com> Co-authored-by: Eran Rundstein <eran@rundste.in>
Refactor dual verification logic and fix failing test
Co-authored-by: Nick Santana <nick@mobilecoin.com>
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.
LGTM other than it should be comparing the remote_id to the report_data in the dcap verification
Co-authored-by: Nick Santana <nick@mobilecoin.com>
Co-authored-by: Nick Santana <nick@mobilecoin.com>
Co-authored-by: Nick Santana <nick@mobilecoin.com>
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 much cleaner, thank you!
I think the last remaining piece from my perspective is that maybe we should change APIs that are in-enclave-only to just return either the Epid or Dcap struct instead of the enum, since if I understood things correctly, there isn't ever a case where the actual enclave implementation supports both...
Gonna do another review pass and in the meanwhile I triggered CD deployment for this (https://github.com/mobilecoinfoundation/mobilecoin/actions/runs/6511334658) to further verify everything still works as expected. |
I don't think CD will work right now, we're depending on some dcap libraries, but the docker run container is the minimal container for EPID. I've crated a dcap run container for future DCAP CD. |
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.
CD will be handled in a followup PR, so LGTM.
VerificationReport
withEvidenceKind
/EvidenceMessage
Motivation
Clients will be upgraded to 6.0 before servers. MobileCoin 5.0 used EPID verification and 6.0 uses DCAP. Because of this, clients need to be updated to handle both EPID and DCAP verification.
This PR also replaces the rigid
VerificationReport
type with the flexibleEvidenceKind
. Server code has been updated to assume this is theEpid
variant for now. This placeholder code needs to be there for builds to work, but it will never run as it is being replaced with dcap verification.Future Work