Skip to content

Commit 6ea7504

Browse files
authored
Merge pull request #437 from Dstack-TEE/refactor-for-cloud-providers
Refactor attestation for multi-provider support
2 parents b99184a + 370bd67 commit 6ea7504

File tree

100 files changed

+5312
-2771
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+5312
-2771
lines changed

Cargo.lock

Lines changed: 959 additions & 815 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ members = [
2020
"ra-tls",
2121
"tdx-attest-sys",
2222
"tdx-attest",
23+
"dstack-attest",
2324
"dstack-util",
2425
"iohash",
2526
"guest-agent",
@@ -69,6 +70,7 @@ supervisor = { path = "supervisor" }
6970
supervisor-client = { path = "supervisor/client" }
7071
tdx-attest = { path = "tdx-attest" }
7172
tdx-attest-sys = { path = "tdx-attest-sys" }
73+
dstack-attest = { path = "dstack-attest" }
7274
certbot = { path = "certbot" }
7375
rocket-vsock-listener = { path = "rocket-vsock-listener" }
7476
host-api = { path = "host-api", default-features = false }
@@ -82,6 +84,7 @@ lspci = { path = "lspci" }
8284
sodiumbox = { path = "sodiumbox" }
8385
serde-duration = { path = "serde-duration" }
8486
dstack-mr = { path = "dstack-mr" }
87+
dstack-verifier = { path = "verifier", default-features = false }
8588
size-parser = { path = "size-parser" }
8689

8790
# Core dependencies
@@ -118,15 +121,19 @@ scale = { version = "3.7.4", package = "parity-scale-codec", features = [
118121
"derive",
119122
] }
120123
serde = { version = "1.0.228", features = ["derive"], default-features = false }
121-
serde-human-bytes = "0.1.0"
124+
serde-human-bytes = "0.1.2"
122125
serde_json = { version = "1.0.140", default-features = false }
123126
serde_ini = "0.2.0"
124127
toml = "0.8.20"
125128
toml_edit = { version = "0.22.24", features = ["serde"] }
126129
yasna = "0.5.2"
127130
bytes = "1.10.1"
131+
nom = "7.1"
128132
figment = "0.10.19"
129133
object = "0.36.4"
134+
fatfs = "0.3.6"
135+
fscommon = "0.1.1"
136+
ciborium = "0.2"
130137

131138
# Networking/HTTP
132139
bollard = "0.18.1"
@@ -159,13 +166,17 @@ default-net = "0.22.0"
159166
aes-gcm = "0.10.3"
160167
curve25519-dalek = "4.1.3"
161168
dcap-qvl = "0.3.8"
169+
dcap-qvl-webpki = "0.103"
162170
elliptic-curve = { version = "0.13.8", features = ["pkcs8"] }
163171
getrandom = "0.3.1"
164172
hkdf = "0.12.4"
165173
p256 = "0.13.2"
174+
p384 = "0.13"
175+
rsa = "0.9"
166176
ring = "0.17.14"
167177
rustls = "0.23.23"
168-
rustls-pki-types = "1.11.0"
178+
rustls-pki-types = "1.13.1"
179+
rustls-webpki = "0.103.8"
169180
schnorrkel = "0.11.4"
170181
sha2 = { version = "0.10.8", default-features = false }
171182
sha3 = "0.10.8"
@@ -179,10 +190,12 @@ xsalsa20poly1305 = "0.9.0"
179190
salsa20 = "0.10"
180191
rand_core = "0.6.4"
181192
alloy = { version = "1.0.32", default-features = false }
193+
ez-hash = "1.1.0"
182194

183195
# Certificate/DNS
184196
hickory-resolver = "0.24.4"
185197
instant-acme = "0.7.2"
198+
pem = "3.0"
186199
rcgen = { version = "0.13.2", features = ["pem"] }
187200
x509-parser = "0.16.0"
188201
pkcs8 = { version = "0.10", default-features = false }
@@ -217,10 +230,12 @@ uuid = { version = "1.15.1", features = ["v4"] }
217230
which = "7.0.2"
218231
smallvec = "1.14.0"
219232
cmd_lib = "1.9.5"
220-
serde_yaml2 = "0.1.2"
233+
yaml-rust2 = "0.10.4"
221234

222235
luks2 = "0.5.0"
223236
scopeguard = "1.2.0"
237+
flate2 = "1.1"
238+
tar = "0.4"
224239

225240
[profile.release]
226241
panic = "abort"

REUSE.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ path = [
6868
"docs/security/dstack-audit.pdf",
6969
"dstack_Technical_Charter_Final_10-17-2025.pdf",
7070
"sdk/simulator/quote.hex",
71+
"sdk/simulator/attestation.bin",
7172
"ra-tls/assets/tdx_quote",
7273
"cc-eventlog/samples/ccel.bin",
7374
]
@@ -185,3 +186,8 @@ SPDX-License-Identifier = "CC0-1.0"
185186
path = "verifier/builder/shared/*.txt"
186187
SPDX-FileCopyrightText = "NONE"
187188
SPDX-License-Identifier = "CC0-1.0"
189+
190+
[[annotations]]
191+
path = "guest-agent/fixtures/*"
192+
SPDX-FileCopyrightText = "NONE"
193+
SPDX-License-Identifier = "CC0-1.0"

basefiles/app-compose.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ case "$RUNNER" in
2323
if ! [ -f docker-compose.yaml ]; then
2424
jq -r '.docker_compose_file' app-compose.json >docker-compose.yaml
2525
fi
26-
dstack-util remove-orphans -f docker-compose.yaml || true
27-
chmod +x /usr/bin/containerd-shim-runc-v2
28-
systemctl restart docker
2926

3027
if ! docker compose up --remove-orphans -d --build; then
3128
dstack-util notify-host -e "boot.error" -d "failed to start containers"
@@ -37,7 +34,6 @@ case "$RUNNER" in
3734
docker volume prune -f
3835
;;
3936
"bash")
40-
chmod +x /usr/bin/containerd-shim-runc-v2
4137
echo "Running main script"
4238
dstack-util notify-host -e "boot.progress" -d "running main script" || true
4339
jq -r '.bash_script' app-compose.json | bash
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Phala Network <dstack@phala.network>
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
[Unit]
6+
Wants=dstack-prepare.service
7+
After=dstack-prepare.service
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-FileCopyrightText: 2025 Phala Network <dstack@phala.network>
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
[Unit]
6+
Wants=dstack-prepare.service
7+
After=dstack-prepare.service

basefiles/dstack-prepare.service

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[Unit]
22
Description=dstack Guest Preparation Service
3-
After=network.target chronyd.service
3+
After=network.target network-online.target chronyd.service
4+
Wants=network-online.target
45
Before=app-compose.service dstack-guest-agent.service docker.service
56
OnFailure=reboot.target
67

0 commit comments

Comments
 (0)