You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update KMS test guides after PR #581 cert format fix
- Note 10 (empty osImageHash) is no longer applicable: new KMS uses
unified PHALA_RATLS_ATTESTATION cert format, and old KMS source
attestation gets os_image_hash filled from local KMS automatically
- Remove "0x" entries from auth config templates
- Update PR references and remove stale PR #538 dependency note
Copy file name to clipboardExpand all lines: tests/docs/kms-bootstrap-onboard.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ Operational notes:
78
78
4. On teepod with gateway, onboard mode usually uses the `-8000` URL, while runtime TLS KMS RPC usually uses the `-8000s` URL. **Port forwarding** (`--port tcp:0.0.0.0:<host-port>:8000`) is simpler than gateway for testing, because gateway requires the auth API to return a `gatewayAppId` at boot time.
79
79
5. If you use a very small custom webhook instead of the real auth service, `KMS.GetMeta` may fail because `auth_api.get_info()` expects extra chain / contract metadata fields. In that case, use `GetTempCaCert` as the runtime readiness probe.
80
80
6. dstack CVMs use QEMU user-mode networking — the host is reachable at **`10.0.2.2`** from inside the CVM. The `source_url` in `Onboard.Onboard` must use a CVM-reachable address (e.g., `https://10.0.2.2:<port>/prpc`), not `127.0.0.1`.
81
-
7.**Remote KMS attestation has an empty `osImageHash`.**When the receiver verifies the source KMS during onboard, the `osImageHash` is empty because`vm_config` is unavailable for remote attestation. Auth configs for receiver-side checks must include `"0x"` in the `osImages`array.
81
+
7.**~~Remote KMS attestation has an empty `osImageHash`.~~**Fixed in PR #581: RA-TLS certs now use the unified `PHALA_RATLS_ATTESTATION` format which preserves`vm_config`. For old source KMS instances, the receiver-side check fills `osImageHash` from the local KMS's own value automatically. No special `"0x"`entry in `osImages`is needed anymore.
82
82
83
83
---
84
84
@@ -109,7 +109,7 @@ At minimum, both policies must allow the KMS instance they serve. During onboard
109
109
110
110
For `auth-simple`, `kms.mrAggregated = []` is a deny-all policy for KMS. Add the current KMS MR values explicitly when switching a test from deny to allow.
111
111
112
-
Include `"0x"` in the `osImages` array for configs used in receiver-side onboard checks (see operational note 7 above).
112
+
Since PR #581, you no longer need `"0x"` in the `osImages` array — the receiver-side check now resolves `osImageHash` automatically.
Copy file name to clipboardExpand all lines: tests/docs/kms-self-authorization.md
+8-10Lines changed: 8 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This document describes a manual, AI-executable integration test flow for KMS self-authorization and quote-required KMS behavior.
4
4
5
-
The goal is to validate the following behaviors without depending on `kms/e2e/` from PR #538:
5
+
The goal is to validate the following behaviors:
6
6
7
7
1.**Bootstrap self-check**: a KMS must call the auth API and verify that **itself** is allowed before bootstrap succeeds.
8
8
2.**Onboard receiver-side source check**: a new KMS must reject onboarding if the **source KMS** is not allowed by the receiver's auth policy.
@@ -25,7 +25,7 @@ This guide is written as a deployment-and-test runbook so an AI agent can follow
25
25
> 7. KMS now always requires quote/attestation. For local development without TDX hardware, use `sdk/simulator` instead of trying to run a no-attestation KMS flow.
26
26
> 8. For `auth-simple`, `kms.mrAggregated = []` is a deny-all policy for KMS. Use that as the baseline deny configuration, then add the measured KMS MR values for allow cases.
27
27
> 9.**Port forwarding is simpler than gateway for testing.** Using `--gateway` requires the auth API to return a valid `gatewayAppId`, which adds unnecessary complexity. Use `--port tcp:0.0.0.0:<host-port>:8000` instead.
28
-
> 10.**Remote KMS attestation has an empty `osImageHash`.**When the receiver verifies the source KMS during onboard, the `osImageHash` field in the attestation is empty (because `vm_config` is not available for the remote attestation). Auth configs for receiver-side checks must include `"0x"` in the `osImages`array to match this empty hash.
28
+
> 10.**~~Remote KMS attestation has an empty `osImageHash`.~~**Fixed in PR #581: RA-TLS certs now use the unified `PHALA_RATLS_ATTESTATION` format which preserves `vm_config`. For old source KMS instances that still use the legacy cert format, the receiver-side check automatically fills `osImageHash` from the local KMS's own value. No special `"0x"`entry in `osImages`is needed anymore.
29
29
> 11. The `source_url` in the `Onboard.Onboard` request must use an address **reachable from inside the CVM** (e.g., `https://10.0.2.2:<port>/prpc`), not `127.0.0.1` which is the CVM's own loopback.
30
30
31
31
---
@@ -49,13 +49,13 @@ This guide is written as a deployment-and-test runbook so an AI agent can follow
49
49
50
50
## 1. Why this document exists
51
51
52
-
PR #538 already proposes a richer `kms/e2e/` framework, but as of **2026-03-19** it is still open/draft and touches overlapping KMS files. To avoid waiting for that PR, this guide uses:
52
+
This guide provides a standalone test procedure that does not depend on a dedicated e2e framework. It uses:
53
53
54
54
- existing KMS deploy flows
55
55
-`auth-simple` as a controllable auth API
56
56
- manual RPC calls via `curl`
57
57
58
-
This keeps the test independent from PR #538 while still exercising real deployment paths.
58
+
This exercises real deployment paths with minimal dependencies.
59
59
60
60
---
61
61
@@ -98,7 +98,7 @@ Policy responsibilities:
98
98
99
99
Before starting, make sure the following are available:
100
100
101
-
1. A branch or image containing the PR #573KMS changes
101
+
1. A KMS image built from current `master` (includes PR #573auth checks, #579 mandatory attestation, #581 unified cert format)
102
102
2. A working `dstack-vmm` or teepod deployment target
103
103
3. Two routable KMS onboard URLs
104
104
4.`bun` installed on the host, because `kms/auth-simple` runs on Bun
@@ -315,12 +315,10 @@ All three values above are expected to be hex strings **without** the `0x` prefi
315
315
316
316
Use a wrong `mrAggregated` value while allowing the observed OS image.
317
317
318
-
> **Important:** include `"0x"` in `osImages` to handle remote KMS attestation during onboard receiver-side checks, where `osImageHash` is empty because `vm_config` is unavailable for the remote attestation.
0 commit comments