IAM-backed ObjectStores generate wildcard Secret RBAC
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 64/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- aws, go, kubernetes
- 领域
- authorization, backend, security
调研方向
从 Role 生成和 AWS 凭据引用收集路径开始,然后将其与现有的 Azure 默认/托管身份处理进行比较。验证 IAM 继承情况和显式凭据 Secret 情况,并添加或更新测试,使完成条件为:对于空集合没有 Secret 规则,而当存在 Secret 名称时有一条限定范围的规则。
由索引模型根据 Issue 内容生成。
描述
Summary
When an ObjectStore uses AWS IAM role inheritance (inheritFromIAMRole: true) and does not reference any credential Secrets, the generated <cluster>-barman-cloud Role still contains a secrets rule with no resourceNames.
In Kubernetes RBAC, an omitted or empty resourceNames list does not restrict the rule to no objects; it allows the verbs on all resources of that type. As a result, an IAM-backed barman-cloud instance can get/list/watch every Secret in the namespace even though barman-cloud does not need any Secret for the AWS credential chain.
Why this matters
Deployments using IRSA, pod identity, or IMDS typically set inheritFromIAMRole: true so barman-cloud gets credentials from the pod environment. In that mode, barman-cloud returns before reading AWS credential Secret references, so the plugin should not grant Secret access unless a credential Secret is actually needed.
Expected behavior
If no credential Secret names are collected for the ObjectStores referenced by a cluster, the generated Role should not include a secrets rule. For AWS credentials with inheritFromIAMRole: true, AWS Secret references should be ignored the same way Azure default/managed identity credentials are ignored today.
Actual behavior
The Role includes a secrets rule with an empty resourceNames field, which grants access to all Secrets in the namespace.
Proposed fix
- Skip AWS credential Secret references when
inheritFromIAMRoleis true. - Omit the generated
secretsPolicyRule when the collected Secret name set is empty. - Keep the existing scoped
secretsrule when explicit credential Secret refs are present.
- 主要语言
- Go
- 星标
- 198
- 派生
- 81
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 19
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudnative-pg/plugin-barman-cloud 的其他 Issue
-
Wrong `ObjectStore` key logged when the backup object store can't be retrieved in the instance sidecar可能已有人在做 @SamarthSRao 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
cloudnative-pg/plugin-barman-cloud#1142 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
cloudnative-pg/plugin-barman-cloud#1117 · 1 个 reaction ·
维护者通常 1 天内回复
-
data.compression rejects zstd although barman-cloud-backup supports it可能已有人在做 @dgsardina 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
cloudnative-pg/plugin-barman-cloud#1104 · 4 个 reaction ·
维护者通常 1 天内回复
-
Add RBAC aggregation labels to ObjectStore editor/viewer ClusterRoles可能已有人在做 @stefanpeknik 于 25 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 82/100
cloudnative-pg/plugin-barman-cloud#1102 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 18/100
cloudnative-pg/plugin-barman-cloud#1151 ·
维护者通常 1 天内回复
查看 cloudnative-pg/plugin-barman-cloud 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 63/100
维护者通常 1 天内回复
-
product/backlog
难度 2/5 1-3 小时 新手友好度 75/100
TencentBlueKing/bk-nodemgr#3645 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
modelcontextprotocol/go-sdk#1387 ·
维护者通常 1 天内回复
-
agent-butler-finding chore
难度 2/5 1-3 小时 新手友好度 78/100
jordansmall/spindrift#5128 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 84/100
维护者通常 2 天内回复