Skip to content

KMS Release v0.6.5

Choose a tag to compare

@github-actions github-actions released this 16 Nov 04:30
350a0a7

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 DstackKms does not recognize a 0.6.4 DstackApp as 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:

  1. Upgrade the DstackKms proxy, then every DstackApp proxy, with the
    storage-layout-checked scripts in dstack/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
  2. Deploy the new DstackApp implementation and call setAppImplementation
    (Manage.s.sol:SetAppImplementation) so new apps use it.

  3. 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
    launchTicketHash and, for onboarding, report rootCaPubkey on GET /.

  4. 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
    GetAppKey and SignCert at 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 through isKmsAllowed, so upgrade every
    KMS instance before setRequireKmsLaunchTicket(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
    as Invalid 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_token only to a source whose RPC certificate is signed by the
    current root CA reported by its own auth backend (rootCaPubkey on GET /),
    and refuses http:// 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 on dstack_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 ABI
  • DstackApp.json - Application contract ABI