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

Security: Reduce rbac from webhooks #768

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 8 additions & 33 deletions bindata/manifests/operator-webhook/002-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,23 @@ kind: ClusterRole
metadata:
name: operator-webhook
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups:
- certificates.k8s.io
resources:
- certificatesigningrequests
- certificatesigningrequests/approval
verbs:
- '*'
- apiGroups:
- ""
resources:
- secrets
verbs:
- '*'
- apiGroups:
- ""
resources:
- nodes
- configmaps
verbs:
- get
- update
- list
- watch
- apiGroups:
- admissionregistration.k8s.io
- "sriovnetwork.openshift.io"
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
- "*"
verbs:
- '*'
- apiGroups:
- ""
resources:
- services
verbs:
- '*'
- apiGroups:
- "sriovnetwork.openshift.io"
resources:
- "*"
verbs:
- "*"
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
45 changes: 10 additions & 35 deletions bindata/manifests/webhook/002-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,21 @@ metadata:
name: network-resources-injector
rules:
- apiGroups:
- ""
- k8s.cni.cncf.io
- extensions
- apps
- k8s.cni.cncf.io
resources:
- pods
- network-attachment-definitions
- replicationcontrollers
- replicasets
- daemonsets
- statefulsets
- configmaps
- network-attachment-definitions
verbs:
- '*'
- 'watch'
- 'list'
- 'get'
- apiGroups:
- certificates.k8s.io
- ""
resources:
- certificatesigningrequests
- certificatesigningrequests/approval
- configmap
verbs:
- '*'
- apiGroups:
- ""
resources:
- secrets
verbs:
- '*'
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- '*'
- apiGroups:
- ""
resources:
- services
verbs:
- '*'
- 'watch'
- 'list'
- 'get'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
Loading