# 一、SSWFlow 真数据建模(TC-FLOW-006 端到端跑通)
- 前端 flowTransform.ts 修复多端口丢失(prep.intersect left/right、model.predict model)—— 关键 bug:浏览器 FlowEditor auto-save 把所有 targetPort 改成 inputs[0].key,导致 Start 时报「端口未连线」
- 后端 FlowRunServiceImpl.start 改走 getAliveWithCanvas,与 detail/Validate 共用同一读路径
- 后端 FlowService 新增 getAliveWithCanvas() 方法
# 二、TEE 安全管理配置合并
- application.yml:去重 security 段(YAML 顶级键冲突),新增 sswflow.nax 配置(Python 解释器、镜像、FISCO 节点)
# 三、E2E 真实业务链路 + 真实计算引擎标记补强
- 新增 docs/e2e/{run_one,probe_flow006_api,riskctrl}.mjs 和 6 条 TC-FLOW-001~006 用例
- 新增 fixtures/ 真实数据集(银行信用特征、征信评分、生成器)
- dsl.mjs 新增 6 个真实链路 helper:parseEngineChain / assertRealEngineEngaged / parseChainEvidence / assertChainEvidence / fetchTeeEvidence / assertTeeEvidence / assertExecCost / sha256Hex
- 5 条用例(001~005)全部 6~8 步 PASS,真 K8S 引擎命中,真实 SHA-256 业务指纹
# 四、其他
- .gitignore 增加 node_modules、_diag_*、dacli/_*、scard audit data 等临时产物排除
- 删除废弃 docs/e2e.zip(25MB)
- 删除 docs/tds/流程图20260313.pptx 入库
- .workbuddy/memory 2026-08-06/07 入库
- scard audit jsonl 跟 SEV-SNP TEE 实跑同步更新
security-connector
Secure Connector Backend System
A security-focused backend system for managing connector devices with TPM-based hardware security, ECDH key exchange, and policy-based access control.
Architecture
code/
├── server/ # Server-side components (x86 Linux)
│ ├── main.go # Server entry point
│ ├── api/ # REST API handlers
│ ├── crypto/ # Server-side cryptographic operations
│ ├── auth/ # Device authentication
│ ├── keyring/ # KEK/DEK management
│ ├── policy/ # RBAC/ABAC policy engine
│ ├── audit/ # Audit logging
│ └── easytier/ # EasyTier tunnel coordination
│
├── connector/ # Connector-side components (Host x86)
│ ├── main.go # Connector entry point
│ ├── tpm/ # TPM interface (mock for Phase 1)
│ ├── keys/ # Local key management
│ ├── k3s/ # k3s API gateway
│ └── register/ # Device registration flow
│
├── common/ # Shared modules
│ ├── proto/ # Protocol message definitions
│ ├── crypto/ # Shared cryptographic primitives
│ └── types/ # Shared type definitions
│
├── scripts/
│ └── cloudinit/ # Cloud-init configuration generator
│
└── tests/ # Tests
Key Protocols
1. Device Registration (AUTH_REGISTER)
- Connector sends CSR with TPM public key
- Server validates and derives KEK via ECDH
- Server returns encrypted KEK and session certificate
2. Challenge-Response (Runtime Auth)
- Server sends Nonce + Challenge
- Connector signs with TPM private key
- Server verifies signature and derives session key
3. Key Incremental Update
- Partial key updates via offset/length
- Server FPGA signature required
- Version checking prevents rollback
Key Hierarchy
Layer 0: TPM SRK (device hardware root trust)
Layer 1: KEK (Key Encryption Key) - derived via ECDH
Layer 2: DEK (Data Encryption Key) - encrypted by KEK
Layer 3: Session Keys (mTLS) - short-lived
Layer 4: Server Root Key (HSM-level)
API Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/device/register | Device registration |
| POST | /api/v1/device/challenge | Get challenge for auth |
| POST | /api/v1/device/auth | Submit challenge response |
| GET | /api/v1/device/{id}/status | Get device status |
| POST | /api/v1/key/incremental-update | Incremental key update |
| POST | /api/v1/easytier/join | Join EasyTier network |
| POST | /api/v1/k3s/join | Join k3s cluster |
Building
# Server
cd server && go build -o security-server .
# Connector
cd connector && go build -o connector .
# Cloud-init generator
cd scripts/cloudinit && chmod +x generate.sh
Running
# Server
./security-server --listen :8443 --data-dir /var/lib/security-connector
# Connector
./connector --server https://localhost:8443 --device-id DEV_001 --register
Cloud-init Configuration
# Generate cloud-init for a new device
./scripts/cloudinit/generate.sh \
--device-id DEV_host1_001 \
--server-url https://connector-server:8443 \
--network-id secure-net \
--output cloud-init.yaml
Development
Phase 1 (Current)
- Protocol message definitions (proto/)
- Server API handlers (server/api/)
- Server-side crypto (server/crypto/)
- Device authentication (server/auth/)
- Key management (server/keyring/)
- Policy engine (server/policy/)
- Audit logging (server/audit/)
- EasyTier coordinator (server/easytier/)
- Mock TPM (connector/tpm/)
- Connector key manager (connector/keys/)
- Registration flow (connector/register/)
- Cloud-init generator (scripts/cloudinit/)
Phase 2 (Planned)
- Real TPM interface implementation
- k3s integration
- PostgreSQL storage backend
- Device revocation handling
Phase 3 (Future)
- PQC algorithm support (ML-KEM/ML-DSA)
- FPGA/SED integration
- Production hardening
Security Notes
- All cryptographic operations use ECDH P-256 and AES-256-GCM
- KEK is derived per-device using ECDH
- Session keys are short-lived and rotated
- TPM Quote provides remote attestation
- Incremental updates prevent rollback attacks