bitnami/sealed-secrets

Improve secrets-unseale RBAC configuration to avoid cluster-wide read/write of secret objects

开放

#353 创建于 2020年2月12日

 (2 条评论) (2 个反应) (0 位负责人)Go (771 个派生)auto 404
enhancementhelp wanted

仓库指标

星标
 (9,222 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

If I understand it correctly, the controller does not make any assumption that it can read secrets cluster-wide. The current installed cluster role 'secrets-unsealer' is written such that the controller is granted with such capability, which it does not appear to be needing.

I suggest the ClusterRole be refactored so it has a cluster-scoped portion and a namespace-scoped portion. The cluster-scoped portion would allow cluster-wide access to sealedsecrets, while the namespace portion would allow namespaced access to secrets and events. By default both ClusterRole can be ClusterRoleBind to the same service account so nothing should have changed; but a cluster admin would remove the second ClusterRoleBinding and make it RoleBinding in the namespace where sealed secrets is being used.

Happy to come up with a PR if this is the right thing to do.

贡献者指南