docs: audit reports + feature docs + skills + admin-v2 + config sync
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Update audit tracker, roadmap, architecture docs, add admin-v2 Roles page + Billing tests, sync CLAUDE.md, Cargo.toml, docker-compose.yml, add deep-research / frontend-design / chart-visualization skills Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
> **分类**: 架构层
|
||||
> **优先级**: P0 - 决定性
|
||||
> **成熟度**: L4 - 生产
|
||||
> **最后更新**: 2026-03-16
|
||||
> **最后更新**: 2026-04-01
|
||||
|
||||
---
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
### 1.1 基本信息
|
||||
|
||||
安全认证模块负责 ZCLAW 与 ZCLAW 之间的身份验证和凭证安全存储,支持 Ed25519 设备认证和 JWT 会话令牌。
|
||||
安全认证模块负责 ZCLAW 的身份验证和凭证安全存储,支持 Ed25519 设备认证、JWT 会话令牌、TOTP 2FA、HttpOnly Cookie 等多种安全机制。
|
||||
|
||||
| 属性 | 值 |
|
||||
|------|-----|
|
||||
@@ -172,7 +172,34 @@ async function storeDeviceKeys(publicKey: string, privateKey: string) {
|
||||
- [x] JWT Token 管理
|
||||
- [x] 设备注册和审批
|
||||
- [x] 跨平台支持
|
||||
- [x] localStorage 降级
|
||||
- [x] localStorage 降级 (AES-GCM 加密)
|
||||
|
||||
### 5.1.1 安全渗透测试 V1 修复 (2026-03-31)
|
||||
|
||||
> 整体评级: **B+** (良好) | 5 HIGH + 10 MEDIUM 全部已修复 | 12 个安全控制项全部 PASS
|
||||
|
||||
**SaaS 后端安全修复:**
|
||||
- [x] JWT `password_version` 机制 — 密码修改自动使所有已签发 JWT 失效
|
||||
- [x] 账户锁定 — 5 次登录失败后锁定 15 分钟
|
||||
- [x] 邮箱验证 — RFC 5322 正则 + 254 字符长度限制
|
||||
- [x] JWT 密钥保护 — `#[cfg(debug_assertions)]` 保护的 fallback,release 模式拒绝启动
|
||||
- [x] TOTP 加密密钥独立化 — 生产环境强制 `ZCLAW_TOTP_ENCRYPTION_KEY` (64 hex)
|
||||
- [x] TOTP/API Key 加密 — AES-256-GCM + 随机 Nonce
|
||||
- [x] 密码存储 — Argon2id + OsRng 随机盐
|
||||
- [x] Refresh Token 轮换 — 单次使用 + 撤销校验
|
||||
|
||||
**网络安全:**
|
||||
- [x] Cookie 安全 — HttpOnly + Secure + SameSite=Strict + 路径作用域
|
||||
- [x] CORS 白名单 — 生产强制白名单,缺失拒绝启动
|
||||
- [x] 限流持久化 — PostgreSQL 滑动窗口,重启不丢失
|
||||
- [x] XFF 信任链 — 仅信任配置的代理 IP
|
||||
|
||||
**前端安全:**
|
||||
- [x] CSP 加固 — 移除 `unsafe-inline` script
|
||||
- [x] Admin Token — HttpOnly Cookie 传递,JS 不存储 token
|
||||
- [x] Pipeline 日志脱敏 — Debug 日志截断 + 仅记录 keys
|
||||
|
||||
**详细报告**: [SECURITY_PENETRATION_TEST_V1.md](../SECURITY_PENETRATION_TEST_V1.md)
|
||||
|
||||
### 5.2 测试覆盖
|
||||
|
||||
@@ -194,11 +221,21 @@ async function storeDeviceKeys(publicKey: string, privateKey: string) {
|
||||
|
||||
## 六、演化路线
|
||||
|
||||
### 6.1 短期计划(1-2 周)
|
||||
### 6.1 已完成
|
||||
- [x] TOTP 双因素认证 (AES-256-GCM 加密存储)
|
||||
- [x] JWT password_version 密码修改使旧 token 失效
|
||||
- [x] 账户锁定机制 (5 次失败 → 锁 15 分钟)
|
||||
- [x] HttpOnly Cookie 认证模式
|
||||
- [x] CSP 加固 (移除 unsafe-inline)
|
||||
- [x] CORS 白名单强制
|
||||
- [x] 限流持久化 (PostgreSQL)
|
||||
|
||||
### 6.2 短期计划(1-2 周)
|
||||
- [ ] 添加生物识别支持 (Touch ID / Windows Hello)
|
||||
|
||||
### 6.2 中期计划(1-2 月)
|
||||
### 6.3 中期计划(1-2 月)
|
||||
- [ ] 支持 FIDO2 硬件密钥
|
||||
- [ ] 速率限制从 DashMap 迁移到 Redis (多实例部署)
|
||||
|
||||
### 6.3 长期愿景
|
||||
- [ ] 去中心化身份 (DID)
|
||||
|
||||
Reference in New Issue
Block a user