@@ -265,8 +265,9 @@ Kubernetes 需要 REST API 请求所共有的属性,
265265 要了解有关 Node 鉴权模式的更多信息,请参阅 [ Node 鉴权] ( /zh-cn/docs/reference/access-authn-authz/node/ ) 。
266266
267267` Webhook `
268- : Kubernetes 的 [ Webhook 鉴权模式] ( /docs/reference/access-authn-authz/webhook/ ) 用于鉴权,进行同步 HTTP 调用,
269- 阻塞请求直到远程 HTTP 服务响应查询。你可以编写自己的软件来处理这种向外调用,也可以使用生态系统中的解决方案。
268+ : Kubernetes 的 [ Webhook 鉴权模式] ( /docs/reference/access-authn-authz/webhook/ ) 用于鉴权,
269+ 进行同步 HTTP 调用,阻塞请求直到远程 HTTP 服务响应查询。
270+ 你可以编写自己的软件来处理这种向外调用,也可以使用生态系统中的解决方案。
270271
271272<a id =" warning-always-allow " />
272273
@@ -363,8 +364,8 @@ Kubernetes 允许你配置可包含多个 Webhook 的鉴权链。
363364该链中的鉴权项可以具有明确定义的参数,这些参数可以按特定顺序检查请求,
364365从而为你提供细粒度的控制,例如在失败时明确拒绝。
365366
366- 配置文件方法甚至允许你指定 [ CEL] ( /zh-cn/docs/reference/using-api/cel/ ) 规则,
367- 在将请求发送到 Webhook 之前对其进行预过滤,从而帮助你防止不必要的调用。
367+ 配置文件方法甚至允许你指定 [ CEL] ( /zh-cn/docs/reference/using-api/cel/ )
368+ 规则, 在将请求发送到 Webhook 之前对其进行预过滤,从而帮助你防止不必要的调用。
368369修改配置文件时,API 服务器还会自动重新加载鉴权链。
369370
370371<!--
@@ -406,11 +407,23 @@ authorizers:
406407 # Same as setting `--authorization-webhook-cache-authorized-ttl` flag
407408 # Default: 5m0s
408409 authorizedTTL: 30s
410+ # If set to false, 'authorized' responses from the webhook are not cached
411+ # and the specified authorizedTTL is ignored/has no effect.
412+ # Same as setting `--authorization-webhook-cache-authorized-ttl` flag to `0`.
413+ # Note: Setting authorizedTTL to `0` results in its default value being used.
414+ # Default: true
415+ cacheAuthorizedRequests: true
409416 # The duration to cache 'unauthorized' responses from the webhook
410417 # authorizer.
411418 # Same as setting `--authorization-webhook-cache-unauthorized-ttl` flag
412419 # Default: 30s
413420 unauthorizedTTL: 30s
421+ # If set to false, 'unauthorized' responses from the webhook are not cached
422+ # and the specified unauthorizedTTL is ignored/has no effect.
423+ # Same as setting `--authorization-webhook-cache-unauthorized-ttl` flag to `0`.
424+ # Note: Setting unauthorizedTTL to `0` results in its default value being used.
425+ # Default: true
426+ cacheUnauthorizedRequests: true
414427 # Timeout for the webhook request
415428 # Maximum allowed is 30s.
416429 # Required, with no default.
@@ -506,10 +519,22 @@ authorizers:
506519 # 与设置 ` --authorization-webhook-cache-authorized-ttl ` 标志相同
507520 # 默认值:5m0s
508521 authorizedTTL: 30s
522+ # 如果设置为 false,来自 Webhook 的 'authorized' 响应不会被缓存,
523+ # 并且指定的 authorizedTTL 将被忽略/不起作用。
524+ # 等同于将 ` --authorization-webhook-cache-authorized-ttl ` 标志设置为 ` 0 ` 。
525+ # 注意:将 authorizedTTL 设置为 ` 0 ` 会导致使用其默认值。
526+ # 默认值:true
527+ cacheAuthorizedRequests: true
509528 # 缓存来自 Webhook 鉴权组件的“未授权”响应的持续时间。
510529 # 与设置 ` --authorization-webhook-cache-unauthorized-ttl ` 标志相同
511530 # 默认值:30s
512531 unauthorizedTTL: 30s
532+ # 如果设置为 false,来自 webhook 的 'unauthorized' 响应不会被缓存,
533+ # 并且指定的 unauthorizedTTL 将被忽略/不起作用。
534+ # 等同于将 ` --authorization-webhook-cache-unauthorized-ttl ` 标志设置为 ` 0 ` 。
535+ # 注意:将 unauthorizedTTL 设置为 ` 0 ` 会导致使用其默认值。
536+ # 默认值:true
537+ cacheUnauthorizedRequests: true
513538 # Webhook 请求超时
514539 # 允许的最大时间为 30 秒。
515540 # 必填,没有默认值。
@@ -554,7 +579,7 @@ authorizers:
554579 # 如果请求变量中 subjectAccessReviewVersion 指定的版本是 v1beta1,
555580 # 在评估 CEL 表达式之前,内容将转换为 v1 版本。
556581 #
557- # CEL 文档:https://kubernetes.io/docs/reference/using-api/cel/
582+ # CEL 文档:https://kubernetes.io/zh-cn/ docs/reference/using-api/cel/
558583 #
559584 # 仅向 Webhook 发送资源请求
560585 - expression: has(request.resourceAttributes)
@@ -734,8 +759,8 @@ As a system administrator, you should be cautious when deploying CustomResourceD
734759that let users make changes to the above areas. These may open privilege escalations paths.
735760Consider the consequences of this kind of change when deciding on your authorization controls.
736761-->
737- 作为系统管理员,在部署允许用户更改上述区域的 CustomResourceDefinitions 时应谨慎行事,这些可能会打开特权升级路径。
738- 在配置你的鉴权控制时,请考虑这种变化的后果。
762+ 作为系统管理员,在部署允许用户更改上述区域的 CustomResourceDefinitions 时应谨慎行事,
763+ 这些可能会打开特权升级路径。 在配置你的鉴权控制时,请考虑这种变化的后果。
739764{{< /caution >}}
740765
741766<!--
801826Similarly, to check whether a ServiceAccount named `dev-sa` in Namespace `dev`
802827can list Pods in the Namespace `target`:
803828-->
804- 类似地,检查名字空间 ` dev ` 里的 ` dev-sa ` 服务账户是否可以列举名字空间 ` target ` 里的 Pod:
829+ 类似地,检查名字空间 ` dev ` 里的 ` dev-sa ` 服务账户是否可以列举名字空间
830+ ` target ` 里的 Pod:
805831
806832``` bash
807833kubectl auth can-i list pods \
@@ -900,4 +926,3 @@ status:
900926* 有关概述,请阅读[ 控制对 Kubernetes API 的访问] ( /zh-cn/docs/concepts/security/controlling-access/ ) 。
901927* 要了解有关准入控制的更多信息,请参阅[ 使用准入控制器] ( /zh-cn/docs/reference/access-authn-authz/admission-controllers/ ) 。
902928* 阅读更多关于 [ Kubernetes 中的通用表达语言] ( /zh-cn/docs/reference/using-api/cel/ ) 。
903-
0 commit comments