How Webhook Authorization Works
Learn how webhook authorization works in Kubernetes.
We'll cover the following...
Webhook authorization
The task during the authorization stage is to determine user privileges, in other words, if the user is allowed to perform the requested action. For example, the user Bob is trying to create a Pod. During the authorization stage, Kubernetes needs to verify if Bob is allowed to POST a Pod to the kube-apiserver.
Kubernetes bundles a group of authorization plugins as a union authorization chain, just as the code snippet below shows:
Each plugin implements a specific authorization method, such as Node, RBAC, ABAC, etc. Any authenticated requests will be presented to each authorization plugin one by one, until one of them can successfully determine user privileges on the requested resource. Here, the UserInfo obtained from the previous authentication stage is used for decision making.
Then, the authorization stage finishes and the request proceeds to ...