Skip to content

Narrow and explicit RBAC #1639

@maanur

Description

@maanur

/kind feature

I am trying to deploy Katib in an enterprise environment and have some hard time explaining Katib's requested RBAC
rules. It would be much appreciated if ClusterRole explicitly declared only necessary verbs for each individual resource.

Look at this:

rules:
  - apiGroups:
      - ""
    resources:
      - configmaps
      - serviceaccounts
      - services
      - events
      - namespaces
      - persistentvolumes
      - persistentvolumeclaims
      - pods
      - pods/log
      - pods/status
    verbs:
      - "*"

Full access for Namespaces, Roles and RoleBindings effectively gives Katib unconstrained privileges to do anything it wants. This is plainly unacceptable in my case.

I suggest that ClusterRoles would be narrow and explicit like that:

rules:
  - apiGroups:
      - ""
    resources:
      - namespaces
    verbs:
      - get
      - list
      - watch
 - apiGroups:
      - ""
    resources:
      - roles
    verbs:
      - get
      - list
    ... e.t.c

E.g. let's get rid of those stars in rules.verbs and olso remove unnecessary verbs from there

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions