masa-finance / masa-oracle

Masa Oracle: Decentralized Data Protocol 🌐
https://developers.masa.ai/docs/masa-protocol/welcome
MIT License
24 stars 19 forks source link

feat(tee): gate nodes with remote attestation #588

Closed mudler closed 1 week ago

mudler commented 1 month ago

Description

This pull request introduces several enhancements and new features, primarily focusing on enabling remote attestation and TEE (Trusted Execution Environment) support, as well as some general improvements and fixes.

At high level, it boils down to 3 things, enhancing the security posture by allowing only nodes which runs signed binary in the network:

Implementation details

Under the hood this PR makes use of the Ego framework (https://github.com/edgelesssys/ego) to enable confidential computation by writing applications that runs in TEE (Trusted Execution Environment), otherwise called "enclaves".

The Remote attestation is done during the challenging phase where a node before accepting a connection or a work request it will challenge the other party. Similarly, when getting results from workers the challenge make sure that the node is running signed binary.

A new API endpoint is exposed to unencrypt messages from the Oracle. This is coupled with the new setting to always return encrypted data with the TEE keys, to allow external software to rely on messages coming only from the signed oracle binary (as only the signed oracle binary can decrypt that data). This allows external software to make sure that data produced by the oracle code can be verified afterward.

Notes for Reviewers

This PR:

Low hanging fruit (follow-up):

Signed commits

github-actions[bot] commented 1 month ago

PR description is too short and seems to not fulfill PR template, please fill in

mudler commented 1 week ago

Closing as we are moving to a different implementation ( see https://github.com/masa-finance/masa-oracle/issues/613 )