-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fine tune rbac #1109
fine tune rbac #1109
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: knative-serving-admin | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["pods", "namespaces", "secrets", "configmaps", "endpoints", "services", "events", "serviceaccounts"] | ||
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"] | ||
- apiGroups: ["extensions"] | ||
resources: ["ingresses","deployments"] | ||
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"] | ||
- apiGroups: ["apps"] | ||
resources: ["deployments", "statefulsets"] | ||
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"] | ||
- apiGroups: ["admissionregistration.k8s.io"] | ||
resources: ["mutatingwebhookconfigurations"] | ||
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"] | ||
- apiGroups: ["apiextensions.k8s.io"] | ||
resources: ["customresourcedefinitions"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does the controller need create/update on custom resource definitions? |
||
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"] | ||
- apiGroups: ["serving.knative.dev"] | ||
resources: ["configurations", "configurationgenerations", "routes", "revisions", "revisionuids", "autoscalers", "services"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be "*"? |
||
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"] | ||
- apiGroups: ["build.dev"] | ||
resources: ["builds"] | ||
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"] | ||
- apiGroups: ["config.istio.io"] | ||
resources: ["routerules"] | ||
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"] | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: knative-serving-write | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["pods", "namespaces", "secrets", "configmaps", "endpoints", "services", "events", "serviceaccounts"] | ||
verbs: ["get", "list", "update", "patch", "watch"] | ||
- apiGroups: ["extensions"] | ||
resources: ["ingresses","deployments"] | ||
verbs: ["get", "list", "update", "patch", "watch"] | ||
- apiGroups: ["apps"] | ||
resources: ["deployments", "statefulsets"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (and above) |
||
verbs: ["get", "list", "update", "patch", "watch"] | ||
- apiGroups: ["admissionregistration.k8s.io"] | ||
resources: ["mutatingwebhookconfigurations"] | ||
verbs: ["get", "list", "update", "patch", "watch"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why update and patch for the autoscaler? |
||
- apiGroups: ["apiextensions.k8s.io"] | ||
resources: ["customresourcedefinitions"] | ||
verbs: ["get", "list", "update", "patch", "watch"] | ||
- apiGroups: ["serving.knative.dev"] | ||
resources: ["configurations", "configurationgenerations", "routes", "revisions", "revisionuids", "autoscalers", "services"] | ||
verbs: ["get", "list", "update", "patch", "watch"] | ||
- apiGroups: ["build.dev"] | ||
resources: ["builds"] | ||
verbs: ["get", "list", "update", "patch", "watch"] | ||
- apiGroups: ["config.istio.io"] | ||
resources: ["routerules"] | ||
verbs: ["get", "list", "update", "patch", "watch"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to create service accounts?
This seems fine for a first pass, but it definitely shows how little we've been thinking about least privilege.