27
27
- [ Future Alpha versions] ( #future-alpha-versions )
28
28
- [ Beta] ( #beta )
29
29
- [ GA] ( #ga )
30
- - [ GA + 3 cycles] ( #ga--3-cycles )
31
30
- [ Upgrade / Downgrade Strategy] ( #upgrade--downgrade-strategy )
32
31
- [ Version Skew Strategy] ( #version-skew-strategy )
33
32
- [ Production Readiness Review Questionnaire] ( #production-readiness-review-questionnaire )
@@ -120,6 +119,7 @@ authorizers:
120
119
unauthorizedTTL : 30s
121
120
timeout : 3s
122
121
subjectAccessReviewVersion : v1
122
+ matchConditionSubjectAccessReviewVersion : v1
123
123
failurePolicy : Deny
124
124
connectionInfo :
125
125
type : KubeConfig
@@ -180,6 +180,7 @@ authorizers:
180
180
unauthorizedTTL: 30s
181
181
timeout: 3s
182
182
subjectAccessReviewVersion: v1
183
+ matchConditionSubjectAccessReviewVersion: v1
183
184
failurePolicy: Deny
184
185
connectionInfo:
185
186
type: KubeConfig
@@ -214,12 +215,13 @@ The below example is only for demonstration purposes.
214
215
apiVersion: apiserver.config.k8s.io/v1alpha1
215
216
kind: AuthorizationConfiguration
216
217
authorizers:
217
- - name: system-webhook
218
+ - name: system-crd-protector
218
219
type: Webhook
219
220
webhook:
220
221
unauthorizedTTL: 30s
221
222
timeout: 3s
222
223
subjectAccessReviewVersion: v1
224
+ matchConditionSubjectAccessReviewVersion: v1
223
225
failurePolicy: Deny
224
226
connectionInfo:
225
227
type: KubeConfig
@@ -239,6 +241,7 @@ authorizers:
239
241
unauthorizedTTL: 30s
240
242
timeout: 3s
241
243
subjectAccessReviewVersion: v1
244
+ matchConditionSubjectAccessReviewVersion: v1
242
245
failurePolicy: Deny
243
246
connectionInfo:
244
247
type: KubeConfig
@@ -332,13 +335,13 @@ apiVersion: apiserver.config.k8s.io/v1alpha1
332
335
kind: AuthorizationConfiguration
333
336
authorizers:
334
337
- type: Webhook
338
+ # Name used to describe the authorizer
339
+ # This is explicitly used in monitoring machinery for metrics
340
+ # Note:
341
+ # - Validation for this field is similar to how K8s labels are validated today.
342
+ # Required, with no default
343
+ name: webhook
335
344
webhook:
336
- # Name used to describe the webhook
337
- # This is explicitly used in monitoring machinery for metrics
338
- # Note:
339
- # - Validation for this field is similar to how K8s labels are validated today.
340
- # Required, with no default
341
- name: super-important-kube-system-authorizer
342
345
# The duration to cache 'authorized' responses from the webhook
343
346
# authorizer.
344
347
# Same as setting ` --authorization-webhook-cache-authorized-ttl` flag
@@ -359,6 +362,11 @@ authorizers:
359
362
# Required, with no default
360
363
# Valid values: v1beta1, v1
361
364
subjectAccessReviewVersion : v1
365
+ # MatchConditionSubjectAccessReviewVersion specifies the SubjectAccessReview
366
+ # version the CEL expressions are evaluated against
367
+ # Valid values: v1
368
+ # Required, no default value
369
+ matchConditionSubjectAccessReviewVersion : v1
362
370
# Controls the authorization decision when a webhook request fails to
363
371
# complete or returns a malformed response or errors evaluating
364
372
# matchConditions.
@@ -405,10 +413,12 @@ authorizers:
405
413
# don't intercept requests from kube-system service accounts
406
414
- expression : !('system:serviceaccounts:kube-system' in request.user.groups)
407
415
- type : Node
416
+ name : node
408
417
- type : RBAC
418
+ name : rbac
409
419
- type : Webhook
420
+ name : in-cluster-authorizer
410
421
webhook :
411
- name : in-cluster-authorizer
412
422
authorizedTTL : 5m
413
423
unauthorizedTTL : 30s
414
424
timeout : 3s
@@ -435,9 +445,11 @@ the version supported by a webhook has to be mentioned using a required field
435
445
436
446
The user can define a CEL expression to determine whether a request needs to dispatched
437
447
to the authz webhook for which the expression has been defined. The user would have access
438
- to a `request` variable containing a `SubjectAccessReview` object in the `v1` version. If
439
- the version specified by `subjectAccessReviewVersion` in the request variable is `v1beta1`,
440
- the contents would be converted to the `v1` version before evaluating the CEL expression.
448
+ to a `request` variable containing a `SubjectAccessReview` object in the version specified
449
+ by the `matchConditionSubjectAccessReviewVersion` field. If the version specified by
450
+ ` subjectAccessReviewVersion` in the request variable is `v1beta1`, the contents would be
451
+ converted to the version specified in `matchConditionSubjectAccessReviewVersion` before
452
+ evaluating the CEL expression.
441
453
442
454
When no matchConditions are satisfied for a request, the webhook would be skipped. In such
443
455
situations, the decision is logged in the audit log with the `authorization.k8s.io/webhook-skipped`
@@ -561,12 +573,6 @@ the scenarios.
561
573
# ### GA
562
574
563
575
- Feature flag removed
564
- - Existing command line flags will be marked as deprecated and config file will take
565
- precedence over the old flags
566
-
567
- # ### GA + 3 cycles
568
-
569
- - Remove the existing command line flags
570
576
571
577
# ## Upgrade / Downgrade Strategy
572
578
@@ -589,7 +595,7 @@ Not applicable.
589
595
# ##### How can this feature be enabled / disabled in a live cluster?
590
596
591
597
- [x] Feature gate
592
- - Feature gate name : ` StructuredAuthorizationConfig `
598
+ - Feature gate name : ` StructuredAuthorizationConfiguration `
593
599
- Components depending on the feature gate :
594
600
- kube-apiserver
595
601
@@ -612,11 +618,10 @@ We will have extensive unit tests during feature implementation. There would be
612
618
for the Authorizer chain in both the old and new configuration scenarios.
613
619
614
620
We will add integration tests to validate the enablement/disablement flow.
615
- - When the feature is disabled, only the existing command line flag `--authorization-webhook-*`
616
- based mode is allowed.
617
- - When the feature is enable, setting both `--authorization-config` and
618
- configuring an authorization webhook using the `--authorization-webhook-*`
621
+ - When `--authorization-config` flags is defined, the feature flag must be turned on (when feature is in Alpha).
622
+ - Setting `--authorization-config` along `--authorization-modes` and `--authorization-webhook-*`
619
623
command line flags should return an error.
624
+ - Configuring the authorizer using legacy flags will continue to be allowed
620
625
621
626
# ## Rollout, Upgrade and Rollback Planning
622
627
643
648
644
649
# ##### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.?
645
650
646
- Existing command line flags will be marked as deprecated and config file will take
647
- precedence over the old flags once this feature graduates to GA. Then for GA + 3 releases,
648
- the existing command line flags will be removed.
651
+ No.
649
652
650
653
# ## Monitoring Requirements
651
654
@@ -814,9 +817,10 @@ For each of them, fill in the following information by copying the below templat
814
817
815
818
- [x] 2022-06-10 - Provisional KEP introduced
816
819
- [x] 2023-05-08 - Provisional KEP re-introduced
817
- - [ ] KEP Accepted as implementable
818
- - [ ] Implementation started
819
- - [ ] First release (1.YY) when feature available
820
+ - [x] 2023-06-15 - KEP Accepted as implementable
821
+ - [x] 2023-07-05 - Implementation started
822
+ - [x] 2023-09-27 - Update KEP according to actual state
823
+ - [ ] 2023-12-DD First release (1.29) when feature available
820
824
821
825
# # Drawbacks
822
826
0 commit comments