From 771fdd92eb03e9dff7d3ae20b7cb89f1ca288959 Mon Sep 17 00:00:00 2001 From: ila <2+ila@noreply.git.ilapage.cn> Date: Mon, 31 Aug 2026 11:17:02 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E8=AE=B0=E5=BD=95=20#151=20=E4=B8=89?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=9C=BA=E5=99=A8=E8=BA=AB=E4=BB=BD=E4=B8=8E?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E4=BC=A0=E8=BE=93=20v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Local-Development-and-Verification.-.md | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Local-Development-and-Verification.-.md b/Local-Development-and-Verification.-.md index 5431914..49e37cd 100644 --- a/Local-Development-and-Verification.-.md +++ b/Local-Development-and-Verification.-.md @@ -671,3 +671,30 @@ git diff --check 这些测试只验证冻结契约,不验证 #153 产品 mapper/relay/ingress、#151 机器身份、实际证据存储/授权、网络断线补投或跨项目 E2E。 + + +## 机器身份与安全传输 v1 验证 + +从仓库根目录执行隔离契约测试: + +```powershell +pwsh -NoProfile -File contracts/tests/machine-identity-v1/run.ps1 +``` + +脚本在系统临时目录建立虚拟环境,按固定 `cryptography==50.0.1` 和 `jsonschema==4.25.1` 验证封闭 Schema、Go/Python 固定 Ed25519 向量、请求绑定、Bearer-only、错 audience/scope、过期、重放、轮换、吊销和 TLS policy,结束后删除所属临时目录。 + +三端定向验证: + +```powershell +cd Sense/server +go test -race ./app/sense/integration/machine_identity + +cd ../../Bell/server +go test -race ./app/bell/integration/machine_identity + +cd ../.. +Brain\.venv\Scripts\python.exe contracts\tests\machine-identity-v1\test_contract.py +``` + +这些测试只证明 #151 身份和传输基础。真实客户 PKI/网络、现场时钟漂移、业务 endpoint、断网补投以及持久 replay 重启恢复由 #152/#153/#155 验证;不得用进程内 replay store替代生产结论。 +