6 Commits

Author SHA1 Message Date
liuyun
4d2d43b03a feat(storage): 对象存储 MinIO → 腾讯云 COS(cos-nodejs-sdk-v5)
- StorageService 换 COS SDK,配置从 COS_SECRET_ID/KEY/REGION/BUCKET 环境变量读取
- upload/presignGet/delete/buildKey 签名不变,key 前缀(elder/abnormal)组织子目录

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-21 15:53:10 +08:00
liuyun
394d7a9731 feat(security): id_card_no 存储层 AES-256-GCM 加密 + SHA-256 哈希唯一
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-21 12:03:43 +08:00
liuyun
312712f86c chore(c1): .env.example 修正 MinIO 端口 9010 与凭据 admin/admin111
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-14 22:01:19 +08:00
liuyun
465057cce0 feat(c1): MinIO 存储模块
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 17:03:12 +08:00
liuyun
200cedeb59 fix: 第二轮残留问题
- 资源变更清权限缓存(H4 残留)
- 菜单聚合过滤已删角色(与 resolveAuth 一致)
- removeRole 事务化;removeTenant 清 Redis(userState/perm)
- createTenant 事务化 + 未提供密码时生成随机密码
- 登录失败锁定加 IP 维度;register 禁止平台租户
- refresh token 落 ip/userAgent;e2e 用独立账号避免锁死
- .env.example 补 CORS_ORIGIN/NODE_ENV、脱敏默认密码

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 17:22:10 +08:00
liuyun
7340658305 feat: enforce RBAC, audit/login logging, and seed script
收口 Phase 0 三处「声明未生效」:
- 三级鉴权落地:权限集存 Redis(key 前缀隔离多项目),@RequirePermissions 挂到全部受控接口,super_admin 角色绕过权限码与 data_scope
- 审计/登录日志自动落库:@AuditLog 装饰器 + 拦截器异步写入(写操作+登录登出),登录成功/失败均记 login_log(脱敏)
- seed 脚本:一键初始化租户 touyun/用户 touyun/超管 super_admin/全量资源树(48 资源全量授权)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-10 23:19:41 +08:00