Copy-DbaLogin - Copy the permissions of a login on logins, server roles, endpoints and availability groups
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- databases, powershell
- 领域
- database
调研方向
Read Copy-DbaLogin, Sync-DbaLoginPermission, and Export-DbaLogin, focusing on how they use Server.EnumServerPermissions and Server.EnumObjectPermissions. The proposal leaves open whether endpoint and availability-group permissions should be copied behind a switch, so first clarify the intended scope. Done means the agreed permissions are copied or scripted correctly, including the behavior for missing securables and renamed logins.
由索引模型根据 Issue 内容生成。
描述
Copy-DbaLogin, Sync-DbaLoginPermission and Export-DbaLogin handle the permissions of a login on the server itself (Server.EnumServerPermissions, class 100 in sys.server_permissions), its server roles, its database users and their permissions. They never copy the permissions of the login on other server securables (Server.EnumObjectPermissions):
- logins and server roles (class 101):
IMPERSONATE ON LOGIN::x,CONTROL/ALTER/VIEW DEFINITION ON LOGIN::xorON SERVER ROLE::x - endpoints (class 105):
CONNECT ON ENDPOINT::x - availability groups (class 108):
ALTER/CONTROL/VIEW DEFINITION ON AVAILABILITY GROUP::x
A login copied to a new instance therefore loses, for example, the IMPERSONATE an application login needs for EXECUTE AS LOGIN. Since #10801, an existing login that -UpdateExisting or Sync-DbaLoginPermission syncs loses the class 101 permissions that the source login does not have, but it gets none that the source login has.
Proposal:
- Copy the class 101 permissions of the source login whose securable exists on the destination (with a rename, the securable is matched by name, the grantee is the new login). A missing securable gives a verbose message, not a failure.
- Leave endpoints and availability groups out by default. They belong to the replica: a secondary grants
CONNECTon its endpoint to the service account of the primary, and endpoint names may differ per replica. A switch could copy them where the names match. - Script the same permissions in Export-DbaLogin.
Is this wanted, and should 2 be a switch or left out entirely?
This text was created by Claude and reviewed by Andreas Jordan.
- 主要语言
- PowerShell
- 星标
- 2.9k
- 派生
- 869
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 38
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dataplat/dbatools 的其他 Issue
-
bugs life triage required
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 2 天内回复
-
bugs life triage required
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
Invoke-DbaDbPiiScan - Fix broken PII patterns, add Nordic known names, and proposals for metadata-only scan and native classification可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
维护者通常 2 天内回复
-
bugs life triage required
难度 4/5 3-5 天 新手友好度 48/100
dataplat/dbatools#10860 · 1 条评论 ·
维护者通常 2 天内回复
-
bugs life Chrissy needed
难度 3/5 半天 新手友好度 38/100
维护者通常 2 天内回复
查看 dataplat/dbatools 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
bug db/postgres user-priority/P1
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
kagent-dev/kagent#3789 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复