Repository navigation
Release 1.26.14: TC-3554 restore the node on its epoch-0 KMS root - #668
Merged
Merged
Conversation
- keys.type = DstackKmsEpoch (dstack builds): RA-TLS client cert signed by the KMS temp CA
(legacy quote/event-log extensions), GetAppKey for the pinned root epoch over TLS pinned to
the KMS CA (leaf issued directly by it, special usage kms:rpc). Fail-closed checks before the
database connects: root_epoch == pin and app_epoch == 0 (both required), low-S k256_signature
by the pinned epoch root over keccak256("dstack-kms-issued:" || app_id || app_pub), derived
node DID == keys.legacy.expected_did. No fallback to GetKey or another epoch.
- keys.expected_node_did (any key source): startup refuses another DID before the DB opens;
resolve_identity_state refuses it for every caller, the control plane included.
- docs/tc-3554-kms-epoch-fetch.md: the protocol OpenKey mirrors (openkey #640).
- tests/kms_epoch_identity.rs: fake guest agent + fake KMS (epochs 0/1) against the real binary.
- backup_identity bails for keys.type = DstackKmsEpoch before resolving (no KMS fetch): the epoch-0 root is a migration bridge on an exposed KMS root, re-key instead of exporting. - Covers the control-plane backup route (service.rs) through backup_identity.
…ecar - keys.legacy.key_recovery_socket selects Phala's key-recovery sidecar (unix socket GET /v0/key, root_epoch pin, app_epoch=0); kms_url+kms_ca_cert keep the direct RA-TLS transport. Exactly one transport, no runtime fallback. - Verifier on the sidecar answer: api v0, epochs present and pinned, public_key == pub(key), app_pub recovered from signature_chain[0], signature_chain[1] checked as the KMS issuance signature under the pinned epoch root, DID pin. The chain does not prove path->key; the DID pin does. - Direct KMS GetAppKey now sends app_epoch 0 explicitly. - Spec: transport A section, new vectors; fake-sidecar harness cases.
… pins; dev-0.5.15 OS - Compose: tinycloud TINYCLOUD_KEYS__TYPE DstackKmsEpoch, epoch-0 KMS root 0334c76e…, app_id 350d124c…, expected DID z6MkjHi7… (legacy and node pins) as literals; key-recovery sidecar (digest 26803eb7…, unix socket only, logging none) on a shared volume. - docker.yml: N0 template hash 70c71aa0… (raw 8e602959…); PHALA_OS_IMAGE dstack-0.5.15/4597735f…; deploy drops --image/--no-dev-os so the dev CVM keeps its class. - Dev OS allowlist: dstack-dev-0.5.15 432b8a1e… (the node CVM's OS since Phala's move; download.dstack.org HEAD 200). - docs/releasing.md: OS pins, N0 hash, no rollback below 1.26.14 on this compose. Details: TC-3554
- TC-3554 restore: DstackKmsEpoch key fetch, sidecar compose, OS pins. Upgrade notes in CHANGELOG. Details: TC-3554
- Byte-identical copy (docs/releasing.md: compose, fixture and template hash move together); test-deploy-recovery.py 30 OK. Details: TC-3554
- Sam's 14:44Z read: renewal_identity still holds the original renewer DID, so the 04:42Z boots never wrote it. The note is now a precondition with the reset as the fallback, not a claim that the row was bumped. Details: TC-3554
…volume - compose_mounts asserted the node's exact volume list; the restore compose adds key-recovery:/run/key-recovery. The sidecar is not projected (like ssh-gateway). Details: TC-3554
… guard - did_resolution_single_entry flags any verify_signature call; ensure_kms_rpc_cert's is the X.509 KMS TLS leaf under the pinned CA, not a DID. - Hoist it out of ensure! (no behaviour change) and allow that one exact expression (ruling: TC-3554 comment eea21b45). Details: TC-3554
samgbafa
marked this pull request as ready for review
November 20, 2026 15:28
This was referenced Nov 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TC-3554 restore, release 1.26.14. Phala moved node CVM app
350d124c…to KMSdstack-pha-prod2at 04:42Z. This release keeps the node's root and identity (did:key:z6MkjHi79SMX4doJyo2w7jDTM6Fa7iX6EVZWXNbJ6RzBm3Wi), with no rotation and no re-key (Sam, 14:27Z).Commits
f835b52f,027cdfc4,c59c10cb: K1 epoch fetch, backup refusal, and sidecar transport + verifier. These are DO NOT MERGE: TC-3554 K1 epoch-0 KMS fetch + expected node DID pin #667's1b810ade,12885dc4and1c143311, already PASSed by Bobbie, cherry-picked unchanged onto maina5fec402.f2aa15ac: production compose.TINYCLOUD_KEYS__TYPE: DstackKmsEpochis pinned with literals: root epoch 0, KMS root0334c76e…(Bobbie-approved), app_id, and the legacy and node DID pins. Also:key-recoverysidecar (digest26803eb7…, unix socket only,logging: none, seccomp unconfined for AF_VSOCK);70c71aa0…(raw8e602959…);PHALA_OS_IMAGEset todstack-0.5.15/4597735f…;dstack-dev-0.5.15432b8a1e…on the dev allowlist (the node CVM runs it; download.dstack.org HEAD 200);--image/--no-dev-os(Naomi, 14:35Z: no dev→prod request);f1ab627e: Release 1.26.14 (Cargo.toml, Cargo.lock, test/m1-realdata-e2e/Cargo.lock, CHANGELOG with upgrade notes).ed03ea5c:scripts/ci/fixtures/tc959-n0-compose.yaml, a byte-identical copy of the compose.Process exception (Naomi, outage): docs/releasing.md normally lands the compose change first and the release PR after it. Here they are one PR, so v1.26.14 descends from the compose change. The version is still chosen by hand, as the doc requires. release-plz creates the
v1.26.14tag when this merges.Before deploy: Sam's read-back shows
renewal_identity= original renewer z6MkgWpi… (14:44Z) and the live leases carry the row's epoch; then the restore boot writes nothing. The pinned reset is only a fallback (Bobbie, 14:46Z). No migration. There is no rollback below 1.26.14 on this compose: older binaries rejectDstackKmsEpochand fail closed.Local verification (head
c59c10cbplus the config commits):cargo test -p tinycloud-node --features dstack --lib: 1135 ok.kms_epoch_identity: 14 ok. link: 7 ok. tunnel: 14 ok.--validate-configwith the compose's exact key env: valid.test-deploy-recovery.py: 30 OK.tc959-check.mjspassed. tc959 node tests: 24 pass.-D warnings(1.97) flagsitems_after_test_moduleinroutes/encryption.rs. That file is untouched here and the lint is the same on main.test-phala-os-guard.sh: 10 "left a temp dir" failures locally, identical on unmodified main (sandbox TMPDIR). CI decides.test-ruling: TC-3554
Details: TC-3554