diff --git a/CHANGELOG.md b/CHANGELOG.md index 196c4b7e0..576436e92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.6.5] - 2026-11-15 + ### Upgrade notes +- **The contracts are not compatible with 0.6.4.** `AuthorizationRequest` gains + `launchTicketHash` (see Changed), which changes the selectors of + `authorizeApp` and `authorizeKms` and the `IAppEpochAuth` interface ID + (`0xd33835bd` to `0xc396c1b0`). Upgrade `DstackKms`, every `DstackApp` proxy + (and `setAppImplementation`) and auth-eth together: a 0.6.4 auth-eth with a + 0.6.5 `DstackKms`, or the reverse, denies every request, and a 0.6.5 + `DstackKms` treats a 0.6.4 `DstackApp` as a legacy policy, limited to app + epoch 0 through `isAppAllowed`. +- **Upgrade the auth backend before the KMS.** A joining KMS needs the auth + backend's `GET /` to report `rootCaPubkey` and an `https://` source URL. +- **Upgrade every KMS instance before `setRequireKmsLaunchTicket(true)`.** + Older instances authorize serving through `isKmsAllowed`, which a required + ticket refuses, so they stop serving every app. - **KMS refuses its old listener settings.** Move `[rpc]`, `[core.admin]`, `[core.onboard]` `address`/`port`/`tls`, `[default]` and top-level Rocket settings to `[listeners.*]` (see Changed) when upgrading the KMS image. @@ -25,6 +40,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 header on every connection and logs its source address as the client. The header is trusted as sent, so the listener must be reachable only through the proxy. prpc request logs now carry the client address as `remote` (#1582). +- Launch tickets: key release can require a secret ticket the host presents at + launch, checked by the contract before the KMS releases anything, without + changing the compose hash. `DstackApp.setRequireLaunchTicket`, + `addLaunchTicket(hash, label)`, `removeLaunchTicket` and `launchTickets()` + gate `GetAppKey` and `SignCert` at every app epoch; `DstackKms` has the same + for KMS instances, gating only `kms_import_keys`. The hash is + `sha256("dstack-launch-ticket/v1:" || ticket)`. The VMM stores the ticket, + writes it to the guest's sys-config at every boot and returns only + `VmInfo.launch_ticket_hash`; `vmm-cli launch-ticket new|hash`, `deploy + --launch-ticket-file`, `update --launch-ticket-file|--no-launch-ticket`, + `dstack-util get-keys --launch-ticket-file` and the web UI set it. A joining + KMS takes its ticket in `Onboard`. Guests need OS 0.6.5, or 0.5.15 or later + on 0.5.x. See `dstack/kms/README.md#launch-tickets` (#1577). +- auth-eth, dstack-auth: `GET /` reports `rootCaPubkey`, the CA key of the + current root epoch (#1577). +- KMS: refused `GetAppKey`, `SignCert` and `GetKmsKey` requests are logged as + `key release denied` on `dstack_kms::audit`, with the app, instance, caller + and error, and `GetAppEnvEncryptPubKey`/`GetSealedEnvPubKey` as `env public + key served` or `refused` (#1583). +- Gateway: every state-changing admin RPC and every CVM registration logs one + line on `dstack_gateway::audit` with the operation, caller and subject + (#1588), and every proxied connection one line on `dstack_gateway::access` + with client, SNI, route, app, bytes and duration; disable it with + `RUST_LOG=info,dstack_gateway::access=off` (#1589). +- vmm-cli: `DSTACK_VMM_KMS_WHITELIST_PATH` overrides the KMS whitelist path, + `~/.dstack-vmm/kms-whitelist.json` by default (#1591). +- `dstack-verifier-wasm` (`@phala/dstack-verifier-wasm`): the TDX lite OS check + as a self-contained wasm package for JS/TS verifiers, released separately as + `verifier-wasm-v*` (#1555). ### Changed @@ -44,6 +88,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 insecure_enable_debug_rpc`). `insecure_localhost_backend` moves to `[core.proxy]`. The gateway refuses a config that still sets an old location, naming the new one; the gateway image's entrypoint writes the new one (#1587). +- **Breaking:** `IAppEpochAuth.AuthorizationRequest` gains `launchTicketHash`, + forwarded by auth-eth and checked by dstack-auth. A required ticket refuses + the legacy `isAppAllowed` and `isKmsAllowed` (#1577). +- KMS: onboarding pins the source's RPC certificate to the current root CA + from its own auth backend and refuses `http://` sources, so the ticket and + `source_token` are sent only to a KMS holding the registered roots (#1577). +- VMM: VM work directories are created with mode 0700 (#1577). +- verifier: `details.acpi_tables_verified` is `false` on an MR mismatch; + `is_valid` is unchanged (#1555). +- mkosi OS releases no longer publish `image-hashes.txt`; MRTD, `uki_auth` and + `boot_pcr_digest` are in the release notes table (#1573). +- dstack-auth is documented as development, testing and evaluation only: the + host operator controls its policy file (#1576). + +### Fixed + +- dstack-util: `get-keys` verifies the KMS with the guest's collateral service + and trust anchors, as system setup does, instead of the production defaults + (#1565). +- VMM: a guest with `simulated_tee = dstack-tdx` gets the vm_config and + measurement document of a TDX guest, so a KMS no longer refuses it with an + MRTD mismatch (#1590). +- auth-eth: bump hono to 4.13.16 for GHSA-4m76-xfj5-7975, GHSA-h7mg-cq63-vhpq, + GHSA-46wx-v44x-9hh2 and GHSA-4h7h-rv7c-7m2v (#1578). ## [0.6.4] - 2026-11-12 diff --git a/docs/vmm-cli-user-guide.md b/docs/vmm-cli-user-guide.md index 5e6a7391f..332d2cc1a 100644 --- a/docs/vmm-cli-user-guide.md +++ b/docs/vmm-cli-user-guide.md @@ -316,8 +316,8 @@ takes its ticket in the `Onboard` request rather than from guest's sys-config at every boot; it returns only its hash, which `info` shows. The host holds the ticket, so remove that hash from the contract once the host stops serving the app. Tickets need dstack-vmm, the KMS and the auth backend at -0.6.4 or later, and a guest OS at 0.6.4 or later or a 0.5.x release with the -launch ticket backport. See +0.6.5 or later, and a guest OS at 0.6.5 or later, or 0.5.15 or later on 0.5.x. +See [launch tickets](../dstack/kms/README.md#launch-tickets). #### Port Mapping diff --git a/dstack/Cargo.lock b/dstack/Cargo.lock index d36c1eaf5..85bf94f2e 100644 --- a/dstack/Cargo.lock +++ b/dstack/Cargo.lock @@ -820,7 +820,7 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cached-cell" -version = "0.6.4" +version = "0.6.5" dependencies = [ "tokio", ] @@ -839,7 +839,7 @@ dependencies = [ [[package]] name = "cc-eventlog" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "digest 0.10.7", @@ -859,7 +859,7 @@ dependencies = [ [[package]] name = "cert-client" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "dstack-guest-agent-rpc", @@ -881,7 +881,7 @@ dependencies = [ [[package]] name = "certbot" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "bon", @@ -909,7 +909,7 @@ dependencies = [ [[package]] name = "certbot-cli" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "certbot", @@ -1371,7 +1371,7 @@ dependencies = [ [[package]] name = "ct_monitor" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "clap", @@ -1903,7 +1903,7 @@ dependencies = [ [[package]] name = "dstack-api-auth" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "base64 0.22.1", @@ -1918,7 +1918,7 @@ dependencies = [ [[package]] name = "dstack-attest" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "aws-nitro-enclaves-nsm-api", @@ -1967,7 +1967,7 @@ dependencies = [ [[package]] name = "dstack-auth" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "clap", @@ -1981,14 +1981,14 @@ dependencies = [ [[package]] name = "dstack-build-info" -version = "0.6.4" +version = "0.6.5" dependencies = [ "git-version", ] [[package]] name = "dstack-cli" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "clap", @@ -2005,7 +2005,7 @@ dependencies = [ [[package]] name = "dstack-cli-core" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "dstack-types", @@ -2019,7 +2019,7 @@ dependencies = [ [[package]] name = "dstack-gateway" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "arc-swap", @@ -2089,7 +2089,7 @@ dependencies = [ [[package]] name = "dstack-gateway-rpc" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "parity-scale-codec", @@ -2102,7 +2102,7 @@ dependencies = [ [[package]] name = "dstack-guest-agent" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "base64 0.22.1", @@ -2159,7 +2159,7 @@ dependencies = [ [[package]] name = "dstack-guest-agent-rpc" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "hex", @@ -2175,7 +2175,7 @@ dependencies = [ [[package]] name = "dstack-guest-agent-simulator" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "cc-eventlog", @@ -2197,7 +2197,7 @@ dependencies = [ [[package]] name = "dstack-kms" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "cc-eventlog", @@ -2246,7 +2246,7 @@ dependencies = [ [[package]] name = "dstack-kms-rpc" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "fs-err", @@ -2260,7 +2260,7 @@ dependencies = [ [[package]] name = "dstack-mr" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "binrw", @@ -2302,7 +2302,7 @@ dependencies = [ [[package]] name = "dstack-netd-rpc" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "prost 0.13.5", @@ -2314,7 +2314,7 @@ dependencies = [ [[package]] name = "dstack-nvidia-attest-proxy" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "base64 0.22.1", @@ -2342,7 +2342,7 @@ dependencies = [ [[package]] name = "dstack-tee-simulator" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "aws-nitro-enclaves-nsm-api", @@ -2379,7 +2379,7 @@ dependencies = [ [[package]] name = "dstack-types" -version = "0.6.4" +version = "0.6.5" dependencies = [ "ciborium", "hex", @@ -2397,7 +2397,7 @@ dependencies = [ [[package]] name = "dstack-util" -version = "0.6.4" +version = "0.6.5" dependencies = [ "aes-gcm 0.10.3", "anyhow", @@ -2465,7 +2465,7 @@ dependencies = [ [[package]] name = "dstack-verifier" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "clap", @@ -2501,7 +2501,7 @@ dependencies = [ [[package]] name = "dstack-verifier-wasm" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "cc-eventlog", @@ -2515,7 +2515,7 @@ dependencies = [ [[package]] name = "dstack-vmm" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "base64 0.22.1", @@ -2582,7 +2582,7 @@ dependencies = [ [[package]] name = "dstack-vmm-rpc" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "parity-scale-codec", @@ -2595,7 +2595,7 @@ dependencies = [ [[package]] name = "dstack-volume" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "binrw", @@ -2616,7 +2616,7 @@ dependencies = [ [[package]] name = "dstackup" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "clap", @@ -3361,7 +3361,7 @@ dependencies = [ [[package]] name = "guest-api" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "http-client", @@ -3630,7 +3630,7 @@ dependencies = [ [[package]] name = "host-api" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "http-client", @@ -3695,7 +3695,7 @@ dependencies = [ [[package]] name = "http-client" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "http-body-util", @@ -4115,7 +4115,7 @@ checksum = "d8972d5be69940353d5347a1344cb375d9b457d6809b428b05bb1ca2fb9ce007" [[package]] name = "iohash" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "blake2", @@ -4350,7 +4350,7 @@ dependencies = [ [[package]] name = "key-provider-client" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "dstack-types", @@ -4496,7 +4496,7 @@ checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "load_config" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "figment", @@ -4507,7 +4507,7 @@ dependencies = [ [[package]] name = "local-key-provider" -version = "0.6.4" +version = "0.6.5" dependencies = [ "blake2", "dcap-qvl", @@ -4569,7 +4569,7 @@ checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "lspci" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "insta", @@ -4695,7 +4695,7 @@ dependencies = [ [[package]] name = "mock-attestation" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "axum", @@ -4923,7 +4923,7 @@ dependencies = [ [[package]] name = "nsm-attest" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "aws-nitro-enclaves-nsm-api", @@ -4935,7 +4935,7 @@ dependencies = [ [[package]] name = "nsm-qvl" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "ciborium", @@ -5108,7 +5108,7 @@ dependencies = [ [[package]] name = "nvattest" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "serde", @@ -5601,7 +5601,7 @@ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" [[package]] name = "pki-fetch" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "pem 3.0.6", @@ -6063,7 +6063,7 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "ra-rpc" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "bon", @@ -6086,7 +6086,7 @@ dependencies = [ [[package]] name = "ra-tls" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "bon", @@ -6592,7 +6592,7 @@ dependencies = [ [[package]] name = "rocket-proxy-listener" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "pin-project", @@ -6605,7 +6605,7 @@ dependencies = [ [[package]] name = "rocket-vsock-listener" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "derive_more 2.1.1", @@ -7168,7 +7168,7 @@ dependencies = [ [[package]] name = "serde-duration" -version = "0.6.4" +version = "0.6.5" dependencies = [ "serde", "serde_json", @@ -7390,7 +7390,7 @@ dependencies = [ [[package]] name = "sev-snp-attest" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "fs-err", @@ -7403,7 +7403,7 @@ dependencies = [ [[package]] name = "sev-snp-qvl" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "hex", @@ -7579,7 +7579,7 @@ checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" [[package]] name = "size-parser" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "serde", @@ -7758,7 +7758,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "supervisor" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "bon", @@ -7781,7 +7781,7 @@ dependencies = [ [[package]] name = "supervisor-client" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "clap", @@ -7934,7 +7934,7 @@ dependencies = [ [[package]] name = "tdx-attest" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "cc-eventlog", @@ -8318,7 +8318,7 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tpm-attest" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "dstack-types", @@ -8337,7 +8337,7 @@ dependencies = [ [[package]] name = "tpm-qvl" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "base64 0.22.1", @@ -8360,7 +8360,7 @@ dependencies = [ [[package]] name = "tpm-types" -version = "0.6.4" +version = "0.6.5" dependencies = [ "cc-eventlog", "dstack-types", @@ -8371,7 +8371,7 @@ dependencies = [ [[package]] name = "tpm2" -version = "0.6.4" +version = "0.6.5" dependencies = [ "anyhow", "hex", diff --git a/dstack/Cargo.toml b/dstack/Cargo.toml index a59c40289..3c7f4d1a3 100644 --- a/dstack/Cargo.toml +++ b/dstack/Cargo.toml @@ -5,7 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 [workspace.package] -version = "0.6.4" +version = "0.6.5" authors = ["Kevin Wang ", "Leechael "] edition = "2021" license = "MIT" diff --git a/dstack/kms/README.md b/dstack/kms/README.md index f0808c0c0..249d618dc 100644 --- a/dstack/kms/README.md +++ b/dstack/kms/README.md @@ -406,13 +406,13 @@ turn the check on; `addLaunchTicket` and `addKmsLaunchTicket` allow a hash, listed by `launchTickets()` and `kmsLaunchTickets()`, with a public label only logged in the added event. The allowlists cover every app and root epoch. -Tickets need the VMM, the KMS and the auth backend at 0.6.4 or later, and a -guest OS at 0.6.4 or later or a 0.5.x release with the launch ticket backport: -an older one drops the ticket, and the request fails as -`Invalid launch ticket`. A required ticket refuses the legacy `isAppAllowed` and -`isKmsAllowed`, whose callers cannot present one. Older KMS instances authorize -serving through `isKmsAllowed`, so upgrade every KMS instance before turning on -`requireKmsLaunchTicket`, or they stop serving every app. +Tickets need the VMM, the KMS and the auth backend at 0.6.5 or later, and a +guest OS at 0.6.5 or later, or 0.5.15 or later on 0.5.x: an older one drops +the ticket, and the request fails as `Invalid launch ticket`. A required ticket +refuses the legacy `isAppAllowed` and `isKmsAllowed`, whose callers cannot +present one. Older KMS instances authorize serving through `isKmsAllowed`, so +upgrade every KMS instance before turning on `requireKmsLaunchTicket`, or they +stop serving every app. The ticket is a bearer secret: the host launching the CVM holds it. Use a fresh random ticket per deployment, and remove its hash, shown by `vmm-cli info`, once diff --git a/dstack/vmm/src/vmm-cli.py b/dstack/vmm/src/vmm-cli.py index cf5ac668f..24f50c7f9 100755 --- a/dstack/vmm/src/vmm-cli.py +++ b/dstack/vmm/src/vmm-cli.py @@ -2240,7 +2240,7 @@ def _patched_format_help(): deploy_parser.add_argument( "--launch-ticket-file", help="File holding the launch ticket the guest presents to the KMS " - "(requires dstack-vmm >= 0.6.4)", + "(requires dstack-vmm >= 0.6.5)", ) deploy_parser.add_argument( "--disk-prealloc", @@ -2525,7 +2525,7 @@ def _patched_format_help(): launch_ticket_group = update_parser.add_mutually_exclusive_group() launch_ticket_group.add_argument( "--launch-ticket-file", - help="Replace the launch ticket with this file's (requires dstack-vmm >= 0.6.4)", + help="Replace the launch ticket with this file's (requires dstack-vmm >= 0.6.5)", ) launch_ticket_group.add_argument( "--no-launch-ticket", action="store_true", help="Remove the launch ticket" diff --git a/os/mkosi/mkosi.conf b/os/mkosi/mkosi.conf index 487ab9141..1fde7c3a7 100644 --- a/os/mkosi/mkosi.conf +++ b/os/mkosi/mkosi.conf @@ -22,7 +22,7 @@ Format=tar # order, so declaring Output first silently yields "--rootfs.tar". # ImageVersion is checked against DSTACK_VERSION by tests/acceptance.sh. ImageId=dstack -ImageVersion=0.6.4 +ImageVersion=0.6.5 Output=%i-%v-rootfs CompressOutput=no # Must stay empty. The default is [uki, kernel, initrd], and the kernel split diff --git a/os/mkosi/versions.env b/os/mkosi/versions.env index a3e56f355..c89086f97 100644 --- a/os/mkosi/versions.env +++ b/os/mkosi/versions.env @@ -20,7 +20,7 @@ RUST_STD_TOOLCHAIN_SHA256=5f106805ed86ebf8df287039e53a45cf974391ef4d088c2760776b GO_TOOLCHAIN_VERSION=1.26.10 GO_TOOLCHAIN_SHA256=ccfe7ae822d2c2f41f4fe7c956199967a4dac22d0ee0d2b2bfdb440aab3b20c5 NITRO_TPM_TOOLS_REVISION=d76d6eeebd4169b00a3c3af9858852d48f40e748 -DSTACK_VERSION=0.6.4 +DSTACK_VERSION=0.6.5 DSTACK_CODENAME=trixie OVMF_VARIANT=pre202505 # Must match SRCREV in meta-dstack's dstack-ovmf_git.bb: a generic OVMF diff --git a/os/yocto/layers/meta-dstack/conf/distro/dstack.conf b/os/yocto/layers/meta-dstack/conf/distro/dstack.conf index ea3da14c9..c72a2cfd1 100644 --- a/os/yocto/layers/meta-dstack/conf/distro/dstack.conf +++ b/os/yocto/layers/meta-dstack/conf/distro/dstack.conf @@ -7,7 +7,7 @@ DISTRO = "dstack" DISTRO_NAME = "dstack" DISTRO_FEATURES:append = " virtualization seccomp systemd usrmerge security dm-verity ipv6" -DISTRO_VERSION = "0.6.4" +DISTRO_VERSION = "0.6.5" DISTROOVERRIDES = "poky:dstack" INITRAMFS_IMAGE = ""