Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New policy: Disallow verbs in (Cluster)Roles #605

Open
viccuad opened this issue Jan 2, 2024 · 0 comments
Open

New policy: Disallow verbs in (Cluster)Roles #605

viccuad opened this issue Jan 2, 2024 · 0 comments

Comments

@viccuad
Copy link
Member

viccuad commented Jan 2, 2024

Description

This policy disallows the usage of the bind, impersonate, escalate verbs in Roles and ClusterRoles.

These verbs can be used to escalate privileges (escalate), bypass RBAC by creating bindings to roles with rights one doesn't have (bind), or gain the rights of other users (impersonate).

Implements good practices from https://kubernetes.io/docs/concepts/security/rbac-good-practices/.

Configuration

None

Examples

This Role would get rejected:

apiVersion: rbac.authorization.k8s.io.v1beta1
kind: Role
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["impersonate", "get", "watch", "list"]

While this ClusterRole would get accepted:

apiVersion: rbac.authorization.k8s.io.v1beta1
kind: Role
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get", "watch", "list"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants