MCPcopy Index your code
hub / github.com/evervault/enclaves

github.com/evervault/enclaves @v1.4.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.4.0 ↗ · + Follow
1,139 symbols 2,696 edges 136 files 75 documented · 7% updated 11d agov1.4.0 · 2026-06-23★ 49
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Evervault Enclaves

Evervault Enclaves are the easiest way to build, deploy and scale Secure Enclaves.

Evervault Enclaves allow developers to easily deploy Docker containers in a Secure Enclave, powered by AWS Nitro Enclaves. Enclaves offer easy deployment, invocation and attestation of Secure Enclaves without the engineering overhead.

This repo consists of two components: the runtime which is run inside the Secure Enclave (the "data plane") and the code used for proxying network traffic and initializing the enclave (the "control plane").

Notice on Open Source Status of this project

The Evervault Enclaves product is open source with the aim of providing transparency to users — this is vital given that our process runs in the enclave, and is accounted for in the attestation.

The current state of this project does not allow for self-hosting. We plan on addressing this by abstracting away the Evervault-specific elements of the Enclaves product.

Steps to get Enclaves running in local dev (macOSarm64)

If you're using vscode you may want to append a check target to your workspace settings

.vscode/settings.json

{
    "rust-analyzer.check.targets": "x86_64-unknown-linux-musl"
}

The crates can then be cross compiled using zigbuild. To install zigbuild, first install ziglang.

Once ziglang is installed, you can install zigbuild as a cargo plugin:

cargo install --locked cargo-zigbuild

Generate a cert and key for the data-plane:

# install mkcert as a trusted CA
mkcert -install

mkcert data-plane.localhost

Generate test certs:

./e2e-tests/mtls-testing-certs/ca/generate-certs.sh

Generate the Root and Intermediate CA for cert provisioning in tests:

sh ./e2e-tests/generate-sample-ca.sh

Generate certs for TLS in the mock API:

mkdir e2e-tests/testing-certs && mkcd e2e-tests/testing-certs
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./testing.key -out testing.crt

Source export-dev-env-vars.sh to set certs as environment variables:

source ./scripts/export-dev-env-vars.sh

Compile:

cargo zigbuild --release --target x86_64-unknown-linux-musl --features network_egress

Compile the mock crypto crate:

pushd e2e-tests/mock-crypto && cargo zigbuild --release --target x86_64-unknown-linux-musl && popd

Build and run docker containers:

docker compose build
docker compose up

Test it out:

curl https://enclave.localhost:443/encrypt -k -H 'api-key: placeholder' --data '{"hello": "world"}' -H "Content-Type: application/json"

Feature flags

By default, the data plane and control plane will be compiled and run without network egress from the enclave.

cargo run

The data plane and control plane can be compiled and run with network egress support using the network_egress feature flag.

cargo run --features network_egress

To build with the enclave feature flag, you will have to specify the target:

sudo cargo clippy --features enclave --target x86_64-unknown-linux-musl

You will also need the x86_64-unknown-linux-musl target:

rustup target add x86_64-unknown-linux-musl

Query Local DNS Server

The enclave DNS forwarder is listening on 53. To test lookup from data plane -> control plane -> remote DNS server use the following command:

dig evervault.com @127.0.0.1

Run end-to-end tests

sh e2e-tests/run.sh

The mock crypto API depends on a (currently private) Rust crate. We plan on making this crate available in future. Until then, the project will be able to build and run the E2E tests in CI.

Extension points exported contracts — how you extend this code

ConfigServerPayload (Interface)
(no doc) [13 implementers]
crates/shared/src/server/config_server.rs
EnvLoadingPhaseMarker (Interface)
Empty trait to enforce correctness in the Environment Loader — an Environment Loader can only wrap a known phase which w [3 …
crates/data-plane/src/env/mod.rs
CertProvisionerPayload (Interface)
(no doc) [3 implementers]
crates/control-plane/src/clients/cert_provisioner.rs
Listener (Interface)
(no doc) [3 implementers]
crates/vsock-proxy/src/net.rs
StorageClientInterface (Interface)
(no doc) [1 implementers]
crates/storage-client-interface/src/lib.rs
Listener (Interface)
(no doc) [5 implementers]
crates/shared/src/server/mod.rs
E3Payload (Interface)
(no doc) [3 implementers]
crates/data-plane/src/e3client/mod.rs
ProxiedConnection (Interface)
(no doc) [5 implementers]
crates/shared/src/server/proxy_protocol.rs

Core symbols most depended-on inside this repo

into
called by 137
e2e-tests/mock-crypto/src/encrypt_mock.rs
body
called by 49
crates/shared/src/server/config_server.rs
len
called by 45
crates/data-plane/src/crypto/parser.rs
to_vec
called by 39
crates/data-plane/src/e3client/mod.rs
build
called by 36
crates/data-plane/src/acme/order.rs
send
called by 35
crates/data-plane/src/base_tls_client/mod.rs
get
called by 33
crates/data-plane/src/lib.rs
into_body
called by 25
crates/shared/src/server/config_server.rs

Shape

Method 491
Function 404
Class 159
Enum 70
Interface 15

Languages

Rust100%
TypeScript1%

Modules by API surface

crates/data-plane/src/server/test_support.rs45 symbols
crates/shared/src/server/config_server.rs36 symbols
crates/control-plane/src/config_server.rs36 symbols
crates/data-plane/src/crypto/parser.rs35 symbols
crates/shared/src/logging.rs34 symbols
crates/data-plane/src/server/tls/cert_resolver.rs32 symbols
crates/control-plane/src/configuration.rs32 symbols
crates/data-plane/src/health/agent.rs28 symbols
crates/data-plane/src/server/metrics.rs27 symbols
crates/data-plane/src/e3client/mod.rs27 symbols
crates/data-plane/src/lib.rs25 symbols
crates/shared/src/server/proxy_protocol.rs22 symbols

For agents

$ claude mcp add enclaves \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact