From 37a3dd7d6afe2d6a7eca9f426dc56db95d96a676 Mon Sep 17 00:00:00 2001 From: Henry Baldwin Date: Wed, 30 Sep 2026 21:35:42 +0000 Subject: [PATCH 1/2] tee(network): init --attestation-type picks the image's measurements asset --- tee/cli/network/src/assemble.rs | 1 + tee/cli/network/src/image.rs | 10 ++++++++++ tee/cli/network/src/init.rs | 21 ++++++++++++++++++--- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/tee/cli/network/src/assemble.rs b/tee/cli/network/src/assemble.rs index 4020cbca..50ef50eb 100644 --- a/tee/cli/network/src/assemble.rs +++ b/tee/cli/network/src/assemble.rs @@ -950,6 +950,7 @@ pub(crate) mod tests { &crate::init::fetch_client().unwrap(), &net, &crate::init::InitInputs { + attestation_type: DEFAULT_ATTESTATION_TYPE, name: "testnet-1", image, measurements: Some(raw.to_str().unwrap()), diff --git a/tee/cli/network/src/image.rs b/tee/cli/network/src/image.rs index 8ebc6b23..339107a2 100644 --- a/tee/cli/network/src/image.rs +++ b/tee/cli/network/src/image.rs @@ -257,6 +257,16 @@ impl ImageRecord { format!("{}.vhd", self.image) } + /// The artifact `attestation_type`'s measurements are stamped with: the + /// VHD for `azure-tdx`, the tarball for `gcp-tdx`. + pub fn artifact(&self, attestation_type: &str) -> anyhow::Result { + match attestation_type { + "azure-tdx" => Ok(self.vhd()), + "gcp-tdx" => Ok(format!("{}.tar.gz", self.image)), + other => bail!("attestation type {other:?} is not azure-tdx or gcp-tdx"), + } + } + /// The measurements asset for `target` (an attestation type, `azure-tdx`). pub fn measurements_asset(&self, target: &str) -> anyhow::Result<&str> { match self.targets.get(target) { diff --git a/tee/cli/network/src/init.rs b/tee/cli/network/src/init.rs index aef2efdc..6862fccb 100644 --- a/tee/cli/network/src/init.rs +++ b/tee/cli/network/src/init.rs @@ -256,6 +256,8 @@ pub fn require_measurement_of(raw: &[u8], vhd: &str, source: &str) -> anyhow::Re pub struct InitInputs<'a> { pub name: &'a str, pub image: ImageRelease, + /// Which of the image's measurements assets is copied in, `azure-tdx` or `gcp-tdx`. + pub attestation_type: &'a str, pub measurements: Option<&'a str>, pub reth_genesis: Option<&'a str>, pub summit_genesis: Option<&'a str>, @@ -349,11 +351,15 @@ pub async fn init_network_dir( ) -> anyhow::Result> { let opened = OpenedRelease::open(inputs.image.clone()).await?; - let measurements_asset = opened.record.measurements_asset(DEFAULT_ATTESTATION_TYPE)?; + let measurements_asset = opened.record.measurements_asset(inputs.attestation_type)?; let (measurements, measurements_source) = input_from(client, &opened, inputs.measurements, measurements_asset).await?; require_measurement_id(&measurements, &measurements_source)?; - require_measurement_of(&measurements, &opened.record.vhd(), &measurements_source)?; + require_measurement_of( + &measurements, + &opened.record.artifact(inputs.attestation_type)?, + &measurements_source, + )?; let (reth_genesis, reth_source) = input_from( client, &opened, @@ -476,10 +482,16 @@ pub struct InitArgs { /// The image's measurements (or a promoted policy; local path or https:// /// URL), copied in as inputs/measurements.json — the PCRs of a real /// image, never generated, and stamped for the image --image-json names. - /// Default: the image's measurements asset. + /// Default: the image's measurements asset for --attestation-type. #[arg(long, value_name = "PATH_OR_URL")] pub measurements: Option, + /// Platform the nodes attest on, azure-tdx or gcp-tdx: which of the + /// image's measurements assets is copied in, and whether they must be + /// stamped for its VHD or its tarball. + #[arg(long, value_name = "TYPE", default_value = DEFAULT_ATTESTATION_TYPE)] + pub attestation_type: String, + /// Authored summit genesis (local path or https:// URL), copied in /// verbatim except that an empty namespace is filled with . Every /// value in it is a per-network choice to review. Default: the image's @@ -538,6 +550,7 @@ pub async fn run(args: InitArgs) -> anyhow::Result { &InitInputs { name: &name, image, + attestation_type: &args.attestation_type, measurements: args.measurements.as_deref(), reth_genesis: args.reth_genesis.as_deref(), summit_genesis: args.summit_genesis.as_deref(), @@ -656,6 +669,7 @@ mod tests { &fetch_client().unwrap(), &loose.out, &InitInputs { + attestation_type: DEFAULT_ATTESTATION_TYPE, name: "testnet-1", image: loose.image.clone(), measurements: None, @@ -679,6 +693,7 @@ mod tests { &fetch_client().unwrap(), out, &InitInputs { + attestation_type: DEFAULT_ATTESTATION_TYPE, name: "testnet-1", image: release, measurements, From ebe789131df778001e76c6fbc45f336a36b9cff0 Mon Sep 17 00:00:00 2001 From: Henry Baldwin Date: Wed, 30 Sep 2026 21:35:42 +0000 Subject: [PATCH 2/2] tee(cli): pin enclave whose policy documents may mix attestation types --- tee/cli/Cargo.lock | 14 +++++++------- tee/cli/Cargo.toml | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tee/cli/Cargo.lock b/tee/cli/Cargo.lock index f5edab45..a715b02a 100644 --- a/tee/cli/Cargo.lock +++ b/tee/cli/Cargo.lock @@ -4299,7 +4299,7 @@ dependencies = [ [[package]] name = "seismic-attestation" version = "0.1.0" -source = "git+https://github.com/SeismicSystems/enclave.git?rev=d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564#d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" +source = "git+https://github.com/SeismicSystems/enclave.git?rev=d4103510b080c71de8610210f6ad7a765e48b41d#d4103510b080c71de8610210f6ad7a765e48b41d" dependencies = [ "attestation", "hex", @@ -4319,7 +4319,7 @@ dependencies = [ [[package]] name = "seismic-attestation-rpc" version = "0.1.0" -source = "git+https://github.com/SeismicSystems/enclave.git?rev=d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564#d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" +source = "git+https://github.com/SeismicSystems/enclave.git?rev=d4103510b080c71de8610210f6ad7a765e48b41d#d4103510b080c71de8610210f6ad7a765e48b41d" dependencies = [ "jsonrpsee", "secp256k1 0.30.0", @@ -4330,7 +4330,7 @@ dependencies = [ [[package]] name = "seismic-manifest" version = "0.1.0" -source = "git+https://github.com/SeismicSystems/enclave.git?rev=d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564#d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" +source = "git+https://github.com/SeismicSystems/enclave.git?rev=d4103510b080c71de8610210f6ad7a765e48b41d#d4103510b080c71de8610210f6ad7a765e48b41d" dependencies = [ "hex", "seismic-network-manifest", @@ -4340,7 +4340,7 @@ dependencies = [ [[package]] name = "seismic-measurement-admission" version = "0.1.0" -source = "git+https://github.com/SeismicSystems/enclave.git?rev=d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564#d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" +source = "git+https://github.com/SeismicSystems/enclave.git?rev=d4103510b080c71de8610210f6ad7a765e48b41d#d4103510b080c71de8610210f6ad7a765e48b41d" dependencies = [ "alloy-primitives", "hex", @@ -4353,7 +4353,7 @@ dependencies = [ [[package]] name = "seismic-network-manifest" version = "0.1.0" -source = "git+https://github.com/SeismicSystems/enclave.git?rev=d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564#d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" +source = "git+https://github.com/SeismicSystems/enclave.git?rev=d4103510b080c71de8610210f6ad7a765e48b41d#d4103510b080c71de8610210f6ad7a765e48b41d" dependencies = [ "hex", "serde", @@ -4481,7 +4481,7 @@ dependencies = [ [[package]] name = "seismic-verify-quote" version = "0.1.0" -source = "git+https://github.com/SeismicSystems/enclave.git?rev=d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564#d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" +source = "git+https://github.com/SeismicSystems/enclave.git?rev=d4103510b080c71de8610210f6ad7a765e48b41d#d4103510b080c71de8610210f6ad7a765e48b41d" dependencies = [ "anyhow", "base64 0.22.1", @@ -4975,7 +4975,7 @@ dependencies = [ [[package]] name = "tdx-init-config" version = "0.1.0" -source = "git+https://github.com/SeismicSystems/enclave.git?rev=d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564#d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" +source = "git+https://github.com/SeismicSystems/enclave.git?rev=d4103510b080c71de8610210f6ad7a765e48b41d#d4103510b080c71de8610210f6ad7a765e48b41d" dependencies = [ "serde", ] diff --git a/tee/cli/Cargo.toml b/tee/cli/Cargo.toml index 7748a8c1..6bcc400c 100644 --- a/tee/cli/Cargo.toml +++ b/tee/cli/Cargo.toml @@ -65,13 +65,13 @@ seismic-tee-admission = { path = "admission" } # seismic-crypto. Every rule the network's identity depends on has exactly one # implementation, and linking it rather than reimplementing it is what keeps # the CLI's answer and a node's answer the same answer. -seismic-network-manifest = { git = "https://github.com/SeismicSystems/enclave.git", rev = "d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" } -seismic-manifest = { git = "https://github.com/SeismicSystems/enclave.git", rev = "d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" } -seismic-measurement-admission = { git = "https://github.com/SeismicSystems/enclave.git", rev = "d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" } -seismic-verify-quote = { git = "https://github.com/SeismicSystems/enclave.git", rev = "d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" } +seismic-network-manifest = { git = "https://github.com/SeismicSystems/enclave.git", rev = "d4103510b080c71de8610210f6ad7a765e48b41d" } +seismic-manifest = { git = "https://github.com/SeismicSystems/enclave.git", rev = "d4103510b080c71de8610210f6ad7a765e48b41d" } +seismic-measurement-admission = { git = "https://github.com/SeismicSystems/enclave.git", rev = "d4103510b080c71de8610210f6ad7a765e48b41d" } +seismic-verify-quote = { git = "https://github.com/SeismicSystems/enclave.git", rev = "d4103510b080c71de8610210f6ad7a765e48b41d" } # The schema of the config POSTed to tdx-init, as the type tdx-init itself # deserializes: a field it would reject fails to compile here. -tdx-init-config = { git = "https://github.com/SeismicSystems/enclave.git", rev = "d977a2dbfb3f7b5bb73d4d8b1f2b1e806738b564" } +tdx-init-config = { git = "https://github.com/SeismicSystems/enclave.git", rev = "d4103510b080c71de8610210f6ad7a765e48b41d" } # The 20- and 32-byte words the registry gate compares — genesis storage # slots and the compile report's — and keccak256 over the registry's runtime