Skip to content
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

feat: add multiple TEE modules for handling node key rotation events for different CPU ISAs #195

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bredamatt
Copy link
Collaborator

@bredamatt bredamatt commented Feb 3, 2025

NB! Still a DRAFT.

This shows how to have different modules for verifying different confidential VM implementations.

At the moment:

$ cargo c

error: failed to select a version for `atoma-confidential`.
    ... required by package `atoma-state v0.1.0 (/Users/bredamatt/Repos/Atoma/atoma-proxy/atoma-state)`
    ... which satisfies path dependency `atoma-state` (locked to 0.1.0) of package `atoma-auth v0.1.0 (/Users/bredamatt/Repos/Atoma/atoma-proxy/atoma-auth)`
versions that meet the requirements `*` are: 0.1.0

the package `atoma-state` depends on `atoma-confidential`, with features: `sev-snp` but `atoma-confidential` does not have these features.


failed to select a version for `atoma-confidential` which could resolve this conflict

because it is currently pointing to the main branch which does not have the features in this PR merged: atoma-network/atoma-node#352

@bredamatt bredamatt added enhancement New feature or request confidential-compute labels Feb 3, 2025
@bredamatt bredamatt self-assigned this Feb 3, 2025
@bredamatt bredamatt marked this pull request as draft February 3, 2025 18:53
@bredamatt bredamatt removed the request for review from jorgeantonio21 February 3, 2025 18:53
Copy link
Contributor

@jorgeantonio21 jorgeantonio21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is looking great, if I understand correctly this code only compiles on x86_64 archs ?

@@ -11,6 +11,7 @@ license = "Apache-2.0"
anyhow = "1.0.91"
async-trait = "0.1.86"
atoma-auth = { path = "./atoma-auth" }
atoma-confidential = { git = "https://github.com/atoma-network/atoma-node.git", package = "atoma-confidential", branch = "main", features = ["sev-snp", "tdx"] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a tool to format the toml files ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that only proxies running on Linux (which is probably fine if it is deployed through docker) but on x86_64architecture can run this code, right ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding .toml format, we can do something like this:

[dependencies.atoma-confidential]
git = "url_here"
package = "package_here"
...

which is in sync with the conventions defined here: https://doc.rust-lang.org/style-guide/cargo.html.

Regarding the architecture, I think that only x86_64 supports AMD SNP and Intel CPUs, so yes, correct. If ARM TrustZone is added down the line, then this would require a separate target, i.e. arm64.

Furthermore, regarding Linux, yes if the proxy runs in a container which uses a Linux base image which supports the capabilities required by AMD SEV SNP and Intel TDX, then it will work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, note that the above implies you are compiling with the confidential feature. It will compile without this feature on any machine for now, but naturally, you won't have the ability to verify attestation reports of confidential compute environments without that feature enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants