Write ADR 0027 — confidential verified-serving tier (universal image in a Dstack CVM)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 54/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- docker, github, postgresql, typescript
调研方向
Read docs/adr/0021-universal-runtime-image.md, docs/adr/0020-child-bundle-storage-r2.md, and docs/adr/README.md for the existing decisions and ADR style. Write docs/adr/0027-confidential-verified-serving-tier.md with the two verification channels, both boot paths, attestation flow, and required honest limits; then add its index row and bump the next-free note to 0027. Done when the acceptance criteria are met.
由索引模型根据 Issue 内容生成。
描述
What to build
Write docs/adr/0027-confidential-verified-serving-tier.md — a decision doc recording a new optional runtime tier: the universal image (ADR 0021) run inside a Phala Dstack CVM (Intel TDX), providing end-to-end verifiability of the serving process — SSR output, API/auth behavior, key custody — which SRI pins alone cannot cover. Update docs/adr/README.md (index row + "next free" note bumped to 0027).
Core framing: two verification channels
End-to-end verifiability decomposes into two channels, one already owned by the repo:
| Channel | Covers | Mechanism | Status |
|---|---|---|---|
| Static bytes | UI/plugin bundles the browser loads | SRI pins in the on-chain FastKV config (ADR 0020 amendments), browser-enforced; host-side SRI-before-load (beta-v2 map decision #5) | Already designed |
| Serving process | SSR HTML, API/auth behavior, key custody | Hardware attestation of the universal image running in a Dstack CVM | This ADR |
The naive proposal ("verify the container hash matches the JS you see") conflates the two — the ADR decomposes them honestly, then binds them together.
Decision points to record
- New optional tier: confidential instance. Same universal image, digest-pinned Dstack compose; a hosting mode selected at deploy, not a second architecture. Root stays on Railway/CDN; opt-in per tenant.
- Digest-pinned compose. The Dstack compose pins the image by GHCR digest — the deploy train already produces
BOS_IMAGE_DIGEST, and Dstack best practice is digest pinning so RTMR3's compose-hash traces to exact bytes. - Boot paths — both designed, Path A is the default:
- Path A (default): self-contained boot. Own namespace staged in the image (ADR 0021 tier detection); the measurement covers every served byte. Changes require an image redeploy.
- Path B: CDN-fetch boot, pin-gated. Registry-tier boot allowed for confidential instances: the enclave hard-gates every fetched/served bundle against the FastKV config's SRI pins (beta-v2 #5's host-side SRI-before-load promoted to a hard gate in this tier) and reports the resolved config hash in runtime data. Minute-level config flips preserved; the measurement covers the verifier rather than the bytes, trust anchored in on-chain pins.
- TLS terminated inside the CVM. Dstack's ZT-TLS pattern: keys generated in the TEE, ACME with enclave-held private keys, evidence at
/evidences/bound to the quote'sreport_data, CAA DNS records on the domain. One origin + one start-stack process means one measurement covers the whole surface: SSR, API, and auth (browser API calls ride the same attested TLS). Gateway-managed*.phala.networkTLS is explicitly NOT used — sovereign mode is own domain + own enclave-held TLS. - The differentiating move: config-hash runtime-data binding. The enclave reports the resolved FastKV config hash (+ registry height) in attestation runtime data. The full verification chain — every link a primitive the repo already ships:
hardware signature → compose-hash ↔ GHCR digest ↔ CI-validated SHA → config hash ↔ FastKV entry at bos://<account>/<gateway> → SRI pins ↔ bytes in the browser - Attestation surface + three verification audiences. Expose
/.well-known/attestation(Dstack convention: quote + event log + VM config, nonce freshness viareportData). Audiences: (a) trustless local verification (dcap-qvl/dstack-verifier) for power users and agents — natural futurebos verify <domain>; (b) a monitor-backed UI badge for normal users, framed honestly as auditable, not in-browser math; (c) CI verification after each deploy. Future options: on-chain DCAP verification (Automata-style), a FastKV-published measurement allowlist mirroring DstackKms governance on NEAR. - Secret custody as a secondary benefit (not the goal, recorded as such):
BETTER_AUTH_SECRET, the relayer/Sponsor ephemeral key, and storage credentials KMS-released only to the whitelisted measurement. Postgres stays outside the enclave; boundary documented honestly.
Honest-limits section (required)
- Verifier bootstrap circularity (the verifier is served by the enclave it verifies — resolved by vendor-root-anchored quote verification + evidence binding, but stated explicitly).
- Browsers don't verify attestation natively; for ordinary users this lands as an auditable guarantee / badge, not a felt math check.
- The measurement covers boot-time state; runtime behavior is covered only via the config-hash binding.
- SSR output is generated at runtime — attestation proves the code, not each rendered byte.
- Postgres outside the enclave; DB URL/secret boundary.
- CVM cost, no serverless, migration re-attestation, debug-mode/TCB-freshness checks.
Status
Proposed, spike-gated — the direction is recorded; implementation is gated on the spike ticket.
Acceptance criteria
-
docs/adr/0027-confidential-verified-serving-tier.mdwritten in repo ADR style (context → decision → limits → consequences) - Both boot paths recorded as designed decisions with the tradeoff stated (A: measurement covers bytes; B: trust anchored in pins + enclave verifier)
-
docs/adr/README.mdindex row added and "next free" note bumped to 0027 - No changeset required (docs-only)
Context
- Follows discussion of ADR 0021 (
docs/adr/0021-universal-runtime-image.md), ADR 0020 (docs/adr/0020-child-bundle-storage-r2.md), and the beta-v2 wayfinder map decision #5 (publisher attestation + load-time SRI — the confidential tier is the process channel and proceeds independently). - Dstack references: RTMR3 measures the compose hash; TLS keys generated in-TEE with evidence bound to the quote; trustless verification via dcap-qvl; zkSecurity audit (2025-08).
- Spike ticket to follow (blocked by this one).
- 主要语言
- TypeScript
- 星标
- 5
- 派生
- 3
- 平均合并
- 9 小时 55 分钟
- 30 天内合并 PR
- 108
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NEARBuilders/everything-dev 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
NEARBuilders/everything-dev#400 ·
维护者通常 1 天内回复
-
Parent runtime republished with react 19.2.9 shared deps breaks rc.16-pinned children (SSR composition fails)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 5/5 一周以上 新手友好度 35/100
NEARBuilders/everything-dev#546 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 54/100
NEARBuilders/everything-dev#545 ·
维护者通常 1 天内回复
-
bug
难度 5/5 一周以上 新手友好度 25/100
NEARBuilders/everything-dev#531 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
NEARBuilders/everything-dev#526 · 1 条评论 ·
维护者通常 1 天内回复
查看 NEARBuilders/everything-dev 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
cloudscape-design/components#5184 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
JarX-Concepts/react-native-platform-components#130 ·
维护者通常 1 天内回复
-
fix(api): optimize-for-web /preview outer catches miss asDecoderOutOfMemory on V8 OOM and SIGKILL未关闭area: backend bug priority: low
难度 2/5 1-3 小时 新手友好度 83/100
snapotter-hq/SnapOtter#3773 ·
维护者通常 1 天内回复
-
ai-driven-qa ux-audit
难度 2/5 1-3 小时 新手友好度 78/100
linagora/twake-contacts-frontend#386 ·
维护者通常 1 天内回复
-
git: README should state plainly that without --repository every reachable repository is in scope未关闭documentation server-git v2
难度 1/5 1-3 小时 新手友好度 84/100
modelcontextprotocol/servers#5225 ·
维护者通常 1 天内回复