Skip to content

Commit c1d5d39

Browse files
committed
Address review comments
Signed-off-by: Nabarun Pal <[email protected]>
1 parent 049643c commit c1d5d39

File tree

1 file changed

+9
-6
lines changed
  • keps/sig-auth/3221-structured-authorization-configuration

1 file changed

+9
-6
lines changed

keps/sig-auth/3221-structured-authorization-configuration/README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,10 @@ authorizers:
392392
# - If failurePolicy=NoOpinion, then the error is ignored and the webhook is skipped
393393
matchConditions:
394394
# expression represents the expression which will be evaluated by CEL. Must evaluate to bool.
395-
# CEL expressions have access to the contents of the SubjectAccessReview
396-
# in the version specified by subjectAccessReviewVersion in the request variable.
395+
# CEL expressions have access to the contents of the SubjectAccessReview in v1 version.
396+
# If version specified by subjectAccessReviewVersion in the request variable is v1beta1,
397+
# the contents would be converted to the v1 version before evaluating the CEL expression.
398+
#
397399
# Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
398400
#
399401
# only send resource requests to the webhook
@@ -433,12 +435,13 @@ the version supported by a webhook has to be mentioned using a required field
433435

434436
The user can define a CEL expression to determine whether a request needs to dispatched
435437
to the authz webhook for which the expression has been defined. The user would have access
436-
to a `request` variable containing a `SubjectAccessReview` object in the version specified
437-
by `subjectAccessReviewVersion`.
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.
438441

439442
When no matchConditions are satisfied for a request, the webhook would be skipped. In such
440-
situations, the decision is logged in the audit log with the `authorization.k8s.io/webhook-skipped` annotation.
441-
Benefit of this is that resource and user info will also be logged.
443+
situations, the decision is logged in the audit log with the `authorization.k8s.io/webhook-skipped`
444+
annotation. Benefit of this is that resource and user info will also be logged.
442445

443446
The code path for enabling the above will only be triggered if the feature flag is enabled
444447
while the feature is in alpha and beta.

0 commit comments

Comments
 (0)