Skip to content

Commit b8514fc

Browse files
authored
Merge pull request #45138 from ritazh/kep_3221_beta_docs
Add docs for Structured Authz beta
2 parents b6fa5be + a556984 commit b8514fc

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

content/en/docs/reference/access-authn-authz/authorization.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -211,33 +211,31 @@ so an earlier module has higher priority to allow or deny a request.
211211

212212
## Configuring the API Server using an Authorization Config File
213213

214-
{{< feature-state state="alpha" for_k8s_version="v1.29" >}}
214+
{{< feature-state state="beta" for_k8s_version="v1.30" >}}
215215

216216
The Kubernetes API server's authorizer chain can be configured using a
217217
configuration file.
218218

219-
You specify the path to that authorization configuration using the
220-
`--authorization-config` command line argument. This feature enables
221-
creation of authorization chains with multiple webhooks with well-defined
222-
parameters that validate requests in a certain order and enables fine grained
223-
control - such as explicit Deny on failures. An example configuration with
224-
all possible values is provided below.
219+
This feature enables the creation of authorization chains with multiple webhooks with well-defined parameters that validate requests in a particular order and allows fine-grained control – such as explicit Deny on failures. The configuration file approach even allows you to specify [CEL](/docs/reference/using-api/cel/) rules to pre-filter requests before they are dispatched to webhooks, helping you to prevent unnecessary invocations. The API server also automatically reloads the authorizer chain when the configuration file is modified. An example configuration with all possible values is provided below.
225220

226-
In order to customise the authorizer chain, you need to enable the
227-
`StructuredAuthorizationConfiguration` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
221+
You must specify the path to the authorization configuration using the `--authorization-config`command line argument. If you want to keep using command line flags instead of a configuration file, those will continue to work as-is. To gain access to new authorization webhook capabilities like multiple webhooks, failure policy, and pre-filter rules, switch to putting options in an `--authorization-config` file.
228222

229-
Note: When the feature is enabled, setting both `--authorization-config` and
223+
Starting Kubernetes 1.30, the configuration file format is
224+
beta-level, and only requires specifying `--authorization-config` since the `StructuredAuthorizationConfiguration` feature gate is enabled by default.
225+
226+
{{< caution >}}
227+
If you want to keep using command line flags to configure authorization instead of a configuration file, those will continue to work as-is.
228+
229+
When the feature is enabled, setting both `--authorization-config` and
230230
configuring an authorization webhook using the `--authorization-mode` and
231231
`--authorization-webhook-*` command line flags is not allowed. If done, there
232232
will be an error and API Server would exit right away.
233233

234-
{{< caution >}}
235-
While the feature is in Alpha/Beta, there is no change if you want to keep on
236-
using command line flags. When the feature goes Beta, the feature flag would
237-
be turned on by default. The feature flag would be removed when feature goes GA.
234+
Authorization Config file reloads when an observed file event occurs or a 1 minute poll is encountered. All non-webhook authorizer types are required to remain unchanged in the file on reload. Reload must not add or remove Node or RBAC
235+
authorizers. They can be reordered, but cannot be added or removed.
238236

239237
When configuring the authorizer chain using a config file, make sure all the
240-
apiserver nodes have the file. Also, take a note of the apiserver configuration
238+
apiserver nodes have the file. Take a note of the apiserver configuration
241239
when upgrading/downgrading the clusters. For example, if upgrading to v1.29+
242240
clusters and using the config file, you would need to make sure the config file
243241
exists before upgrading the cluster. When downgrading to v1.28, you would need
@@ -248,9 +246,8 @@ to add the flags back to their bootstrap mechanism.
248246
#
249247
# DO NOT USE THE CONFIG AS IS. THIS IS AN EXAMPLE.
250248
#
251-
apiVersion: apiserver.config.k8s.io/v1alpha1
249+
apiVersion: apiserver.config.k8s.io/v1beta1
252250
kind: AuthorizationConfiguration
253-
# authorizers are defined in order of precedence
254251
authorizers:
255252
- type: Webhook
256253
# Name used to describe the authorizer
@@ -283,7 +280,7 @@ authorizers:
283280
# MatchConditionSubjectAccessReviewVersion specifies the SubjectAccessReview
284281
# version the CEL expressions are evaluated against
285282
# Valid values: v1
286-
# Required only if matchConditions are specified, no default value
283+
# Required, no default value
287284
matchConditionSubjectAccessReviewVersion: v1
288285
# Controls the authorization decision when a webhook request fails to
289286
# complete or returns a malformed response or errors evaluating

0 commit comments

Comments
 (0)