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
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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"
|
||||
)
|
||||
Reference in New Issue
Block a user