grafana/pkg/apimachinery/utils/verbs.go
Karl Persson 0160f4f72c
RBAC: Add legacy authorization checks to service accounts (#93753)
* Extract a helper funtion to perform list with authorization checks

* Add k8s verb to utils package

* Construct default mapping when no custom mapping is passed

* Configure authorization checks for service accounts

* Fix helper and add filtering to service accounts
2024-09-27 15:53:11 +02:00

23 lines
796 B
Go

package utils
// Kubernetes request verbs
// http://kubernetes.io/docs/reference/access-authn-authz/authorization/#request-verb-resource
const (
// VerbGet is mapped from HTTP GET for individual resource
VerbGet = "get"
// VerbList is mapped from HTTP GET for collections
VerbList = "list"
// VerbWatch is mapped from HTTP GET for watching an individual resource or collection of resources
VerbWatch = "watch"
// VerbCreate is mapped from HTTP POST
VerbCreate = "create"
// VerbUpdate is mapped from HTTP PUT
VerbUpdate = "update"
// VerbPatch is mapped from HTTP PATCH
VerbPatch = "patch"
// VerbDelete is mapped from HTTP DELETE for individual resources
VerbDelete = "delete"
// VerbDelete is mapped from HTTP DELETE for collections
VerbDeleteCollection = "deletecollection"
)