migrate: roles removed from schema.yaml are never dropped (no DropRoleOperation, even with --allow-destructive)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reading schema.yaml, the migration-spec, and the RLS spec section [RLS-PG-SUPPORT-DDL] to understand managed roles and current create/reassert behavior. Trace how --allow-destructive emits grant revokes and policy drops, then define where DropRoleOperation fits after those operations. Done means removed managed roles can be dropped safely, while roles owning objects or having unmanaged memberships are skipped with a warning.
由索引模型根据 Issue 内容生成。
描述
Context
NAP completed its `[AUTHZ-ONE-ROLE]` migration: the `app_admin` role was removed from `schema.yaml` (roles list, all grants, all policies). Per the RLS spec, "Role drift is reconciled non-destructively: roles are created if missing" — there is no drop path at all.
Grants and policies referencing the removed role DO drop under `--allow-destructive`, which leaves a bare NOLOGIN/NOBYPASSRLS role with no privileges. That is powerless but it is permanent drift: the declarative yaml says the role does not exist, the database says it does, and there is no sanctioned way to converge (NAP is forbidden from hand-written DDL by policy).
Ask
A `DropRoleOperation` emitted when a role exists in the database (and was previously managed — e.g. matches a declared-role naming scope or is recorded in migration state) but is absent from the yaml, gated behind `--allow-destructive` like table/policy drops. Ordering: after all grant revokes and policy drops that reference the role, and it should skip (with a warning) if the role still owns objects or has memberships outside the managed set.
The migration-spec has no section on role drops today; the RLS spec's [RLS-PG-SUPPORT-DDL] only covers create/reassert.
- 主要语言
- C#
- 星标
- 68
- 派生
- 4
- 平均合并
- 50 分钟
- 30 天内合并 PR
- 2
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Nimblesite/DataProvider 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 92/100
Nimblesite/DataProvider#137 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
Nimblesite/DataProvider#72 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
Nimblesite/DataProvider#121 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
Nimblesite/DataProvider#108 ·
维护者通常 1 天内回复
-
A check constraint the schema cannot name can never be retired, and keeps enforcing the old rule未关闭
难度 4/5 3-5 天 新手友好度 48/100
Nimblesite/DataProvider#107 ·
维护者通常 1 天内回复
查看 Nimblesite/DataProvider 的全部 Issue
相似的 Issue
-
kronos:develop:queued priority:P0
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
nopSolutions/nopCommerce#8512 ·
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
modelcontextprotocol/csharp-sdk#2061 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复