Skip to content

feat: add SealedEnv HPKE format and automatic epoch migration - #1528

Closed
kvinwang wants to merge 17 commits into
kms-getkey-root-epochfrom
kms-sealed-env-clean
Closed

kvinwang wants to merge 17 commits into
kms-getkey-root-epochfrom
kms-sealed-env-clean

Conversation

@kvinwang

@kvinwang kvinwang commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

Add versioned SealedEnv using HPKE, epoch-bound public-key signatures and historical environment migration. CLI/UI select the format by image capability and never automatically downgrade a SealedEnv-capable image after an unauthenticated lookup error. Legacy ciphertext probing skips inaccessible historical roots.

Enforce image capability for all VMM entry points, including dstack-vmm run. One-shot runs check both supplied ciphertext and SealedEnv retained in a reused workdir before creating directories or overwriting VM state. Normal RPC and one-shot flows share effective-format detection. Keep encoding helpers separate from boot orchestration.

Regression tests cover missing/false capability metadata and both new and reused one-shot workdirs, asserting rejection before state writes. Both one-shot tests passed at this layer. The rebased stack also passed the full VMM and guest-util suites; see #1533 for final validation conditions. Python formatting/docstrings were corrected at this layer; full Prek and 20 CLI/SDK Python tests with 44 subtests passed. No live CVM was launched.

@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from 9cf1570 to aa7a320 Compare November 7, 2026 05:44
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from aa7a320 to d95aaf2 Compare November 7, 2026 08:08
@kvinwang kvinwang changed the title feat(guest): migrate encrypted env across KMS root epochs feat: add SealedEnv HPKE format and automatic epoch migration Nov 7, 2026
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from 248c3fb to 9b1c4e3 Compare November 7, 2026 09:31
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from 92e3177 to 05e88e2 Compare November 7, 2026 15:15
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from ff43a3b to ce1946c Compare November 7, 2026 15:21
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from ce1946c to 6e28694 Compare November 7, 2026 15:25
@kvinwang
kvinwang added this pull request to stack #1531 November 7, 2026 15:27
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from 6e28694 to 204f890 Compare November 8, 2026 01:41
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from 204f890 to cbd216d Compare November 8, 2026 01:44
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from cbd216d to 77eae6d Compare November 8, 2026 02:21
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from 77eae6d to 7d7d8bd Compare November 8, 2026 02:57
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from dead098 to fb84010 Compare November 8, 2026 03:34
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch 2 times, most recently from dfa28cd to fc73d70 Compare November 8, 2026 09:21
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from fc73d70 to 1e6fc12 Compare November 8, 2026 14:13
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from 1e6fc12 to 32441d5 Compare November 8, 2026 14:14
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
…ability

Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
…ties

Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang force-pushed the kms-sealed-env-clean branch from 32441d5 to 48ee692 Compare November 8, 2026 15:10
@kvinwang kvinwang closed this Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant