homeworld icon indicating copy to clipboard operation
homeworld copied to clipboard

Audit Rook/Ceph access roles

Open celskeggs opened this issue 5 years ago • 0 comments

As I'm working on #29, it's becoming apparent that there are some mildly questionable security choices in Rook's configuration, like the following:

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: rook-ceph-object-bucket
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: rook-ceph-object-bucket
subjects:
  - kind: ServiceAccount
    name: rook-ceph-system
    namespace: rook-ceph
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: rook-ceph-object-bucket
  labels:
    operator: rook
    storage-backend: ceph
    rbac.ceph.rook.io/aggregate-to-rook-ceph-mgr-cluster: "true"
rules:
- apiGroups:
  - ""
  verbs:
  - "*"
  resources:
  - secrets
  - configmaps
- apiGroups:
    - storage.k8s.io
  resources:
    - storageclasses
  verbs:
    - get
    - list
    - watch
- apiGroups:
  - "objectbucket.io"
  verbs:
  - "*"
  resources:
  - "*"

The idea that anything should be granted * on secrets in all namespaces? Concerning. At the very least, we need to really understand why this is needed. We need to go back through, once Rook and Ceph are implemented, so that we can make sure that all of the permissions we're granting are reasonable.

Might also want to do this for things that aren't Rook/Ceph.

celskeggs avatar May 16 '20 02:05 celskeggs