k8up-io / k8up

Kubernetes and OpenShift Backup Operator
https://k8up.io/
Apache License 2.0
636 stars 63 forks source link

Improve RBAC for the operator #852

Closed Kidswiss closed 1 year ago

Kidswiss commented 1 year ago

Summary

Previously the operator had the pod/exe permissions with the verb create. Which is necessary for K8up to create and bind the namespaced roles where the actual backups happen.

To harden the RBAC a bit we're now deploying a clusterRole which contains the necessary RBAC rules. Also K8up is now allowed to bind exactly this clusterRole.

While this doesn't mitigate all potential exploits in case the K8up operator pod is accessed by a malicious party, it makes it harder for the malicious party to abuse K8up's permissions.

Checklist

For Code changes

Kidswiss commented 1 year ago

Even though we should not change anything in the /chart folder, for this to work with the e2e I have to change the chart here as well. Let's hope the CI/CD process doesn't break too hard due to this...