mirror of https://github.com/istio/istio.io.git
parent
9a73f26905
commit
90e0c3b6fc
|
|
@ -1,17 +1,18 @@
|
|||
---
|
||||
title: 使用 Layer 4 安全策略
|
||||
description: 仅使用安全 L4 覆盖时受支持的安全功能。
|
||||
description: 仅使用 L4 安全覆盖时支持的安全功能。
|
||||
weight: 20
|
||||
owner: istio/wg-networking-maintainers
|
||||
test: no
|
||||
---
|
||||
|
||||
Istio Ambient 模式中的 {{< gloss >}}ztunnel{{< /gloss >}} 和
|
||||
{{< gloss >}}waypoint{{< /gloss >}} 代理的分层让您可以选择是否使用希望为给定的工作负载启用 Layer 7(L7)处理。
|
||||
在 Istio Ambient 模式中,{{< gloss >}}ztunnel{{< /gloss >}} 和
|
||||
{{< gloss >}}waypoint{{< /gloss >}} 代理采用分层机制,
|
||||
让您可以选择是否希望为给定的工作负载启用 Layer 7(L7)进行处理。
|
||||
|
||||
ztunnel 支持 Istio [安全策略](/zh/docs/concepts/security)的 Layer 4(L4)功能,
|
||||
并且在 Ambient 模式下可用。如果您的集群具有 {{< gloss "cni" >}}CNI{{< /gloss >}} 插件,
|
||||
[Kubernetes 网络策略](https://kubernetes.io/zh-cn/docs/concepts/services-networking/network-policies/)也可以继续与其协作,
|
||||
Istio [安全策略](/zh/docs/concepts/security)的 Layer 4(L4)功能得到了 ztunnel 的支持,
|
||||
并且可用于 Ambient 模式。如果您的集群具有支持这些功能的 {{< gloss "cni" >}}CNI{{< /gloss >}} 插件,
|
||||
那 [Kubernetes 网络策略](https://kubernetes.io/zh-cn/docs/concepts/services-networking/network-policies/)也可以继续发挥作用,
|
||||
可用于提供深度防护。
|
||||
|
||||
要使用 L7 策略和 Istio 的流量路由功能,
|
||||
|
|
@ -21,7 +22,7 @@ ztunnel 支持 Istio [安全策略](/zh/docs/concepts/security)的 Layer 4(L4
|
|||
|
||||
当工作负载在安全覆盖模式下注册时,ztunnel 代理会实施鉴权策略。
|
||||
|
||||
实际的执行点位于连接路径中的接收(服务端)ztunnel 代理。
|
||||
实际的执行点位于连接路径中的接收(服务端)ztunnel 代理的位置。
|
||||
|
||||
基本的 L4 鉴权策略如下所示:
|
||||
|
||||
|
|
@ -46,7 +47,8 @@ EOF
|
|||
L4 `AuthorizationPolicy` API 在 Istio Ambient
|
||||
模式下与 Sidecar 模式下具有相同的功能行为。当没有配置 `AuthorizationPolicy` 时,
|
||||
默认操作是 `ALLOW`。在配置策略后,与策略中的选择器匹配的 Pod 仅允许明确允许的流量。
|
||||
在此示例中,带有 `app: httpbin` 标签的 Pod 仅允许来自身份主体为 `cluster.local/ns/ambient-demo/sa/sleep` 源的流量。
|
||||
在此示例中,带有 `app: httpbin` 标签的 Pod 仅允许来自身份主体为
|
||||
`cluster.local/ns/ambient-demo/sa/sleep` 源的流量。
|
||||
来自所有其他来源的流量将被拒绝。
|
||||
|
||||
### 未安装 waypoint 的 Layer 7 鉴权策略 {#layer-7-authorization-policies-without=waypoints-installed}
|
||||
|
|
@ -97,6 +99,6 @@ ztunnel 支持配置双向 TLS(mTLS)模式的 Istio
|
|||
|
||||
如果您需要禁用整个命名空间的 mTLS,则必须禁用 Ambient 模式:
|
||||
|
||||
{{ text bash }}
|
||||
{{< text bash >}}
|
||||
$ kubectl label namespace default istio.io/dataplane-mode-
|
||||
{{ /text }}
|
||||
{{< /text >}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue