feat(rbac): RbacStore 持久化权限体系替代硬编码 UserStore
- 新增 PageCatalog / RbacModels / RbacStore / RbacController:用户、角色、页面/操作/控件授权落盘 data/rbac.json,支持运行时增删改并即时生效 - 密码改用 PBKDF2-SHA256(100k 迭代 + 16B 随机盐) 存储,校验走 FixedTimeEquals 防时序攻击;对外 DTO 绝不外泄盐/哈希 - AuthController 登录 / me / switch-scope 统一收敛到 BuildSession,按角色在当前 scope 的并集计算有效权限并签发 JWT - EffectivePermissions 增加 AllowedPages;移除旧的硬编码 UserStore - Program.cs 注册 RbacStore、新增 RbacAdmin 授权策略(ops claim 含 * 或 auth.manage),并按 SimpleLite:FollowParent 决定是否注册停机清理钩子
This commit is contained in:
@@ -41,4 +41,5 @@ public record EffectivePermissions(
|
||||
string UserId,
|
||||
int Version,
|
||||
List<string> AllowedOps,
|
||||
List<WidgetGrantDto> VisibleWidgets);
|
||||
List<WidgetGrantDto> VisibleWidgets,
|
||||
List<string> AllowedPages);
|
||||
|
||||
Reference in New Issue
Block a user