zalando / zalando/postgres-operator
Request: Review and minimize postgres-pod RBAC permissions
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.2k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 3
Description
Hi,
My customer has requested a review of the postgres-pod ClusterRole to reduce its permissions to the minimum required.
My tests (which probably are not as complete as you may conduct) suggests the following minimal ruleset is sufficient:
rules:
- verbs:
- create
- list
- patch
- watch
apiGroups:
- ""
resources:
- endpoints
- verbs:
- create
apiGroups:
- ""
resources:
- services
- verbs:
- list
- patch
- watch
apiGroups:
- ""
resources:
- pods
Compared to the current postgres-pod ClusterRole, this would remove the following verbs:
- endpoints: delete, deletecollection, get, update
- pods: get, update
- services: no change
Would you be willing to conduct an official review of the postgres-pod RBAC permissions with the goal of applying the principle of least privilege?
Thanks' for the work you've put on this operator
Regrads
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with manifests/operator-service-account-rbac.yaml and inspect the current postgres-pod ClusterRole against the proposed rules in the issue. Review the operator behavior and available tests to verify which permissions are required. Done means an official least-privilege review and an updated ruleset that preserves the operator's required behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, postgresql
- Domain
- infrastructure, security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100