liuyun
|
ba1ae43e39
|
feat(security): helmet + CORS 白名单 + 限流 + 定时清理 + 时间契约 Unix 毫秒
- helmet 安全头 + CORS_ORIGIN 白名单 + Swagger 仅非生产
- @nestjs/throttler 全局限流(60s/100 次)
- @nestjs/schedule 定时清理过期 token 与旧日志
- API 时间统一 Unix 毫秒(TransformInterceptor 递归转换)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-10-11 16:54:08 +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 |
|
liuyun
|
f6fddb4a53
|
feat: use pino-pretty for readable dev logs (LOG_PRETTY, default true)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-10-10 21:49:34 +08:00 |
|
liuyun
|
24790e8985
|
feat: add Swagger API docs (/docs) with DTO schemas
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-10-10 21:39:37 +08:00 |
|
liuyun
|
bbc06ae775
|
feat: add pino structured logging (stdout + optional file via env)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-10-10 21:31:05 +08:00 |
|
liuyun
|
d8d3055c73
|
feat: backend foundation (Prisma 6 + MySQL, auth, tenant/soft-delete/data-scope filters, core CRUD)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-10-10 21:13:35 +08:00 |
|
liuyun
|
dc40ca3343
|
chore: init sysmgr-nest (NestJS scaffold)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-10-10 14:03:17 +08:00 |
|