Skip to main content

syft-enclave

Enclave support for syft, enabling secure computation in Trusted Execution Environments (TEEs).

About

Prerequisites

Shared by both deployment targets:

  • Docker with buildx support (Docker Desktop includes this)
  • just and jq

For Confidential Spaces (the rest of this README):

For Tinfoil, see docs/tinfoil_deployment.md — no GCP needed.

All commands are defined in the Justfile. Run them from this directory.

Prefer declarative deploys? The same stack can be managed with Terraform — see Confidential Spaces Deployment (just tf-apply / just tf-apply-dev).

Deploying without GCP? See Tinfoil Deployment (just tinfoil-build / just tinfoil-release / just tinfoil-deploy), which needs the tinfoil CLI instead of gcloud. On Tinfoil the data owners are pinned in the measured config instead of set at init, and a second config turns on signed job receipts.

One-time setup

just init YOUR_GCLOUD_PROJECT_ID TOKEN_PATH DATA_OWNERS
  • TOKEN_PATH — credentials of the enclave email downloaded from the gcloud console.
  • DATA_OWNERS — comma-separated emails of the data owners whose approval gates every job on this enclave, e.g. do1@openmined.org,do2@openmined.org.

This stores settings (including data_owners) in ~/.syft-enclaves/settings.json and sets the active gcloud project. Every other recipe reads project_id, zone, and data_owners from this file — zone is not a per-call arg. To deploy in a different zone or change the data owners, re-run just init YOUR_PROJECT_ID TOKEN_PATH DATA_OWNERS europe-west4-a.

Approval model

The data owners configured at init are fixed for the enclave: a job runs only after all of them approve it, regardless of which datasets the submission references. The emails are passed to the VM as SYFT_ENCLAVE_DATA_OWNERS at deploy time and held in memory by the running enclave. To change the approving data owners, re-run just init and redeploy.

Each data owner also approves which of the files the DS asked to read go to whom: approve_job(job, share_files=...), or the whole request when share_files is left out. The enclave shares a file with a reader only when every data owner approved it for that reader. The outputs are the exception: they always reach the DS. But a file that the DS names in share_files at submission, even one under outputs/, goes only to the readers listed for it, so the DS names itself there too, e.g. share_files={"outputs/count.json": [data_owner, ds]}.

After a run, the data owners can share a log that nobody approved yet. Each of them calls request_stderr(job, readers=..., n_chars=...) or request_stdout(...). When every data owner made the same call, the enclave shares the log, or only its first n_chars characters.

Production deployment

Hardened image — no SSH access, TEE enforcement enabled.

just start EMAIL                          # defaults: syft-enclave-vm, n2d-standard-2
just start EMAIL my-vm n2d-standard-4     # override name / machine type
just stop [name]                          # Teardown: Deletes the VM (default: syft-enclave-vm)

The first run also provisions APIs and IAM roles (idempotent). No inbound port is opened on the enclave — attestation is published through the peer flow, and all other traffic is outbound.

Debug deployment

Debug image — SSH enabled, container logs redirected to serial output.

just start-debug EMAIL                          # defaults: syft-enclave-vm, n2d-standard-2
just start-debug EMAIL my-vm n2d-standard-4     # override name / machine type
just stop [name]                                # Teardown: Deletes the VM.

An enclave always requires encryption, debug enclaves too. Clients select encryption from the enclave policy, so they need no setting.

GPU deployments

Prefix any deploy with hardware=gpu to switch from the CPU default to a3-highgpu-1g (1× H100 80GB, Intel TDX):

just hardware=gpu start EMAIL           # production
just hardware=gpu start-debug EMAIL     # debug

GPU enclaves use flex-start provisioning: the create call may wait for H100 capacity (up to 2h), then the VM runs gpu_run_duration_seconds (default 2 days). Details: Confidential Spaces — GPU deployments.

Inspect a running VM

All inspect commands take an optional name (default: syft-enclave-vm). Zone is always read from settings.json.

# Works on both production and debug
just status [name]   # RUNNING / TERMINATED / etc.
just get-ip [name]   # external IP

# Debug only
just ssh    [name]   # SSH into the VM (production image disables SSH)
just logs   [name]   # last 50 lines of serial output (production only shows boot logs;
                     # debug redirects container logs to serial output)

Metadata

Release files for syft-enclave 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for syft-enclave 0.1.3
File Size Uploaded Provenance Actions
syft_enclave-0.1.3.tar.gz 118.3 kB Without provenance Details for syft_enclave-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for syft-enclave 0.1.3
File Interpreter ABI Platform Actions
syft_enclave-0.1.3-py3-none-any.whl Python 3 none any Details for syft_enclave-0.1.3-py3-none-any.whl

Total release size: 205.2 kB

Release files / syft_enclave-0.1.3.tar.gz

Download URL syft_enclave-0.1.3.tar.gz
Size 118.3 kB
Tags Source
SHA-256 checksum
How to use checksums
16e4055e86dbf54c11206177c8478a5914966f45d46177ffdf4985bc3041b69a
BLAKE2b-256 checksum
How to use checksums
c9b1c857d3a5a85f405b36efacc62716941068f9894c50a1bdc7c8ea8b07ff96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / syft_enclave-0.1.3-py3-none-any.whl

Download URL syft_enclave-0.1.3-py3-none-any.whl
Size 86.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
330c93253fcb56fbc8b8bb12590c9510dbb4446d16990f89ec1f3c8b5bbcdd47
BLAKE2b-256 checksum
How to use checksums
3f4883d977a773dd4c5e38178116100acf196eb7b7308aaf46c088db304b5eea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for syft-enclave 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page