planetscale / planetscale/vitess-operator

Bug: Unnecessary permissions in manifests

Open
#557 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
372
Forks
102
Avg merge
3d 5h
Merged PRs (30d)
15

Description

Description

The bug is that the Deployment vitess-operator in the manifests has too much RBAC permissions than it needs. The service account of vitess-operator is bound to a role(role.yaml) with the following permissions:

  • create/patch/update/delete verb of the daemonsets/deployments/pods/replicasets/statefulsets resource (Role)
  • patch/update/delete verb of the services resource (Role)

After reading the source code of vitess-operator, I didn't find any Kubernetes API usages using these permissions. Besides, some of these unused permissions may have potential risks. For example, if malicious users gain control of a Kubernetes node running a vitess-operator pod, they can use the create deployments permission to create privileged containers with malicious container images.

Therefore, these permissions should be rechecked to determine if they are truly unnecessary. If they are, the issue should be fixed by removing the unnecessary permissions or other feasible methods.

To Reproduce

Use the manifests with default values.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with deploy/role.yaml and compare its listed RBAC permissions against Kubernetes API usages in the vitess-operator source. Inspect deploy/operator.yaml using the default manifests, then verify each daemonset, deployment, pod, replicaset, statefulset, and service permission is necessary. Done means unnecessary permissions are removed or otherwise addressed in the manifests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.