feat: central system database bootstrap for local developers #2

Closed
lunanting wants to merge 0 commits from codex/remote-bootstrap into main
Owner

目的与范围

  • 本地首次启动弹窗通过 HTTPS + 一次性部署 Key 注册设备,自动建立受限 SSH 数据库隧道。默认请求地址为 https://ck.yydd.ai:8443/v1/enroll。
  • 中央系统库保存系统配置和第三方数据库连接配置;每台设备独立数据库账号,创建一次性显示的应用管理员。
  • 增加 ck.yydd.ai 服务端 broker、服务器安装脚本、DNS-01 证书配置和远程部署文档。
  • 纳入多人及 AI 开发提交合并规范。

安全边界

  • Key 只保存哈希并限制次数/有效期;MySQL 继续只监听 127.0.0.1:3307。
  • SSH 账号只能本地端口转发到系统库,设备可单独撤销;仓库不包含任何运行时密码、私钥或业务数据。
  • 应用管理员密码只在注册响应中返回一次。

验证

  • npm --prefix backend run check:通过(306 tests)
  • npm --prefix frontend run check:通过(lint、21 tests、build)
  • npm run test:remote:通过(3 tests)
  • 服务端端到端验证:临时设备注册、SSH 隧道、管理员 bcrypt 密码校验、第三方配置读取、跨库读取拒绝、撤销清理均通过。

服务器前置条件

  • ck.yydd.ai 使用 Cloudflare DNS-01;管理员需在服务器放置 root-only /etc/cangku-tls/cloudflare.ini,再运行证书和安装脚本。Certbot 自动续期。
## 目的与范围 - 本地首次启动弹窗通过 HTTPS + 一次性部署 Key 注册设备,自动建立受限 SSH 数据库隧道。默认请求地址为 `https://ck.yydd.ai:8443/v1/enroll`。 - 中央系统库保存系统配置和第三方数据库连接配置;每台设备独立数据库账号,创建一次性显示的应用管理员。 - 增加 ck.yydd.ai 服务端 broker、服务器安装脚本、DNS-01 证书配置和远程部署文档。 - 纳入多人及 AI 开发提交合并规范。 ## 安全边界 - Key 只保存哈希并限制次数/有效期;MySQL 继续只监听 127.0.0.1:3307。 - SSH 账号只能本地端口转发到系统库,设备可单独撤销;仓库不包含任何运行时密码、私钥或业务数据。 - 应用管理员密码只在注册响应中返回一次。 ## 验证 - `npm --prefix backend run check`:通过(306 tests) - `npm --prefix frontend run check`:通过(lint、21 tests、build) - `npm run test:remote`:通过(3 tests) - 服务端端到端验证:临时设备注册、SSH 隧道、管理员 bcrypt 密码校验、第三方配置读取、跨库读取拒绝、撤销清理均通过。 ## 服务器前置条件 - `ck.yydd.ai` 使用 Cloudflare DNS-01;管理员需在服务器放置 root-only `/etc/cangku-tls/cloudflare.ini`,再运行证书和安装脚本。Certbot 自动续期。
lunanting added 2 commits 2026-09-12 16:07:38 +08:00
lunanting added 1 commit 2026-09-12 16:09:01 +08:00
lunanting added 1 commit 2026-09-12 16:11:10 +08:00
lunanting added 1 commit 2026-09-12 16:53:31 +08:00
lunanting added 1 commit 2026-09-12 16:56:01 +08:00
lunanting added 1 commit 2026-09-12 16:58:07 +08:00
lunanting added 1 commit 2026-09-12 17:14:09 +08:00
lunanting added 1 commit 2026-09-12 17:21:12 +08:00
lunanting added 1 commit 2026-09-12 17:26:26 +08:00
lunanting added 1 commit 2026-09-12 17:29:30 +08:00
lunanting added 1 commit 2026-09-12 17:33:31 +08:00
lunanting added 1 commit 2026-09-12 17:38:14 +08:00
lunanting added 1 commit 2026-09-12 17:50:28 +08:00
lunanting closed this pull request 2026-09-12 18:00:56 +08:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunanting/cangku#2
No description provided.