Repository navigation
KMS Release v0.6.5
Upgrade notes — read before upgrading
1. The contracts are not compatible with 0.6.4
AuthorizationRequest gains launchTicketHash. This changes the selectors of
authorizeApp and authorizeKms and the IAppEpochAuth interface ID
(0xd33835bd → 0xc396c1b0), so 0.6.4 and 0.6.5 contracts and auth-eth do not
interoperate:
- A 0.6.4 auth-eth with a 0.6.5
DstackKms, or a 0.6.5 auth-eth with a 0.6.4
DstackKms, denies every request. - A 0.6.5
DstackKmsdoes not recognize a 0.6.4DstackAppas epoch-aware. It
treats it as a legacy policy, authorized for app epoch 0 only through
isAppAllowed, so an app that has advanced its app epoch stops getting keys
until its proxy is upgraded.
Upgrade them together, in this order:
-
Upgrade the
DstackKmsproxy, then everyDstackAppproxy, with the
storage-layout-checked scripts indstack/kms/auth-eth:KMS_CONTRACT_ADDR=0x... forge script script/Upgrade.s.sol:UpgradeKms --broadcast --rpc-url $RPC_URL --ffi APP_CONTRACT_ADDR=0x... forge script script/Upgrade.s.sol:UpgradeApp --broadcast --rpc-url $RPC_URL --ffi
-
Deploy the new
DstackAppimplementation and callsetAppImplementation
(Manage.s.sol:SetAppImplementation) so new apps use it. -
Deploy the 0.6.5 auth-eth (
ghcr.io/dstack-tee/dstack-kms-auth-eth:0.6.5)
right after the contracts. Custom webhook backends must accept
launchTicketHashand, for onboarding, reportrootCaPubkeyonGET /. -
Then upgrade the KMS nodes (see 3 below), then guests.
Upgraded contracts require no ticket until their owner turns it on, so
existing apps keep booting unchanged.
2. Launch tickets (new, opt-in)
DstackApp:setRequireLaunchTicket(bool),addLaunchTicket(hash, label),
removeLaunchTicket(hash),launchTickets(). A required ticket gates
GetAppKeyandSignCertat every app epoch.DstackKms:setRequireKmsLaunchTicket(bool),
addKmsLaunchTicket(hash, label),removeKmsLaunchTicket(hash),
kmsLaunchTickets(), gating only the root key import of a joining KMS.- The hash is
sha256("dstack-launch-ticket/v1:" || ticket)
(vmm-cli launch-ticket hash FILE). Labels are public. - A required ticket refuses the legacy
isAppAllowed/isKmsAllowed. Older
KMS instances authorize serving throughisKmsAllowed, so upgrade every
KMS instance beforesetRequireKmsLaunchTicket(true), or they stop
serving every app. - Requiring an app ticket needs dstack-vmm 0.6.5 on the host and a guest OS of
0.6.5, or 0.5.15 on the 0.5 line; older ones drop the ticket and are denied
asInvalid launch ticket.
See launch tickets.
3. KMS configuration and onboarding
- The KMS refuses its 0.6.4 listener settings. Move
[rpc],
[core.admin],[core.onboard]address/port/tls,[default]and
top-level Rocket settings to[listeners.guest],[listeners.admin],
[listeners.onboard]and[listeners.default]. The KMS names each moved
setting when it refuses a config. - Onboarding pins the source. A joining KMS sends its ticket and
source_tokenonly to a source whose RPC certificate is signed by the
current root CA reported by its own auth backend (rootCaPubkeyonGET /),
and refuseshttp://source URLs. Upgrade the auth backend before the KMS. - New: an optional read-only
[listeners.public]listener,proxy_protocol
on every listener, and audit lines for refused key requests and env public
key requests ondstack_kms::audit.
Docker Image Information
Image: ghcr.io/dstack-tee/dstack-kms:0.6.5
Digest (SHA256): sha256:67a5b4433b4d098fd42731defbc31bd3c175a415e2a1868dc5d457b375cb9a11
Verification: Verify on Sigstore
Contract ABIs
This release includes the compiled contract ABIs:
DstackKms.json- Main KMS contract ABIDstackApp.json- Application contract ABI