mirror of https://github.com/istio/istio.io.git
402 lines
87 KiB
HTML
402 lines
87 KiB
HTML
<!doctype html><html lang=zh itemscope itemtype=https://schema.org/WebPage><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=theme-color content=#466BB0><meta name=title content=基础认证策略><meta name=description content="介绍如何使用 Istio 认证策略设置双向 TLS 和基本的终端用户认证。"><meta name=keywords content=microservices,services,mesh,security,authentication><meta property=og:title content=基础认证策略><meta property=og:type content=website><meta property=og:description content="介绍如何使用 Istio 认证策略设置双向 TLS 和基本的终端用户认证。"><meta property=og:url content=/v1.1/zh/docs/tasks/security/authn-policy/><meta property=og:image content=/v1.1/img/istio-whitelogo-bluebackground-framed.svg><meta property=og:image:alt content="Istio Logo"><meta property=og:image:width content=112><meta property=og:image:height content=150><meta property=og:site_name content=Istio><meta name=twitter:card content=summary><meta name=twitter:site content=@IstioMesh><title>Istioldie 1.1 / 基础认证策略</title><script async src="https://www.googletagmanager.com/gtag/js?id=UA-98480406-2"></script><script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}
|
||
gtag('js',new Date());gtag('config','UA-98480406-2');</script><link rel=alternate type=application/rss+xml title="Istio Blog" href=/v1.1/feed.xml><link rel="shortcut icon" href=/v1.1/favicons/favicon.ico><link rel=apple-touch-icon href=/v1.1/favicons/apple-touch-icon-180x180.png sizes=180x180><link rel=icon type=image/png href=/v1.1/favicons/favicon-16x16.png sizes=16x16><link rel=icon type=image/png href=/v1.1/favicons/favicon-32x32.png sizes=32x32><link rel=icon type=image/png href=/v1.1/favicons/android-36x36.png sizes=36x36><link rel=icon type=image/png href=/v1.1/favicons/android-48x48.png sizes=48x48><link rel=icon type=image/png href=/v1.1/favicons/android-72x72.png sizes=72x72><link rel=icon type=image/png href=/v1.1/favicons/android-96x96.png sizes=96xW96><link rel=icon type=image/png href=/v1.1/favicons/android-144x144.png sizes=144x144><link rel=icon type=image/png href=/v1.1/favicons/android-192x192.png sizes=192x192><link rel=manifest href=/v1.1/manifest.json><meta name=apple-mobile-web-app-title content=Istio><meta name=application-name content=Istio><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Work+Sans:400|Chivo:400|Work+Sans:500,300,600,300italic,400italic,500italic,600italic|Chivo:500,300,600,300italic,400italic,500italic,600italic"><link rel=stylesheet href=/v1.1/css/all.css></head><body class="language-unknown archive-site"><script src=/v1.1/js/themes_init.min.js></script><script>const branchName="release-1.1";const docTitle="基础认证策略";const iconFile="\/v1.1/img/icons.svg";const buttonCopy='复制到剪切板';const buttonPrint='打印';const buttonDownload='下载';</script><script src="https://www.google.com/cse/brand?form=search-form" defer></script><script src=/v1.1/js/all.min.js data-manual defer></script><header><nav><a id=brand href=/v1.1/zh/><span class=logo><svg viewBox="0 0 300 300"><circle cx="150" cy="150" r="146" stroke-width="2" /><path d="M65 240H225L125 270z"/><path d="M65 230l60-10V110z"/><path d="M135 220l90 10L135 30z"/></svg></span><span class=name>Istioldie 1.1</span></a><div id=hamburger><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#hamburger"/></svg></div><div id=header-links><span title="了解如何部署、使用和运维 Istio。">文档</span>
|
||
<a title="关于使用 Istio 的博客文章。" href=/v1.1/zh/blog/2019/root-transition/>博客</a>
|
||
<a title="一堆帮助您部署、配置和使用 Istio 的资源。" href=/v1.1/zh/help/>帮助</a>
|
||
<a title=关于Istio的说明。 href=/v1.1/zh/about/>关于</a><div class=menu><button id=gearDropdownButton class=menu-trigger title=选项和设置 aria-label="Options and Settings" aria-controls=gearDropdownContent><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#gear"/></svg></button><div id=gearDropdownContent class=menu-content aria-labelledby=gearDropdownButton role=menu><a tabindex=-1 role=menuitem lang=en id=switch-lang-en>English</a>
|
||
<a tabindex=-1 role=menuitem lang=zh id=switch-lang-zh class=active>中文</a><div role=separator></div><a tabindex=-1 role=menuitem class=active id=light-theme-item>亮主题</a>
|
||
<a tabindex=-1 role=menuitem id=dark-theme-item>暗主题</a><div role=separator></div><a tabindex=-1 role=menuitem id=syntax-coloring-item>代码高亮</a><div role=separator></div><h6>本站的其它版本</h6><a tabindex=-1 role=menuitem onclick="navigateToUrlOrRoot('https://istio.io/docs\/tasks\/security\/authn-policy\/');return false;">当前版本</a>
|
||
<a tabindex=-1 role=menuitem onclick="navigateToUrlOrRoot('https://preliminary.istio.io/docs\/tasks\/security\/authn-policy\/');return false;">下个版本</a>
|
||
<a tabindex=-1 role=menuitem href=https://archive.istio.io>旧版本</a></div></div><button id=search-show title=搜索istio.io aria-label=Search><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#magnifier"/></svg></button></div><form id=search-form name=cse role=search><input type=hidden name=cx value=013699703217164175118:iwwf17ikgf4>
|
||
<input type=hidden name=ie value=utf-8>
|
||
<input type=hidden name=hl value=en>
|
||
<input type=hidden id=search-page-url value=/v1.1/search.html>
|
||
<input id=search-textbox class=form-control name=q type=search aria-label=搜索istio.io>
|
||
<button id=search-close title="Cancel search" type=reset aria-label="Cancel search"><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#cancel-x"/></svg></button></form></nav></header><main class=primary><div id=sidebar-container class="sidebar-container sidebar-offcanvas"><nav id=sidebar aria-label="Section Navigation"><div class=directory><div class=card><button class="header dynamic" id=card28 title="一些概念,理解它们有助于您更好地了解 Istio 系统的不同部分及其使用的抽象。" aria-controls=card28-body><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#concepts"/></svg>概念</button><div class=body aria-labelledby=card28 role=region id=card28-body><ul role=tree aria-expanded=true class=leaf-section aria-labelledby=card28><li role=none><a role=treeitem title="介绍 Istio 及其要解决的问题、顶层架构和设计目标。" href=/v1.1/zh/docs/concepts/what-is-istio/>Istio 是什么?</a></li><li role=none><a role=treeitem title="介绍 Istio 中关于流量路由与控制的各项功能。" href=/v1.1/zh/docs/concepts/traffic-management/>流量管理</a></li><li role=none><a role=treeitem title="描述 Istio 的授权与鉴权功能。" href=/v1.1/zh/docs/concepts/security/>安全</a></li><li role=none><a role=treeitem title=描述策略实施和遥测机制。 href=/v1.1/zh/docs/concepts/policies-and-telemetry/>策略与遥测</a></li><li role=none><a role=treeitem title="介绍 Istio 组件的性能与可伸缩性。" href=/v1.1/zh/docs/concepts/performance-and-scalability/>性能与可伸缩性</a></li><li role=none><a role=treeitem title=描述如何配置服务网格以包含来自多个集群的服务。 href=/v1.1/zh/docs/concepts/multicluster-deployments/>多集群部署</a></li></ul></div></div><div class=card><button class="header dynamic" id=card41 title="在不同的环境下(例如 Kubernetes、Consul 等)如何部署和升级 Istio。" aria-controls=card41-body><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#setup"/></svg>安装</button><div class=body aria-labelledby=card41 role=region id=card41-body><ul role=tree aria-expanded=true aria-labelledby=card41><li role=treeitem aria-label=Kubernetes><button aria-hidden=true></button><a title="关于如何在 Kubernetes 集群中安装 Istio 控制平面和添加虚拟机到 mesh 中的说明。" href=/v1.1/zh/docs/setup/kubernetes/>Kubernetes</a><ul role=group aria-expanded=false><li role=none><a role=treeitem title="关于 Istio 发布包下载过程的说明。" href=/v1.1/zh/docs/setup/kubernetes/download/>下载 Istio 发布包</a></li><li role=treeitem aria-label=准备><button aria-hidden=true></button><a title="为 Istio 做准备。" href=/v1.1/zh/docs/setup/kubernetes/prepare/>准备</a><ul role=group aria-expanded=false><li role=treeitem aria-label=平台搭建><button aria-hidden=true></button><a title="在安装 Istio 前,如何准备各种 Kubernetes 平台。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/>平台搭建</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="为 Istio 设置阿里云 Kubernetes 集群的说明。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/alicloud/>阿里云</a></li><li role=none><a role=treeitem title="对 Azure 集群进行配置以便安装运行 Istio。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/azure/>Azure</a></li><li role=none><a role=treeitem title="使用桌面版 Docker 安装 Istio 的说明。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/docker/>桌面版 Docker</a></li><li role=none><a role=treeitem title="对 Google Kubernetes Engine(GKE)集群进行配置以便安装运行 Istio。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/gke/>Google Kubernetes Engine</a></li><li role=none><a role=treeitem title="为 IBM Cloud 集群设置 Istio 的说明。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/ibm/>IBM Cloud</a></li><li role=none><a role=treeitem title="对 Minikube 集群进行配置以便安装运行 Istio。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/minikube/>Minikube</a></li><li role=none><a role=treeitem title="对 OpenShift 集群进行配置以便安装运行 Istio。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/openshift/>OpenShift</a></li><li role=none><a role=treeitem title="为 Istio 对 OKE 集群环境进行配置。" href=/v1.1/zh/docs/setup/kubernetes/prepare/platform-setup/oci/>Oracle Cloud Infrastructure</a></li></ul></li></ul></li><li role=treeitem aria-label=安装方案><button aria-hidden=true></button><a title=选择最适合您需求和平台的方案。 href=/v1.1/zh/docs/setup/kubernetes/install/>安装方案</a><ul role=group aria-expanded=false><li role=none><a role=treeitem title="在 Kubernetes 集群中快速安装 Istio 服务网格的说明。" href=/v1.1/zh/docs/setup/kubernetes/install/kubernetes/>在 Kubernetes 中快速开始</a></li><li role=none><a role=treeitem title="使用内含的 Helm chart 安装 Istio。" href=/v1.1/zh/docs/setup/kubernetes/install/helm/>使用 Helm 进行安装</a></li><li role=treeitem aria-label=多集群安装><button aria-hidden=true></button><a title="配置跨越多个 Kubernetes 集群的 Istio 服务网格。" href=/v1.1/zh/docs/setup/kubernetes/install/multicluster/>多集群安装</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="使用 Istio Gateway 跨越多个 Kubernetes 集群安装 Istio 网格以访问远程 pod。" href=/v1.1/zh/docs/setup/kubernetes/install/multicluster/gateways/>Gateway 连接</a></li><li role=none><a role=treeitem title="通过直连远程 pods 实现多 Kubernetes 集群安装 Istio 网格。" href=/v1.1/zh/docs/setup/kubernetes/install/multicluster/vpn/>VPN 连接</a></li></ul></li><li role=treeitem aria-label=特定平台安装说明><button aria-hidden=true></button><a title="支持的 Kubernetes 平台的额外安装流程。" href=/v1.1/zh/docs/setup/kubernetes/install/platform/>特定平台安装说明</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="如何使用阿里云 Kubernetes 容器服务快速安装 Istio。" href=/v1.1/zh/docs/setup/kubernetes/install/platform/alicloud/>阿里云</a></li><li role=none><a role=treeitem title="在 Google Kubernetes Engine (GKE) 上快速搭建 Istio 服务。" href=/v1.1/zh/docs/setup/kubernetes/install/platform/gke/>Google Kubernetes Engine</a></li><li role=none><a role=treeitem title="如何使用 IBM 公有云或 IBM 私有云快速安装 Istio。" href=/v1.1/zh/docs/setup/kubernetes/install/platform/ibm/>IBM Cloud</a></li></ul></li></ul></li><li role=treeitem aria-label=升级><button aria-hidden=true></button><a title="升级 Istio 的相关信息。" href=/v1.1/zh/docs/setup/kubernetes/upgrade/>升级</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="在升级到 Istio 1.1 之前,运维人员必须了解的重要更改。" href=/v1.1/zh/docs/setup/kubernetes/upgrade/notice/>1.1 升级通知</a></li><li role=none><a role=treeitem title="演示如何独立升级 Istio 控制平面和数据平面。" href=/v1.1/zh/docs/setup/kubernetes/upgrade/steps/>升级步骤</a></li></ul></li><li role=treeitem aria-label=更多指南><button aria-hidden=true></button><a title=有关其他设置任务的更多信息。 href=/v1.1/zh/docs/setup/kubernetes/additional-setup/>更多指南</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Istio 内置的安装配置文件介绍。" href=/v1.1/zh/docs/setup/kubernetes/additional-setup/config-profiles/>安装配置</a></li><li role=none><a role=treeitem title="介绍两种将 Istio sidecar 注入应用 Pod 的方法:使用 Sidecar 注入 Webhook 自动完成,或使用 istioctl 客户端工具手工完成。" href=/v1.1/zh/docs/setup/kubernetes/additional-setup/sidecar-injection/>注入 Istio sidecar</a></li><li role=none><a role=treeitem title="这里讲述了 Istio 对 Kubernetes 中 Pod 和服务的要求。" href=/v1.1/zh/docs/setup/kubernetes/additional-setup/requirements/>Istio 对 Pod 和服务的要求</a></li><li role=none><a role=treeitem title="Istio CNI 插件的安装和使用 Istio,该插件让运维人员可以用较低的权限来完成网格服务的部署工作。" href=/v1.1/zh/docs/setup/kubernetes/additional-setup/cni/>Istio CNI 插件的安装和使用 Istio</a></li><li role=none><a role=treeitem title="部署在 Kubernetes 之中的 Istio 服务网格,将虚拟机和物理机集成进入到服务网格的方法。" href=/v1.1/zh/docs/setup/kubernetes/additional-setup/mesh-expansion/>网格扩展</a></li></ul></li></ul></li><li role=treeitem aria-label="Nomad & Consul"><button aria-hidden=true></button><a title="基于 Consul 和 Nomad 安装 Istio 控制平面。" href=/v1.1/zh/docs/setup/consul/>Nomad & Consul</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="通过 Docker Compose 快速安装 Istio service mesh。" href=/v1.1/zh/docs/setup/consul/quick-start/>通过 Docker 快速安装</a></li><li role=none><a role=treeitem title="基于 Consul 和 Nomad 安装 Istio 控制平面。" href=/v1.1/zh/docs/setup/consul/install/>安装</a></li></ul></li></ul></div></div><div class=card><button class="header dynamic" id=card49 title="如何用 Istio 系统实现特定目标的行为。" aria-controls=card49-body><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#tasks"/></svg>任务</button><div class="body default" aria-labelledby=card49 role=region id=card49-body><ul role=tree aria-expanded=true aria-labelledby=card49><li role=treeitem aria-label=流量管理><button aria-hidden=true></button><a title="演示 Istio 流量路由功能的任务。" href=/v1.1/zh/docs/tasks/traffic-management/>流量管理</a><ul role=group aria-expanded=false><li role=none><a role=treeitem title=此任务将说明如何将请求动态路由到多个版本的微服务。 href=/v1.1/zh/docs/tasks/traffic-management/request-routing/>配置请求路由</a></li><li role=none><a role=treeitem title=此任务说明如何注入延迟并测试应用程序的弹性。 href=/v1.1/zh/docs/tasks/traffic-management/fault-injection/>故障注入</a></li><li role=none><a role=treeitem title=向您展示如何将流量从旧版本迁移到新版本的服务。 href=/v1.1/zh/docs/tasks/traffic-management/traffic-shifting/>流量转移</a></li><li role=none><a role=treeitem title="展示如何将一个 TCP 服务的流量从老版本迁移到新版本。" href=/v1.1/zh/docs/tasks/traffic-management/tcp-traffic-shifting/>TCP 流量转移</a></li><li role=none><a role=treeitem title="本任务用于示范如何使用 Istio 在 Envoy 中设置请求超时。" href=/v1.1/zh/docs/tasks/traffic-management/request-timeouts/>设置请求超时</a></li><li role=none><a role=treeitem title="介绍在服务网格 Istio 中如何配置外部公开服务。" href=/v1.1/zh/docs/tasks/traffic-management/ingress/>控制 Ingress 流量</a></li><li role=treeitem aria-label="加密 Ingress Gateway"><button aria-hidden=true></button><a title="使用多种方法为 Gateway 控制器提供加密支持。" href=/v1.1/zh/docs/tasks/traffic-management/secure-ingress/>加密 Ingress Gateway</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="如何配置 Istio,借助 SDS(Secret 发现服务),使用 TLS 或双向 TLS 将服务开放到网格之外。" href=/v1.1/zh/docs/tasks/traffic-management/secure-ingress/sds/>使用 SDS 为 Gateway 提供 HTTPS 加密支持</a></li></ul></li><li role=none><a role=treeitem title="在 Istio 中配置从网格内访问外部服务的流量路由。" href=/v1.1/zh/docs/tasks/traffic-management/egress/>控制 Egress 流量</a></li><li role=none><a role=treeitem title=用连接、请求以及外部检测来进行熔断配置的过程。 href=/v1.1/zh/docs/tasks/traffic-management/circuit-breaking/>熔断</a></li><li role=none><a role=treeitem title="此任务演示了 Istio 的流量镜像功能。" href=/v1.1/zh/docs/tasks/traffic-management/mirroring/>镜像</a></li></ul></li><li role=treeitem aria-label=安全><button class=show aria-hidden=true></button><a title=演示对服务网格进行安全加固的方法。 href=/v1.1/zh/docs/tasks/security/>安全</a><ul role=group aria-expanded=true class=leaf-section><li role=none><a role=treeitem title="展示为 HTTP 服务设置基于角色的访问控制方法。" href=/v1.1/zh/docs/tasks/security/authz-http/>HTTP 服务的访问控制</a></li><li role=none><a role=treeitem title="整合 Vault CA 到 Istio 中为双向 TLS 提供 支持。" href=/v1.1/zh/docs/tasks/security/vault-ca/>Istio Vault CA 集成</a></li><li role=none><a role=treeitem title="有关如何在 Istio 中配置基于组的授权和配置列表类型声明的授权的教程。" href=/v1.1/zh/docs/tasks/security/rbac-groups/>基于组和列表类型声明的授权</a></li><li role=none><span role=treeitem class=current title="介绍如何使用 Istio 认证策略设置双向 TLS 和基本的终端用户认证。">基础认证策略</span></li><li role=none><a role=treeitem title="对 Istio 的自动双向 TLS 认证功能进行体验和测试。" href=/v1.1/zh/docs/tasks/security/mutual-tls/>深入了解双向 TLS</a></li><li role=none><a role=treeitem title=展示宽容模式的的鉴权过程。 href=/v1.1/zh/docs/tasks/security/authz-permissive/>鉴权过程中的宽容模式</a></li><li role=none><a role=treeitem title="展示如何为 TCP 服务设置基于角色的访问控制。" href=/v1.1/zh/docs/tasks/security/authz-tcp/>TCP 服务的访问控制</a></li><li role=none><a role=treeitem title=展示如何在服务网格中进行基于角色的访问控制。 href=/v1.1/zh/docs/tasks/security/role-based-access-control/>基于角色的访问控制</a></li><li role=none><a role=treeitem title="运维人员如何使用现有根证书配置 Citadel 进行证书以及密钥的签发。" href=/v1.1/zh/docs/tasks/security/plugin-ca-cert/>插入外部 CA 密钥和证书</a></li><li role=none><a role=treeitem title="如何在 Kubernetes 中启用 Citadel 的健康检查。" href=/v1.1/zh/docs/tasks/security/health-check/>Citadel 的健康检查</a></li><li role=none><a role=treeitem title="展示启用 SDS 来为 Istio 提供身份服务的过程。" href=/v1.1/zh/docs/tasks/security/auth-sds/>通过 SDS 提供身份服务</a></li><li role=none><a role=treeitem title="如何渐进式的为现有 Istio 服务添加双向 TLS 支持。" href=/v1.1/zh/docs/tasks/security/mtls-migration/>双向 TLS 的迁移</a></li><li role=none><a role=treeitem title="展示如何在 HTTPS 服务上启用双向 TLS。" href=/v1.1/zh/docs/tasks/security/https-overlay/>通过 HTTPS 进行双向 TLS</a></li></ul></li><li role=treeitem aria-label=策略><button aria-hidden=true></button><a title=演示策略实施功能。 href=/v1.1/zh/docs/tasks/policy-enforcement/>策略</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="本任务讲解如何启用 Istio 策略检查功能。" href=/v1.1/zh/docs/tasks/policy-enforcement/enabling-policy/>启用策略检查</a></li><li role=none><a role=treeitem title="这一任务展示了如何使用 Istio 动态的对服务通信进行速率限制。" href=/v1.1/zh/docs/tasks/policy-enforcement/rate-limiting/>启用速率限制</a></li><li role=none><a role=treeitem title="展示使用简单的 Denier 适配器或黑白名单对服务进行访问控制的方法。" href=/v1.1/zh/docs/tasks/policy-enforcement/denial-and-list/>Denier 适配器以及黑白名单</a></li><li role=none><a role=treeitem title="显示如何使用策略适配器修改请求 header 和路由。" href=/v1.1/zh/docs/tasks/policy-enforcement/control-headers/>控制 header 和路由</a></li></ul></li><li role=treeitem aria-label=遥测><button aria-hidden=true></button><a title=演示从服务网格收集遥测信息的方法。 href=/v1.1/zh/docs/tasks/telemetry/>遥测</a><ul role=group aria-expanded=false><li role=treeitem aria-label=指标度量><button aria-hidden=true></button><a title="演示 Istio 网格指标度量的配置、收集和处理。" href=/v1.1/zh/docs/tasks/telemetry/metrics/>指标度量</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="这一任务讲述如何配置 Istio,进行指标和日志的收集工作。" href=/v1.1/zh/docs/tasks/telemetry/metrics/collecting-metrics/>收集指标和日志</a></li><li role=none><a role=treeitem title="本任务展示了如何配置 Istio 进行 TCP 服务的指标收集。" href=/v1.1/zh/docs/tasks/telemetry/metrics/tcp-metrics/>获取 TCP 服务指标</a></li><li role=none><a role=treeitem title="此任务说明如何使用 Prometheus 查询 Istio 指标。" href=/v1.1/zh/docs/tasks/telemetry/metrics/querying-metrics/>查询 Prometheus 的指标</a></li><li role=none><a role=treeitem title="这个任务向您展示了如何设置和使用 Istio 仪表盘来监视网格流量。" href=/v1.1/zh/docs/tasks/telemetry/metrics/using-istio-dashboard/>使用 Grafana 可视化指标度量</a></li></ul></li><li role=treeitem aria-label=日志><button aria-hidden=true></button><a title="演示 Istio 网格日志的配置、收集和处理。" href=/v1.1/zh/docs/tasks/telemetry/logs/>日志</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="这一任务讲述如何配置 Istio,进行日志的收集工作。" href=/v1.1/zh/docs/tasks/telemetry/logs/collecting-logs/>收集日志</a></li><li role=none><a role=treeitem title="此任务向您展示如何配置 Envoy 代理将访问日志打印到其标准输出。" href=/v1.1/zh/docs/tasks/telemetry/logs/access-log/>获取 Envoy 访问日志</a></li><li role=none><a role=treeitem title="此任务说明如何配置 Istio 以将日志输出到 Fluentd 守护程序。" href=/v1.1/zh/docs/tasks/telemetry/logs/fluentd/>使用 Fluentd 记录日志</a></li></ul></li><li role=treeitem aria-label=分布式追踪><button aria-hidden=true></button><a title="该任务展示了如何为启用了 Istio 支持的应用进行追踪。" href=/v1.1/zh/docs/tasks/telemetry/distributed-tracing/>分布式追踪</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Istio 分布式追踪概述。" href=/v1.1/zh/docs/tasks/telemetry/distributed-tracing/overview/>概述</a></li><li role=none><a role=treeitem title="了解如何配置代理以向 Jaeger 发送追踪请求。" href=/v1.1/zh/docs/tasks/telemetry/distributed-tracing/jaeger/>Jaeger</a></li><li role=none><a role=treeitem title="了解如何配置代理以向 Zipkin 发送追踪请求。" href=/v1.1/zh/docs/tasks/telemetry/distributed-tracing/zipkin/>Zipkin</a></li><li role=none><a role=treeitem title="如何配置代理以发送请求至 LightStep [𝑥]PM." href=/v1.1/zh/docs/tasks/telemetry/distributed-tracing/lightstep/>使用 LightStep [𝑥]PM 进行分布式追踪</a></li></ul></li><li role=none><a role=treeitem title="本任务展示了在 Istio 网格中对服务进行可视化的过程。" href=/v1.1/zh/docs/tasks/telemetry/kiali/>网格可视化</a></li><li role=none><a role=treeitem title="本任务展示了为 Istio 遥测插件配置外部访问的过程。" href=/v1.1/zh/docs/tasks/telemetry/gateways/>遥测插件的远程访问</a></li></ul></li></ul></div></div><div class=card><button class="header dynamic" id=card84 title="这里包括多个可供 Istio 使用的可完整工作的示例,你可以用来亲自部署和体验这些示例。" aria-controls=card84-body><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#examples"/></svg>示例</button><div class=body aria-labelledby=card84 role=region id=card84-body><ul role=tree aria-expanded=true aria-labelledby=card84><li role=none><a role=treeitem title="部署一个用于演示多种 Istio 特性的应用,由四个单独的微服务构成。" href=/v1.1/zh/docs/examples/bookinfo/>Bookinfo 应用</a></li><li role=none><a role=treeitem title="如何在 Istio 服务网格中使用多种流量管理功能。" href=/v1.1/zh/docs/examples/intelligent-routing/>智能路由</a></li><li role=none><a role=treeitem title="演示如何使用 Istio Mixer 和 Istio sidecar 获取指标和日志,并在不同的服务间进行追踪。" href=/v1.1/zh/docs/examples/telemetry/>深入遥测</a></li><li role=none><a role=treeitem title="说明如何在谷歌云 Endpoints 服务中手动整合 Istio。" href=/v1.1/zh/docs/examples/endpoints/>在谷歌云 Endpoints 服务中安装 Istio</a></li><li role=none><a role=treeitem title="在单一服务网格中,如何使用 Istio 对 Kubernetes 集群以及虚拟机进行控制。" href=/v1.1/zh/docs/examples/integrating-vms/>虚拟机集成</a></li><li role=treeitem aria-label=边缘流量控制><button aria-hidden=true></button><a title="用于管理 Istio 服务网格的边缘流量(即 Ingress 和 Egress 流量)的各种高级示例。" href=/v1.1/zh/docs/examples/advanced-gateways/>边缘流量控制</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="介绍如何为入口网关配置 SNI 直通。" href=/v1.1/zh/docs/examples/advanced-gateways/ingress-sni-passthrough/>没有 TLS 的 Ingress gateway</a></li><li role=none><a role=treeitem title="描述如何通过专用网关服务将流量定向到外部服务来配置 Istio。" href=/v1.1/zh/docs/examples/advanced-gateways/egress-gateway/>配置 Egress gateway</a></li><li role=none><a role=treeitem title="描述了配置 Egress 网关来发起对外部服务进行 TLS 通信的过程。" href=/v1.1/zh/docs/examples/advanced-gateways/egress-gateway-tls-origination/>Egress 网关的 TLS 发起过程</a></li><li role=none><a role=treeitem title="此任务描述 Istio 如何配置出口流量的 TLS。" href=/v1.1/zh/docs/examples/advanced-gateways/egress-tls-origination/>出口流量的 TLS</a></li><li role=none><a role=treeitem title="介绍如何为公共域中的一组主机启用 Egress 流量,而不是单独配置每个主机。" href=/v1.1/zh/docs/examples/advanced-gateways/wildcard-egress-hosts/>使用通配符主机配置 Egress 流量</a></li><li role=none><a role=treeitem title="如何为 Egress TLS 流量配置 SNI 监控并应用策略。" href=/v1.1/zh/docs/examples/advanced-gateways/egress_sni_monitoring_and_policies/>Egress TLS 流量中的 SNI 监控及策略</a></li><li role=none><a role=treeitem title="描述如何配置 Istio 以允许应用程序使用外部 HTTPS 代理。" href=/v1.1/zh/docs/examples/advanced-gateways/http-proxy/>连接到外部 HTTPS 代理</a></li><li role=none><a role=treeitem title="展示使用 cert-Manager 为 Kubernetes Ingress 获取 Let's Encrypt TLS 证书的过程。" href=/v1.1/zh/docs/examples/advanced-gateways/ingress-certmgr/>使用 cert-manager 加密 Kubernetes Ingress</a></li></ul></li><li role=treeitem aria-label=单一三层网络的多集群网格><button aria-hidden=true></button><a title="您可以尝试各种基于 VPN 的 Istio 多集群示例。" href=/v1.1/zh/docs/examples/multicluster/>单一三层网络的多集群网格</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title=在一个使用网关进行连接的多集群网格中配置远程服务。 href=/v1.1/zh/docs/examples/multicluster/gateways/>通过网关进行连接的多集群</a></li><li role=none><a role=treeitem title="基于 GKE 的 Istio 多集群安装。" href=/v1.1/zh/docs/examples/multicluster/gke/>Google Kubernetes Engine</a></li><li role=none><a role=treeitem title="多 IBM Cloud Private 集群安装 Istio 示例。" href=/v1.1/zh/docs/examples/multicluster/icp/>IBM Cloud Private</a></li><li role=none><a role=treeitem title="IBM Cloud Kubernetes Service 和 IBM Cloud Private 之间的多集群示例。" href=/v1.1/zh/docs/examples/multicluster/iks-icp/>IBM Cloud Kubernetes Service & IBM Cloud Private</a></li><li role=none><a role=treeitem title="利用 Istio 的水平分割 EDS 来创建多集群网格。" href=/v1.1/zh/docs/examples/multicluster/split-horizon-eds/>集群感知的服务路由</a></li></ul></li></ul></div></div><div class=card><button class="header dynamic" id=card114 title="参考部分包含详细的权威参考资料,如命令行选项、配置选项和 API 调用参数。" aria-controls=card114-body><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#reference"/></svg>参考</button><div class=body aria-labelledby=card114 role=region id=card114-body><ul role=tree aria-expanded=true aria-labelledby=card114><li role=treeitem aria-label=配置><button aria-hidden=true></button><a title=关于配置选项的详细信息。 href=/v1.1/zh/docs/reference/config/>配置</a><ul role=group aria-expanded=false><li role=treeitem aria-label=流量管理><button aria-hidden=true></button><a title="描述如何配置 HTTP/TCP 路由功能。" href=/v1.1/zh/docs/reference/config/networking/>流量管理</a><ul role=group aria-expanded=false class=leaf-section></ul></li><li role=none><a role=treeitem title="描述了使用 Helm chart 安装 Istio 时可以使用的选项。" href=/v1.1/zh/docs/reference/config/installation-options/>安装选项</a></li><li role=none><a role=treeitem title="详细描述 release-1.0 和 release-1.1 之间 Helm chart 安装选项的差异。" href=/v1.1/zh/docs/reference/config/installation-options-changes/>安装选项的变更</a></li><li role=treeitem aria-label=授权><button aria-hidden=true></button><a title=关于如何配置Istio授权特性的描述。 href=/v1.1/zh/docs/reference/config/authorization/>授权</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title=描述所支持的约束和属性。 href=/v1.1/zh/docs/reference/config/authorization/constraints-and-properties/>约束和属性</a></li><li role=none><a role=treeitem title=配置基于角色的访问控制。 href=/v1.1/zh/docs/reference/config/authorization/istio.rbac.v1alpha1/>RBAC</a></li></ul></li><li role=treeitem aria-label=策略和遥测><button aria-hidden=true></button><a title="描述如何配置 Istio 的策略和遥测功能。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/>策略和遥测</a><ul role=group aria-expanded=false><li role=none><a role=treeitem title=介绍策略和控制中会用到的一些基础属性词汇。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/attribute-vocabulary/>属性词汇</a></li><li role=none><a role=treeitem title="Mixer 的配置表达式语言参考。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/expression-language/>表达式语言</a></li><li role=treeitem aria-label=适配器><button aria-hidden=true></button><a title="Mixer 适配器能够让 Istio 连接各种基础设施后端以完成类似指标和日志这样的功能。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/>适配器</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Apigee 的分布式策略检查以及分析适配器。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/apigee/>Apigee</a></li><li role=none><a role=treeitem title="适用于 circonus.com 的监控解决方案。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/circonus/>Circonus</a></li><li role=none><a role=treeitem title="CloudMonitor 适配器使 Istio 可以向 AliCloud CloudMonitor 提供指标。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/cloudmonitor/>CloudMonitor</a></li><li role=none><a role=treeitem title=始终返回按前提条件拒绝的适配器。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/denier/>Denier</a></li><li role=none><a role=treeitem title="用于将日志发送给 Fluentd 守护进程的适配器。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/fluentd/>Fluentd</a></li><li role=none><a role=treeitem title="将指标发送到 SignalFx 的适配器。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/signalfx/>SignalFx</a></li><li role=none><a role=treeitem title="从 Kubernetes 环境中获取集群信息。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/kubernetesenv/>Kubernetes Env</a></li><li role=none><a role=treeitem title=用于执行黑名单或白名单检测的适配器。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/list/>List</a></li><li role=none><a role=treeitem title=简单内存配额管理系统适配器。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/memquota/>Memory quota</a></li><li role=none><a role=treeitem title="基于 Redis 的配额管理系统。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/redisquota/>Redis Quota</a></li><li role=none><a role=treeitem title="用于向 Google Service Control 发送日志和指标的适配器。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/servicecontrol/>Service Control</a></li><li role=none><a role=treeitem title="该适配器用于向 statsd 后端发送指标数据。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/statsd/>statsd</a></li><li role=none><a role=treeitem title=该适配器可以在本地输出日志和指标。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/adapters/stdio/>Stdio</a></li></ul></li><li role=treeitem aria-label=模板><button aria-hidden=true></button><a title="Mixer 模板用于将数据发送到各个适配器。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/>模板</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="该模板用于表达一个 API Key。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/apikey/>API Key</a></li><li role=none><a role=treeitem title="Analytics 模板用于向 Apigee 发送运行时遥测数据。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/analytics/>Analytics</a></li><li role=none><a role=treeitem title=该模版用于访问控制查询。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/authorization/>Authorization</a></li><li role=none><a role=treeitem title=该模板不包含任何数据,用于测试。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/checknothing/>Check Nothing</a></li><li role=none><a role=treeitem title="用于生成 Kubernetes 的特定属性。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/kubernetes/>Kubernetes</a></li><li role=none><a role=treeitem title=该模板用于执行列表检查操作。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/listentry/>List Entry</a></li><li role=none><a role=treeitem title=该模板用于表达一条运行时日志项。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/logentry/>Log Entry</a></li><li role=none><a role=treeitem title=该模板用于表达一个运行时产生的监控指标数据。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/metric/>Metric</a></li><li role=none><a role=treeitem title=该模板用于表达占用配额的请求。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/quota/>Quota</a></li><li role=none><a role=treeitem title=该模板不包含数据,用于测试。 href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/reportnothing/>Report Nothing</a></li><li role=none><a role=treeitem title="用于 Google Service Control 适配器的模板。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/servicecontrolreport/>Service Control Report</a></li><li role=none><a role=treeitem title="该模板用于表达分布式追踪数据中的一个 Span。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/templates/tracespan/>Trace Span</a></li></ul></li><li role=none><a role=treeitem title="通过 Mixer 从 Istio 导出的默认监控指标。" href=/v1.1/zh/docs/reference/config/policy-and-telemetry/metrics/>默认监控指标</a></li></ul></li><li role=none><a role=treeitem title=流量路由配置。 href=/v1.1/zh/docs/reference/config/istio.networking.v1alpha3/>通信路由</a></li></ul></li><li role=treeitem aria-label=命令><button aria-hidden=true></button><a title="描述 Istio 命令和工具的用法及选项。" href=/v1.1/zh/docs/reference/commands/>命令</a><ul role=group aria-expanded=false class=leaf-section><li role=none><a role=treeitem title="Galley 为 Istio 提供配置管理服务。" href=/v1.1/zh/docs/reference/commands/galley/>galley</a></li><li role=none><a role=treeitem title="自动注入 Istio sidecar 的 Kubernetes webhook。" href=/v1.1/zh/docs/reference/commands/sidecar-injector/>sidecar-injector</a></li><li role=none><a role=treeitem title="Istio 控制界面。" href=/v1.1/zh/docs/reference/commands/istioctl/>istioctl</a></li><li role=none><a role=treeitem title="Istio 证书颁发(CA)。" href=/v1.1/zh/docs/reference/commands/istio_ca/>istio_ca</a></li><li role=none><a role=treeitem title="用于触发直接调用 Mixer API 的实用程序。" href=/v1.1/zh/docs/reference/commands/mixc/>mixc</a></li><li role=none><a role=treeitem title="Mixer 是 Istio 在后端基础设施之上的抽象。" href=/v1.1/zh/docs/reference/commands/mixs/>mixs</a></li><li role=none><a role=treeitem title="节点一级的 Istio 安全代理。" href=/v1.1/zh/docs/reference/commands/node_agent/>node_agent</a></li><li role=none><a role=treeitem title="Istio Pilot。" href=/v1.1/zh/docs/reference/commands/pilot-discovery/>pilot-discovery</a></li></ul></li></ul></div></div></div></nav></div><div class=article-container><button tabindex=-1 id=sidebar-toggler title=折叠导航栏><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#pull"/></svg></button><nav aria-label=Breadcrumb><ol><li><a href=/v1.1/zh/>Istio</a></li><li><a href=/v1.1/zh/docs/ title="了解如何部署、使用和运维 Istio。">文档</a></li><li><a href=/v1.1/zh/docs/tasks/ title="如何用 Istio 系统实现特定目标的行为。">任务</a></li><li><a href=/v1.1/zh/docs/tasks/security/ title=演示对服务网格进行安全加固的方法。>安全</a></li><li>基础认证策略</li></ol></nav><article aria-labelledby=title><div class=title-area><div><h1 id=title>基础认证策略</h1><p class=byline><span title="1968 字"><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#clock"/></svg><span> </span>阅读大约需要 10 分钟</span></p></div></div><nav class=toc-inlined aria-label="Table of Contents"><div><hr><ol><li role=none aria-label=开始之前><a href=#%e5%bc%80%e5%a7%8b%e4%b9%8b%e5%89%8d>开始之前</a><ol><li role=none aria-label=安装><a href=#%e5%ae%89%e8%a3%85>安装</a></ol></li><li role=none aria-label="为网格中的所有服务启用双向 TLS 认证"><a href=#%e4%b8%ba%e7%bd%91%e6%a0%bc%e4%b8%ad%e7%9a%84%e6%89%80%e6%9c%89%e6%9c%8d%e5%8a%a1%e5%90%af%e7%94%a8%e5%8f%8c%e5%90%91-tls-%e8%ae%a4%e8%af%81>为网格中的所有服务启用双向 TLS 认证</a><ol><li role=none aria-label="从非 Istio 服务请求到 Istio 服务"><a href=#%e4%bb%8e%e9%9d%9e-istio-%e6%9c%8d%e5%8a%a1%e8%af%b7%e6%b1%82%e5%88%b0-istio-%e6%9c%8d%e5%8a%a1>从非 Istio 服务请求到 Istio 服务</a><li role=none aria-label="从 Istio 服务请求非 Istio 服务"><a href=#%e4%bb%8e-istio-%e6%9c%8d%e5%8a%a1%e8%af%b7%e6%b1%82%e9%9d%9e-istio-%e6%9c%8d%e5%8a%a1>从 Istio 服务请求非 Istio 服务</a><li role=none aria-label="从 Istio 服务请求到 Kubernetes API Server"><a href=#%e4%bb%8e-istio-%e6%9c%8d%e5%8a%a1%e8%af%b7%e6%b1%82%e5%88%b0-kubernetes-api-server>从 Istio 服务请求到 Kubernetes API Server</a><li role=none aria-label="清理第 1 部分"><a href=#%e6%b8%85%e7%90%86%e7%ac%ac-1-%e9%83%a8%e5%88%86>清理第 1 部分</a></ol></li><li role=none aria-label="为每个命名空间或服务启用双向 TLS"><a href=#%e4%b8%ba%e6%af%8f%e4%b8%aa%e5%91%bd%e5%90%8d%e7%a9%ba%e9%97%b4%e6%88%96%e6%9c%8d%e5%8a%a1%e5%90%af%e7%94%a8%e5%8f%8c%e5%90%91-tls>为每个命名空间或服务启用双向 TLS</a><ol><li role=none aria-label=命名空间范围的策略><a href=#%e5%91%bd%e5%90%8d%e7%a9%ba%e9%97%b4%e8%8c%83%e5%9b%b4%e7%9a%84%e7%ad%96%e7%95%a5>命名空间范围的策略</a></ol></li><li role=none aria-label=特定于服务的策略><a href=#%e7%89%b9%e5%ae%9a%e4%ba%8e%e6%9c%8d%e5%8a%a1%e7%9a%84%e7%ad%96%e7%95%a5>特定于服务的策略</a><li role=none aria-label=策略优先级><a href=#%e7%ad%96%e7%95%a5%e4%bc%98%e5%85%88%e7%ba%a7>策略优先级</a><ol><li role=none aria-label="清理第 2 部分"><a href=#%e6%b8%85%e7%90%86%e7%ac%ac-2-%e9%83%a8%e5%88%86>清理第 2 部分</a></ol></li><li role=none aria-label=设置终端用户认证><a href=#%e8%ae%be%e7%bd%ae%e7%bb%88%e7%ab%af%e7%94%a8%e6%88%b7%e8%ae%a4%e8%af%81>设置终端用户认证</a><ol><li role=none aria-label=具有每个路径要求的最终用户身份验证><a href=#%e5%85%b7%e6%9c%89%e6%af%8f%e4%b8%aa%e8%b7%af%e5%be%84%e8%a6%81%e6%b1%82%e7%9a%84%e6%9c%80%e7%bb%88%e7%94%a8%e6%88%b7%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81>具有每个路径要求的最终用户身份验证</a><ol><li role=none aria-label=禁用特定路径的最终用户身份验证><a href=#%e7%a6%81%e7%94%a8%e7%89%b9%e5%ae%9a%e8%b7%af%e5%be%84%e7%9a%84%e6%9c%80%e7%bb%88%e7%94%a8%e6%88%b7%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81>禁用特定路径的最终用户身份验证</a><li role=none aria-label=为特定路径启用最终用户身份验证><a href=#%e4%b8%ba%e7%89%b9%e5%ae%9a%e8%b7%af%e5%be%84%e5%90%af%e7%94%a8%e6%9c%80%e7%bb%88%e7%94%a8%e6%88%b7%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81>为特定路径启用最终用户身份验证</a></ol></li><li role=none aria-label="使用双向 TLS 进行最终用户身份验证"><a href=#%e4%bd%bf%e7%94%a8%e5%8f%8c%e5%90%91-tls-%e8%bf%9b%e8%a1%8c%e6%9c%80%e7%bb%88%e7%94%a8%e6%88%b7%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81>使用双向 TLS 进行最终用户身份验证</a><li role=none aria-label="清理第 3 部分"><a href=#%e6%b8%85%e7%90%86%e7%ac%ac-3-%e9%83%a8%e5%88%86>清理第 3 部分</a></ol></li><li role=none aria-label=相关内容><a href=#see-also>相关内容</a></li></ol><hr></div></nav><p>此任务涵盖启用、配置和使用 Istio 身份验证策略时可能需要执行的主要活动。<a href=/v1.1/zh/docs/concepts/security/#认证>认证概述</a>中可以了解更多相关的基本概念。</p><h2 id=开始之前>开始之前</h2><ul><li><p>理解 Istio <a href=/v1.1/zh/docs/concepts/security/#认证策略>认证策略</a>和相关的
|
||
<a href=/v1.1/zh/docs/concepts/security/#双向-tls-认证>双向 TLS 认证</a>概念。</p></li><li><p>拥有一个安装好 Istio 的 Kubernetes 集群,并且禁用全局双向 TLS(可使用<a href=/v1.1/zh/docs/setup/kubernetes/install/kubernetes/#安装步骤>安装步骤</a>中提供的示例配置
|
||
<code>install/kubernetes/istio.yaml</code>,或者使用 <a href=/v1.1/zh/docs/setup/kubernetes/install/helm/>Helm</a>
|
||
设置 <code>global.mtls.enabled</code> 为 false)。</p></li></ul><h3 id=安装>安装</h3><p>为了演示,需要创建两个命名空间 <code>foo</code> 和 <code>bar</code>,并且在两个空间中都部署带有 sidecar 的
|
||
<a href=https://github.com/istio/istio/tree/release-1.1/samples/httpbin>httpbin</a> 应用和 <a href=https://github.com/istio/istio/tree/release-1.1/samples/sleep>sleep</a> 应用。同时运行另外一份不带有 Sidecar 的 httpbin 和 sleep 应用(为了保证独立性,
|
||
在 <code>legacy</code> 命名空间中运行它们)。如果您在尝试任务时想要使用相同的示例,运行以下内容:</p><div><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.1/samples/sleep/sleep.yaml>Zip</a><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.1/samples/httpbin/httpbin.yaml>Zip</a><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.1/samples/sleep/sleep.yaml>Zip</a><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.1/samples/httpbin/httpbin.yaml>Zip</a><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.1/samples/sleep/sleep.yaml>Zip</a><a data-skipendnotes=true style=display:none href=https://raw.githubusercontent.com/istio/istio/release-1.1/samples/httpbin/httpbin.yaml>Zip</a><pre><code class=language-bash data-expandlinks=true>$ kubectl create ns foo
|
||
$ kubectl apply -f <(istioctl kube-inject -f @samples/httpbin/httpbin.yaml@) -n foo
|
||
$ kubectl apply -f <(istioctl kube-inject -f @samples/sleep/sleep.yaml@) -n foo
|
||
$ kubectl create ns bar
|
||
$ kubectl apply -f <(istioctl kube-inject -f @samples/httpbin/httpbin.yaml@) -n bar
|
||
$ kubectl apply -f <(istioctl kube-inject -f @samples/sleep/sleep.yaml@) -n bar
|
||
$ kubectl create ns legacy
|
||
$ kubectl apply -f @samples/httpbin/httpbin.yaml@ -n legacy
|
||
$ kubectl apply -f @samples/sleep/sleep.yaml@ -n legacy
|
||
</code></pre></div><p>通过从任意客户端(例如 <code>sleep.foo</code>、<code>sleep.bar</code> 和 <code>sleep.legacy</code>)向任意服务端(<code>httpbin.foo</code> 、<code>httpbin.bar</code> 或 <code>httpbin.legacy</code>)发送 HTTP 请求(可以使用 curl 命令)来验证以上设置。所有请求都应该成功进行并且返回的 HTTP 状态码为 200。</p><p>以下是一个从 <code>sleep.bar</code> 到 <code>httpbin.foo</code> 可达性的检查命令示例:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl exec $(kubectl get pod -l app=sleep -n bar -o jsonpath={.items..metadata.name}) -c sleep -n bar -- curl http://httpbin.foo:8000/ip -s -o /dev/null -w "%{http_code}\n"
|
||
200
|
||
</code></pre><p>以下单行命令可以方便对所有客户端和服务端的组合进行检查:</p><pre><code class=language-bash data-expandlinks=true>$ for from in "foo" "bar" "legacy"; do for to in "foo" "bar" "legacy"; do kubectl exec $(kubectl get pod -l app=sleep -n ${from} -o jsonpath={.items..metadata.name}) -c sleep -n ${from} -- curl "http://httpbin.${to}:8000/ip" -s -o /dev/null -w "sleep.${from} to httpbin.${to}: %{http_code}\n"; done; done
|
||
sleep.foo to httpbin.foo: 200
|
||
sleep.foo to httpbin.bar: 200
|
||
sleep.foo to httpbin.legacy: 200
|
||
sleep.bar to httpbin.foo: 200
|
||
sleep.bar to httpbin.bar: 200
|
||
sleep.bar to httpbin.legacy: 200
|
||
sleep.legacy to httpbin.foo: 200
|
||
sleep.legacy to httpbin.bar: 200
|
||
sleep.legacy to httpbin.legacy: 200
|
||
</code></pre><p>重要的是,验证系统目前没有认证策略:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl get policies.authentication.istio.io --all-namespaces
|
||
No resources found.
|
||
</code></pre><pre><code class=language-bash data-expandlinks=true>$ kubectl get meshpolicies.authentication.istio.io
|
||
NAME AGE
|
||
default 3m
|
||
</code></pre><p>最后要进行的验证是,确保没有为示例服务定义匹配的目标规则。一个验证方法是:获取现存目标规则,查看 <code>host:</code> 字段值是否匹配示例服务的 FQDN。例如:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl get destinationrules.networking.istio.io --all-namespaces -o yaml | grep "host:"
|
||
host: istio-policy.istio-system.svc.cluster.local
|
||
host: istio-telemetry.istio-system.svc.cluster.local
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content>你可能看到一些策略和/或由 Istio 安装时自动添加的目的地规则,具体取决于所选的安装模式。但是在 <code>foo</code>、<code>bar</code> 和 <code>legacy</code> 命名空间中没有任何的策略或规则。</div></aside></div><h2 id=为网格中的所有服务启用双向-tls-认证>为网格中的所有服务启用双向 TLS 认证</h2><p>你可以提交如下<strong>网格范围的认证策略(<code>MeshPolicy</code>)</strong>和目的地规则为网格中所有服务启用双向 TLS 认证:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl apply -f - <<EOF
|
||
apiVersion: "authentication.istio.io/v1alpha1"
|
||
kind: "MeshPolicy"
|
||
metadata:
|
||
name: "default"
|
||
spec:
|
||
peers:
|
||
- mtls: {}
|
||
EOF
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content>网格身份验证策略使用在集群范围的 <code>MeshPolicy</code> CRD 中定义的<a href=/v1.1/docs/reference/config/istio.authentication.v1alpha1/>常规身份验证策略 API</a>。</div></aside></div><p>此策略指定网格中的所有工作负荷仅接受使用 TLS 的加密请求。如您所见,此身份验证策略的类型是
|
||
<code>MeshPolicy</code>,这种策略的生效范围是整个网格内的所有服务,因此名称必须是 <code>default</code>,另外也不包含 <code>targets</code> 字段。</p><p>此时,只有接收方被配置为使用双向 TLS。如果在 Istio 服务(即那些带有 Sidecar 的服务)之间运行 <code>curl</code> 命令,所有请求都将失败并显示 503 错误代码,原因是客户端仍在使用明文请求。</p><pre><code class=language-bash data-expandlinks=true>$ for from in "foo" "bar"; do for to in "foo" "bar"; do kubectl exec $(kubectl get pod -l app=sleep -n ${from} -o jsonpath={.items..metadata.name}) -c sleep -n ${from} -- curl "http://httpbin.${to}:8000/ip" -s -o /dev/null -w "sleep.${from} to httpbin.${to}: %{http_code}\n"; done; done
|
||
sleep.foo to httpbin.foo: 503
|
||
sleep.foo to httpbin.bar: 503
|
||
sleep.bar to httpbin.foo: 503
|
||
sleep.bar to httpbin.bar: 503
|
||
</code></pre><p>要配置客户端也使用双向 TLS,就需要设置<a href=/v1.1/zh/docs/concepts/traffic-management/#目标规则>目标规则</a>。可以使用多个目标规则,一个一个的为每个适用的服务(或命名空间)进行配置;然而在规则中使用 <code>*</code> 符号来匹配所有服务会更方便,这样也就跟网格范围的认证策略一致了。</p><pre><code class=language-bash data-expandlinks=true>$ kubectl apply -f - <<EOF
|
||
apiVersion: "networking.istio.io/v1alpha3"
|
||
kind: "DestinationRule"
|
||
metadata:
|
||
name: "default"
|
||
namespace: "istio-system"
|
||
spec:
|
||
host: "*.local"
|
||
trafficPolicy:
|
||
tls:
|
||
mode: ISTIO_MUTUAL
|
||
EOF
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content>*从 Istio 1.1 开始,将按顺序考虑服务中的客户命名空间,服务器命名空间和 <code>global</code> 命名空间(默认为 <code>istio-system</code>)中的目标规则。
|
||
* 主机值 <code>*.local</code> 仅限于与集群中的服务匹配,而不是外部服务。另请注意,目标规则中没有针对名称或命名空间的限制。
|
||
* 在 <code>ISTIO_MUTUAL</code> TLS 模式中,Istio 将根据其内部实现设置密钥和证书(例如客户端证书、私钥和 CA 证书)的路径。</div></aside></div><p>除了认证场合之外,目标规则还有其它方面的应用,例如金丝雀部署。但是所有的目标规则都适用相同的优先顺序。因此,如果一个服务需要配置其它目标规则(例如配置负载均衡),那么新规则定义中必须包含类似的 TLS 块来定义 <code>ISTIO_MUTUAL</code> 模式,否则它将覆盖网格或命名空间范围的 TLS 设置并禁用 TLS。</p><p>如上所述重新运行测试命令,您将看到 Istio 服务之间的所有请求现已成功完成:</p><pre><code class=language-bash data-expandlinks=true>$ for from in "foo" "bar"; do for to in "foo" "bar"; do kubectl exec $(kubectl get pod -l app=sleep -n ${from} -o jsonpath={.items..metadata.name}) -c sleep -n ${from} -- curl "http://httpbin.${to}:8000/ip" -s -o /dev/null -w "sleep.${from} to httpbin.${to}: %{http_code}\n"; done; done
|
||
sleep.foo to httpbin.foo: 200
|
||
sleep.foo to httpbin.bar: 200
|
||
sleep.bar to httpbin.foo: 200
|
||
sleep.bar to httpbin.bar: 200
|
||
</code></pre><h3 id=从非-istio-服务请求到-istio-服务>从非 Istio 服务请求到 Istio 服务</h3><p>非 Istio 服务,例如 <code>sleep.legacy</code> 没有 Sidecar,因此它无法启动与 Istio 服务通信所需的 TLS 连接。因此从 <code>sleep.legacy</code> 到 <code>httpbin.foo</code> 或 <code>httpbin.bar</code> 的请求将失败:</p><pre><code class=language-bash data-expandlinks=true>$ for from in "legacy"; do for to in "foo" "bar"; do kubectl exec $(kubectl get pod -l app=sleep -n ${from} -o jsonpath={.items..metadata.name}) -c sleep -n ${from} -- curl "http://httpbin.${to}:8000/ip" -s -o /dev/null -w "sleep.${from} to httpbin.${to}: %{http_code}\n"; done; done
|
||
sleep.legacy to httpbin.foo: 000
|
||
command terminated with exit code 56
|
||
sleep.legacy to httpbin.bar: 000
|
||
command terminated with exit code 56
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content>在这种情况下,由于 Envoy 拒绝了明文请求,因此 <code>curl</code> 会以错误代码 56(接收网络数据失败)退出。</div></aside></div><p>这一结果是符合预期的,但遗憾的是,如果不降低这些服务的身份验证要求,就无法完成这种访问。</p><h3 id=从-istio-服务请求非-istio-服务>从 Istio 服务请求非 Istio 服务</h3><p>如果从 <code>sleep.foo</code>(或 <code>sleep.bar</code>)向 <code>httpbin.legacy</code> 发送请求,也会看到请求失败,因为 Istio 按照我们的指示配置客户端目标规则使用双向 TLS,但 <code>httpbin.legacy</code> 没有 Sidecar,所以它无法处理它。</p><pre><code class=language-bash data-expandlinks=true>$ for from in "foo" "bar"; do for to in "legacy"; do kubectl exec $(kubectl get pod -l app=sleep -n ${from} -o jsonpath={.items..metadata.name}) -c sleep -n ${from} -- curl "http://httpbin.${to}:8000/ip" -s -o /dev/null -w "sleep.${from} to httpbin.${to}: %{http_code}\n"; done; done
|
||
sleep.foo to httpbin.legacy: 503
|
||
sleep.bar to httpbin.legacy: 503
|
||
</code></pre><p>要解决此问题,我们可以添加目标规则来覆盖 <code>httpbin.legacy</code> 的 TLS 设置。例如:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl apply -f - <<EOF
|
||
apiVersion: networking.istio.io/v1alpha3
|
||
kind: DestinationRule
|
||
metadata:
|
||
name: "httpbin-legacy"
|
||
namespace: "legacy"
|
||
spec:
|
||
host: "httpbin.legacy.svc.cluster.local"
|
||
trafficPolicy:
|
||
tls:
|
||
mode: DISABLE
|
||
EOF
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content>此目标规则位于服务(<code>httpbin.legacy</code>)的命名空间中,因此它优先于 <code>istio-system</code> 中定义的全局目标规则。</div></aside></div><h3 id=从-istio-服务请求到-kubernetes-api-server>从 Istio 服务请求到 Kubernetes API Server</h3><p>Kubernetes API Server 没有 Sidecar,因此来自 <code>sleep.foo</code> 等 Istio 服务的请求会失败,出现像请求非 Istio 服务时同样的问题而失败。</p><pre><code class=language-bash data-expandlinks=true>$ TOKEN=$(kubectl describe secret $(kubectl get secrets | grep default-token | cut -f1 -d ' ' | head -1) | grep -E '^token' | cut -f2 -d':' | tr -d '\t')
|
||
$ kubectl exec $(kubectl get pod -l app=sleep -n foo -o jsonpath={.items..metadata.name}) -c sleep -n foo -- curl https://kubernetes.default/api --header "Authorization: Bearer $TOKEN" --insecure -s -o /dev/null -w "%{http_code}\n"
|
||
000
|
||
command terminated with exit code 35
|
||
</code></pre><p>同样,我们可以通过覆盖 API 服务器的目标规则来更正此问题( <code>kubernetes.default</code> )</p><pre><code class=language-bash data-expandlinks=true>$ kubectl apply -f - <<EOF
|
||
apiVersion: networking.istio.io/v1alpha3
|
||
kind: DestinationRule
|
||
metadata:
|
||
name: "api-server"
|
||
namespace: istio-system
|
||
spec:
|
||
host: "kubernetes.default.svc.cluster.local"
|
||
trafficPolicy:
|
||
tls:
|
||
mode: DISABLE
|
||
EOF
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content>如果使用<a href=/v1.1/zh/docs/setup/kubernetes/install/kubernetes/#安装步骤>默认双向 TLS 选项</a>安装 Istio,此规则与上述全局身份验证策略和目标规则一起将在安装过程中注入系统。</div></aside></div><p>重新运行上面的测试命令,确认在添加规则后能够成功返回 200:</p><pre><code class=language-bash data-expandlinks=true>$ TOKEN=$(kubectl describe secret $(kubectl get secrets | grep default-token | cut -f1 -d ' ' | head -1) | grep -E '^token' | cut -f2 -d':' | tr -d '\t')
|
||
$ kubectl exec $(kubectl get pod -l app=sleep -n foo -o jsonpath={.items..metadata.name}) -c sleep -n foo -- curl https://kubernetes.default/api --header "Authorization: Bearer $TOKEN" --insecure -s -o /dev/null -w "%{http_code}\n"
|
||
200
|
||
</code></pre><h3 id=清理第-1-部分>清理第 1 部分</h3><p>删除在上述步骤中创建的策略和目标规则:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl delete meshpolicy default
|
||
$ kubectl delete destinationrules httpbin-legacy -n legacy
|
||
$ kubectl delete destinationrules api-server -n istio-system
|
||
</code></pre><h2 id=为每个命名空间或服务启用双向-tls>为每个命名空间或服务启用双向 TLS</h2><p>除了为整个网格指定身份验证策略之外,Istio 还允许您为特定命名空间或服务指定策略。一个
|
||
命名空间范围的策略优先于网格范围的策略,而特定于服务的策略仍具有更高的优先级。</p><h3 id=命名空间范围的策略>命名空间范围的策略</h3><p>下面的示例显示了为命名空间 <code>foo</code> 中的所有服务启用双向 TLS 的策略。正如你所看到的,它使用的类别是 <code>Policy</code> 而不是 <code>MeshPolicy</code>,并指定了一个命名空间,在本例中为 <code>foo</code>。如果未指定命名空间值,则策略将应用于默认命名空间。</p><pre><code class=language-bash data-expandlinks=true>$ kubectl apply -f - <<EOF
|
||
apiVersion: "authentication.istio.io/v1alpha1"
|
||
kind: "Policy"
|
||
metadata:
|
||
name: "default"
|
||
namespace: "foo"
|
||
spec:
|
||
peers:
|
||
- mtls: {}
|
||
EOF
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content>类似于<strong>网格范围的策略</strong>,命名空间范围的策略必须命名为 <code>default</code>,并且不限定任何特定的服务(没有 <code>targets</code> 字段)。</div></aside></div><p>添加相应的目的地规则:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl apply -f - <<EOF
|
||
apiVersion: "networking.istio.io/v1alpha3"
|
||
kind: "DestinationRule"
|
||
metadata:
|
||
name: "default"
|
||
namespace: "foo"
|
||
spec:
|
||
host: "*.foo.svc.cluster.local"
|
||
trafficPolicy:
|
||
tls:
|
||
mode: ISTIO_MUTUAL
|
||
EOF
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content>主机名称 <code>*.foo.svc.cluster.local</code> 限制了只能匹配命名空间 <code>foo</code> 中的服务。</div></aside></div><p>由于这些策略和目的地规则只对命名空间 <code>foo</code> 中的服务有效,你应该看到只有从不带 Sidecar 的客户端(<code>sleep.legacy</code>)到 <code>httpbin.foo</code> 的请求会出现失败。</p><pre><code class=language-bash data-expandlinks=true>$ for from in "foo" "bar" "legacy"; do for to in "foo" "bar" "legacy"; do kubectl exec $(kubectl get pod -l app=sleep -n ${from} -o jsonpath={.items..metadata.name}) -c sleep -n ${from} -- curl "http://httpbin.${to}:8000/ip" -s -o /dev/null -w "sleep.${from} to httpbin.${to}: %{http_code}\n"; done; done
|
||
sleep.foo to httpbin.foo: 200
|
||
sleep.foo to httpbin.bar: 200
|
||
sleep.foo to httpbin.legacy: 200
|
||
sleep.bar to httpbin.foo: 200
|
||
sleep.bar to httpbin.bar: 200
|
||
sleep.bar to httpbin.legacy: 200
|
||
sleep.legacy to httpbin.foo: 000
|
||
command terminated with exit code 56
|
||
sleep.legacy to httpbin.bar: 200
|
||
sleep.legacy to httpbin.legacy: 200
|
||
</code></pre><h2 id=特定于服务的策略>特定于服务的策略</h2><p>也可以为某个特定的服务设置认证策略和目的地规则。执行以下命令,只为 <code>httpbin.bar</code> 服务新增一项策略。</p><pre><code class=language-bash data-expandlinks=true>$ cat <<EOF | kubectl apply -n bar -f -
|
||
apiVersion: "authentication.istio.io/v1alpha1"
|
||
kind: "Policy"
|
||
metadata:
|
||
name: "httpbin"
|
||
spec:
|
||
targets:
|
||
- name: httpbin
|
||
peers:
|
||
- mtls: {}
|
||
EOF
|
||
</code></pre><p>同时增加目的地规则:</p><pre><code class=language-bash data-expandlinks=true>$ cat <<EOF | kubectl apply -n bar -f -
|
||
apiVersion: "networking.istio.io/v1alpha3"
|
||
kind: "DestinationRule"
|
||
metadata:
|
||
name: "httpbin"
|
||
spec:
|
||
host: "httpbin.bar.svc.cluster.local"
|
||
trafficPolicy:
|
||
tls:
|
||
mode: ISTIO_MUTUAL
|
||
EOF
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content><ul><li>在这个例子中,我们<strong>不</strong>在 metadata 中指定命名空间而是放在命令行(<code>-n bar</code>)中。它们的效果是一样的。</li><li>对于认证策略和目的地规则的名称并没有任何限定。在本例中为了简单,使用服务本身的名称为策略和规则命名。</li></ul></div></aside></div><p>同样地,运行上文中提供的测试命令。和预期一致,从 <code>sleep.legacy</code> 到 <code>httpbin.bar</code> 的请求因为同样的原因开始出现失败。</p><pre><code class=language-plain data-expandlinks=true>...
|
||
sleep.legacy to httpbin.bar: 000
|
||
command terminated with exit code 56
|
||
</code></pre><p>如果在命名空间 <code>bar</code> 中还存在其他服务,我们会发现目标为这些服务的流量不会受到影响。验证这一行为有两种方法:一种是加入更多服务;另一种是把这一策略限制到某个端口。这里我们展示第二种方法:</p><pre><code class=language-bash data-expandlinks=true>$ cat <<EOF | kubectl apply -n bar -f -
|
||
apiVersion: "authentication.istio.io/v1alpha1"
|
||
kind: "Policy"
|
||
metadata:
|
||
name: "httpbin"
|
||
spec:
|
||
targets:
|
||
- name: httpbin
|
||
ports:
|
||
- number: 1234
|
||
peers:
|
||
- mtls: {}
|
||
EOF
|
||
</code></pre><p>同时对目的地规则做出相应的改变:</p><pre><code class=language-bash data-expandlinks=true>$ cat <<EOF | kubectl apply -n bar -f -
|
||
apiVersion: "networking.istio.io/v1alpha3"
|
||
kind: "DestinationRule"
|
||
metadata:
|
||
name: "httpbin"
|
||
spec:
|
||
host: httpbin.bar.svc.cluster.local
|
||
trafficPolicy:
|
||
tls:
|
||
mode: DISABLE
|
||
portLevelSettings:
|
||
- port:
|
||
number: 1234
|
||
tls:
|
||
mode: ISTIO_MUTUAL
|
||
EOF
|
||
</code></pre><p>新的策略只作用于 <code>httpbin</code> 服务的 <code>1234</code> 端口上。结果是,双向 TLS 在端口 <code>8000</code> 上(又)被禁用并且从 <code>sleep.legacy</code> 发出的请求会恢复工作。</p><pre><code class=language-bash data-expandlinks=true>$ kubectl exec $(kubectl get pod -l app=sleep -n legacy -o jsonpath={.items..metadata.name}) -c sleep -n legacy -- curl http://httpbin.bar:8000/ip -s -o /dev/null -w "%{http_code}\n"
|
||
200
|
||
</code></pre><h2 id=策略优先级>策略优先级</h2><p>服务级策略是优先于命名空间级策略的,为了证实这一行为,可以新建一条策略,禁止 <code>httpbin.foo</code> 的双向 TLS 设置;而此时网格中已经创建了一个命名空间级的策略,该策略为 <code>foo</code> 命名空间中的所有服务启用了双向 TLS,下面就来观察一下从 <code>sleep.legacy</code> 到 <code>httpbin.foo</code> 的请求是如何失败的:</p><pre><code class=language-bash data-expandlinks=true>$ cat <<EOF | kubectl apply -n foo -f -
|
||
apiVersion: "authentication.istio.io/v1alpha1"
|
||
kind: "Policy"
|
||
metadata:
|
||
name: "overwrite-example"
|
||
spec:
|
||
targets:
|
||
- name: httpbin
|
||
EOF
|
||
</code></pre><p>另外添加对应的目的地规则:</p><pre><code class=language-bash data-expandlinks=true>$ cat <<EOF | kubectl apply -n foo -f -
|
||
apiVersion: "networking.istio.io/v1alpha3"
|
||
kind: "DestinationRule"
|
||
metadata:
|
||
name: "overwrite-example"
|
||
spec:
|
||
host: httpbin.foo.svc.cluster.local
|
||
trafficPolicy:
|
||
tls:
|
||
mode: DISABLE
|
||
EOF
|
||
</code></pre><p>重新从 <code>sleep.legacy</code> 发送请求,我们应当看到请求成功返回的状态码(<code>200</code>),表明服务级的策略覆盖了命名空间层级的策略。</p><pre><code class=language-bash data-expandlinks=true>$ kubectl exec $(kubectl get pod -l app=sleep -n legacy -o jsonpath={.items..metadata.name}) -c sleep -n legacy -- curl http://httpbin.foo:8000/ip -s -o /dev/null -w "%{http_code}\n"
|
||
200
|
||
</code></pre><h3 id=清理第-2-部分>清理第 2 部分</h3><p>删除在上述步骤中创建的策略和目标规则:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl delete policy default overwrite-example -n foo
|
||
$ kubectl delete policy httpbin -n bar
|
||
$ kubectl delete destinationrules default overwrite-example -n foo
|
||
$ kubectl delete destinationrules httpbin -n bar
|
||
</code></pre><h2 id=设置终端用户认证>设置终端用户认证</h2><p>要验证这一功能,首先要有一个有效的 JWT。JWT 必须与本例中的 JWKS 端点相匹配。本例中我们使用 Istio 代码库中的 <a href=https://raw.githubusercontent.com/istio/istio/release-1.1/security/tools/jwt/samples/demo.jwt>JWT test</a> 以及
|
||
<a href=https://raw.githubusercontent.com/istio/istio/release-1.1/security/tools/jwt/samples/jwks.json>JWKS endpoint</a> 进行演示。</p><p>另外为了方便起见,我们使用 <code>ingressgateway</code> 开放了 <code>httpbin.foo</code> 服务(这部分内容可以参看<a href=/v1.1/zh/docs/tasks/traffic-management/ingress/>控制 Ingress 流量</a>任务中的介绍)。</p><pre><code class=language-bash data-expandlinks=true>$ kubectl apply -f - <<EOF
|
||
apiVersion: networking.istio.io/v1alpha3
|
||
kind: Gateway
|
||
metadata:
|
||
name: httpbin-gateway
|
||
namespace: foo
|
||
spec:
|
||
selector:
|
||
istio: ingressgateway # use Istio default gateway implementation
|
||
servers:
|
||
- port:
|
||
number: 80
|
||
name: http
|
||
protocol: HTTP
|
||
hosts:
|
||
- "*"
|
||
EOF
|
||
</code></pre><pre><code class=language-bash data-expandlinks=true>$ kubectl apply -f - <<EOF
|
||
apiVersion: networking.istio.io/v1alpha3
|
||
kind: VirtualService
|
||
metadata:
|
||
name: httpbin
|
||
namespace: foo
|
||
spec:
|
||
hosts:
|
||
- "*"
|
||
gateways:
|
||
- httpbin-gateway
|
||
http:
|
||
- route:
|
||
- destination:
|
||
port:
|
||
number: 8000
|
||
host: httpbin.foo.svc.cluster.local
|
||
EOF
|
||
</code></pre><p>获取入口 IP:</p><pre><code class=language-bash data-expandlinks=true>$ export INGRESS_HOST=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||
</code></pre><p>并且运行查询测试:</p><pre><code class=language-bash data-expandlinks=true>$ curl $INGRESS_HOST/headers -s -o /dev/null -w "%{http_code}\n"
|
||
200
|
||
</code></pre><p>现在添加一条策略,强制 <code>httpbin.org</code> 使用终端用户 JWT。下一个命令假设没有为 <code>httpbin.org</code> 指定服务级策略(也就是说成功运行了上面<a href=#清理第-2-部分>清理第 2 部分</a>的内容)。可以用命令 <code>kubectl get policies.authentication.istio.io -n foo</code> 来验证这一假设:</p><pre><code class=language-bash data-expandlinks=true>$ cat <<EOF | kubectl apply -n foo -f -
|
||
apiVersion: "authentication.istio.io/v1alpha1"
|
||
kind: "Policy"
|
||
metadata:
|
||
name: "jwt-example"
|
||
spec:
|
||
targets:
|
||
- name: httpbin
|
||
origins:
|
||
- jwt:
|
||
issuer: "testing@secure.istio.io"
|
||
jwksUri: "https://raw.githubusercontent.com/istio/istio/release-1.1/security/tools/jwt/samples/jwks.json"
|
||
principalBinding: USE_ORIGIN
|
||
EOF
|
||
</code></pre><p>使用上面小节中同样的 curl 命令进行测试时会返回 401 错误状态码,这是因为服务端需要 JWT 进行认证但请求端并没有提供:</p><pre><code class=language-bash data-expandlinks=true>$ curl $INGRESS_HOST/headers -s -o /dev/null -w "%{http_code}\n"
|
||
401
|
||
</code></pre><p>用下面的 <code>curl</code> 命令生成 Token 并附加在请求中,然后执行请求就会返回成功信息:</p><pre><code class=language-bash data-expandlinks=true>$ TOKEN=$(curl https://raw.githubusercontent.com/istio/istio/release-1.1/security/tools/jwt/samples/demo.jwt -s)
|
||
$ curl --header "Authorization: Bearer $TOKEN" $INGRESS_HOST/headers -s -o /dev/null -w "%{http_code}\n"
|
||
200
|
||
</code></pre><p>要观察 JWT 验证的其他方面,请使用脚本 <a href=https://github.com/istio/istio/tree/release-1.1/security/tools/jwt/samples/gen-jwt.py><code>gen-jwt.py</code></a> 生成新的令牌以测试不同的发行者、受众和到期日期等。例如下面的命令创建一个 5 秒后到期的 Token。Istio 首先成功通过该令牌的验证请求,但在 5 秒后就会拒绝这一 Token 了:</p><pre><code class=language-bash data-expandlinks=true>$ wget https://raw.githubusercontent.com/istio/istio/release-1.1/security/tools/jwt/samples/key.pem
|
||
</code></pre><p>例如,下面的命令会创建一个在 5 秒内到期的令牌。
|
||
如您所见,Istio 首先成功使用该令牌验证请求,但在 5 秒后拒绝它们:</p><pre><code class=language-bash data-expandlinks=true>$ TOKEN=$(./gen-jwt.py ./key.pem --expire 5)
|
||
$ for i in `seq 1 10`; do curl --header "Authorization: Bearer $TOKEN" $INGRESS_HOST/headers -s -o /dev/null -w "%{http_code}\n"; sleep 1; done
|
||
200
|
||
200
|
||
200
|
||
200
|
||
200
|
||
401
|
||
401
|
||
401
|
||
401
|
||
401
|
||
</code></pre><p>您还可以将 JWT 策略添加到入口网关(例如,服务 <code>istio-ingressgateway.istio-system.svc.cluster.local</code>)。
|
||
这通常用于为绑定到网关的所有服务定义 JWT 策略,而不是针对单个服务。</p><h3 id=具有每个路径要求的最终用户身份验证>具有每个路径要求的最终用户身份验证</h3><p>可以根据请求路径启用或禁用最终用户身份验证。如果要禁用某些路径的身份验证(例如,用于运行状况检查或状态报告的路径),这将非常有用。
|
||
您还可以在不同路径上指定不同的 JWT 要求。</p><div><aside class="callout warning"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-warning"/></svg></div><div class=content>具有每路径要求的最终用户认证是 Istio 1.1 中的实验性功能,并且不建议用于生产用途。</div></aside></div><h4 id=禁用特定路径的最终用户身份验证>禁用特定路径的最终用户身份验证</h4><p>修改 <code>jwt-example</code> 策略以禁用路径 <code>/user-agent</code> 的最终用户身份验证:</p><pre><code class=language-bash data-expandlinks=true>$ cat <<EOF | kubectl apply -n foo -f -
|
||
apiVersion: "authentication.istio.io/v1alpha1"
|
||
kind: "Policy"
|
||
metadata:
|
||
name: "jwt-example"
|
||
spec:
|
||
targets:
|
||
- name: httpbin
|
||
origins:
|
||
- jwt:
|
||
issuer: "testing@secure.istio.io"
|
||
jwksUri: "https://raw.githubusercontent.com/istio/istio/release-1.1/security/tools/jwt/samples/jwks.json"
|
||
trigger_rules:
|
||
- excluded_paths:
|
||
- exact: /user-agent
|
||
principalBinding: USE_ORIGIN
|
||
EOF
|
||
</code></pre><p>确认允许在没有 JWT 令牌的情况下访问路径 <code>/user-agent</code>:</p><pre><code class=language-bash data-expandlinks=true>$ curl $INGRESS_HOST/user-agent -s -o /dev/null -w "%{http_code}\n"
|
||
200
|
||
</code></pre><p>确认在没有 JWT 令牌的情况下拒绝访问除 <code>/user-agent</code> 以外的路径:</p><pre><code class=language-bash data-expandlinks=true>$ curl $INGRESS_HOST/headers -s -o /dev/null -w "%{http_code}\n"
|
||
401
|
||
</code></pre><h4 id=为特定路径启用最终用户身份验证>为特定路径启用最终用户身份验证</h4><p>修改 <code>jwt-example</code> 策略,只为路径 <code>/ip</code> 启用最终用户认证:</p><pre><code class=language-bash data-expandlinks=true>$ cat <<EOF | kubectl apply -n foo -f -
|
||
apiVersion: "authentication.istio.io/v1alpha1"
|
||
kind: "Policy"
|
||
metadata:
|
||
name: "jwt-example"
|
||
spec:
|
||
targets:
|
||
- name: httpbin
|
||
origins:
|
||
- jwt:
|
||
issuer: "testing@secure.istio.io"
|
||
jwksUri: "https://raw.githubusercontent.com/istio/istio/release-1.1/security/tools/jwt/samples/jwks.json"
|
||
trigger_rules:
|
||
- included_paths:
|
||
- exact: /ip
|
||
principalBinding: USE_ORIGIN
|
||
EOF
|
||
</code></pre><p>确认允许在没有 JWT 令牌的情况下访问除 <code>/ip</code> 以外的路径:</p><pre><code class=language-bash data-expandlinks=true>$ curl $INGRESS_HOST/user-agent -s -o /dev/null -w "%{http_code}\n"
|
||
200
|
||
</code></pre><p>确认在没有 JWT 令牌的情况下拒绝访问路径 <code>/ip</code>:</p><pre><code class=language-bash data-expandlinks=true>$ curl $INGRESS_HOST/ip -s -o /dev/null -w "%{http_code}\n"
|
||
401
|
||
</code></pre><p>确认允许使用有效的 JWT 令牌访问路径 <code>/ip</code>:</p><pre><code class=language-bash data-expandlinks=true>$ TOKEN=$(curl https://raw.githubusercontent.com/istio/istio/release-1.1/security/tools/jwt/samples/demo.jwt -s)
|
||
$ curl --header "Authorization: Bearer $TOKEN" $INGRESS_HOST/ip -s -o /dev/null -w "%{http_code}\n"
|
||
200
|
||
</code></pre><h3 id=使用双向-tls-进行最终用户身份验证>使用双向 TLS 进行最终用户身份验证</h3><p>最终用户身份验证和双向 TLS 可以一起使用。修改上面的策略以定义双向 TLS 和最终用户 JWT 身份验证:</p><pre><code class=language-bash data-expandlinks=true>$ cat <<EOF | kubectl apply -n foo -f -
|
||
apiVersion: "authentication.istio.io/v1alpha1"
|
||
kind: "Policy"
|
||
metadata:
|
||
name: "jwt-example"
|
||
spec:
|
||
targets:
|
||
- name: httpbin
|
||
peers:
|
||
- mtls: {}
|
||
origins:
|
||
- jwt:
|
||
issuer: "testing@secure.istio.io"
|
||
jwksUri: "https://raw.githubusercontent.com/istio/istio/release-1.1/security/tools/jwt/samples/jwks.json"
|
||
principalBinding: USE_ORIGIN
|
||
EOF
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content>如果尚未提交 <code>jwt-example</code> 策略,请使用 <code>istio create</code>。</div></aside></div><p>并添加目标规则:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl apply -f - <<EOF
|
||
apiVersion: "networking.istio.io/v1alpha3"
|
||
kind: "DestinationRule"
|
||
metadata:
|
||
name: "httpbin"
|
||
namespace: "foo"
|
||
spec:
|
||
host: "httpbin.foo.svc.cluster.local"
|
||
trafficPolicy:
|
||
tls:
|
||
mode: ISTIO_MUTUAL
|
||
EOF
|
||
</code></pre><div><aside class="callout tip"><div class=type><svg class="large-icon"><use xlink:href="/v1.1/img/icons.svg#callout-tip"/></svg></div><div class=content>如果已经在网格级或者命名空间级的策略中启用了双向 TLS,则主机 <code>httpbin.foo</code> 已被其它目标规则覆盖。因此就不需要添加此目标规则了。另一方面,仍然需要将 <code>mtls</code> 节添加到身份验证策略,因为服务级的策略将完全覆盖网格级(或命名空间级)的策略。</div></aside></div><p>在这些更改之后,来自 Istio 服务(包括 ingress gateway)到 <code>httpbin.foo</code> 的流量将使用双向 TLS。上面的测试命令仍然有效。在使用正确的令牌的情况下,Istio 服务直接向 <code>httpbin.foo</code> 发出的请求也可以正常工作:</p><pre><code class=language-bash data-expandlinks=true>$ TOKEN=$(curl https://raw.githubusercontent.com/istio/istio/release-1.1/security/tools/jwt/samples/demo.jwt -s)
|
||
$ kubectl exec $(kubectl get pod -l app=sleep -n foo -o jsonpath={.items..metadata.name}) -c sleep -n foo -- curl http://httpbin.foo:8000/ip -s -o /dev/null -w "%{http_code}\n" --header "Authorization: Bearer $TOKEN"
|
||
200
|
||
</code></pre><p>但是,来自非 Istio 服务的明文请求将失败:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl exec $(kubectl get pod -l app=sleep -n legacy -o jsonpath={.items..metadata.name}) -c sleep -n legacy -- curl http://httpbin.foo:8000/ip -s -o /dev/null -w "%{http_code}\n" --header "Authorization: Bearer $TOKEN"
|
||
401
|
||
</code></pre><h3 id=清理第-3-部分>清理第 3 部分</h3><ol><li><p>删除身份验证策略:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl -n foo delete policy jwt-example
|
||
</code></pre></li><li><p>删除目标规则:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl -n foo delete destinationrule httpbin
|
||
</code></pre></li><li><p>如果您不打算探索任何后续任务,则只需删除测试命名空间即可删除所有资源:</p><pre><code class=language-bash data-expandlinks=true>$ kubectl delete ns foo bar legacy
|
||
</code></pre></li></ol><nav id=see-also><h2>相关内容</h2><div class=see-also><div class=entry><p class=link><a data-skipendnotes=true href=/v1.1/zh/docs/tasks/security/mtls-migration/>双向 TLS 的迁移</a></p><p class=desc>如何渐进式的为现有 Istio 服务添加双向 TLS 支持。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.1/zh/docs/concepts/security/>安全</a></p><p class=desc>描述 Istio 的授权与鉴权功能。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.1/zh/blog/2019/root-transition/>延长 Istio 自签发根证书的有效期</a></p><p class=desc>学习延长 Istio 自签发根证书的有效期的方法。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.1/zh/blog/2018/istio-authorization/>基于 Istio 的 Micro-Segmentation 授权</a></p><p class=desc>描述 Istio 的授权功能以及如何在各种用例中使用它。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.1/zh/docs/tasks/security/health-check/>Citadel 的健康检查</a></p><p class=desc>如何在 Kubernetes 中启用 Citadel 的健康检查。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.1/zh/docs/tasks/security/authz-http/>HTTP 服务的访问控制</a></p><p class=desc>展示为 HTTP 服务设置基于角色的访问控制方法。</p></div></div></nav></article><nav class=pagenav><div class=left><a title="有关如何在 Istio 中配置基于组的授权和配置列表类型声明的授权的教程。" href=/v1.1/zh/docs/tasks/security/rbac-groups/><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#left-arrow"/></svg>基于组和列表类型声明的授权</a></div><div class=right><a title="对 Istio 的自动双向 TLS 认证功能进行体验和测试。" href=/v1.1/zh/docs/tasks/security/mutual-tls/>深入了解双向 TLS<svg class="icon"><use xlink:href="/v1.1/img/icons.svg#right-arrow"/></svg></a></div></nav><div id=endnotes-container aria-hidden=true><h2>链接</h2><ol id=endnotes></ol></div></div><div class=toc-container><nav class=toc aria-label="Table of Contents"><div id=toc><ol><li role=none aria-label=开始之前><a href=#%e5%bc%80%e5%a7%8b%e4%b9%8b%e5%89%8d>开始之前</a><ol><li role=none aria-label=安装><a href=#%e5%ae%89%e8%a3%85>安装</a></ol></li><li role=none aria-label="为网格中的所有服务启用双向 TLS 认证"><a href=#%e4%b8%ba%e7%bd%91%e6%a0%bc%e4%b8%ad%e7%9a%84%e6%89%80%e6%9c%89%e6%9c%8d%e5%8a%a1%e5%90%af%e7%94%a8%e5%8f%8c%e5%90%91-tls-%e8%ae%a4%e8%af%81>为网格中的所有服务启用双向 TLS 认证</a><ol><li role=none aria-label="从非 Istio 服务请求到 Istio 服务"><a href=#%e4%bb%8e%e9%9d%9e-istio-%e6%9c%8d%e5%8a%a1%e8%af%b7%e6%b1%82%e5%88%b0-istio-%e6%9c%8d%e5%8a%a1>从非 Istio 服务请求到 Istio 服务</a><li role=none aria-label="从 Istio 服务请求非 Istio 服务"><a href=#%e4%bb%8e-istio-%e6%9c%8d%e5%8a%a1%e8%af%b7%e6%b1%82%e9%9d%9e-istio-%e6%9c%8d%e5%8a%a1>从 Istio 服务请求非 Istio 服务</a><li role=none aria-label="从 Istio 服务请求到 Kubernetes API Server"><a href=#%e4%bb%8e-istio-%e6%9c%8d%e5%8a%a1%e8%af%b7%e6%b1%82%e5%88%b0-kubernetes-api-server>从 Istio 服务请求到 Kubernetes API Server</a><li role=none aria-label="清理第 1 部分"><a href=#%e6%b8%85%e7%90%86%e7%ac%ac-1-%e9%83%a8%e5%88%86>清理第 1 部分</a></ol></li><li role=none aria-label="为每个命名空间或服务启用双向 TLS"><a href=#%e4%b8%ba%e6%af%8f%e4%b8%aa%e5%91%bd%e5%90%8d%e7%a9%ba%e9%97%b4%e6%88%96%e6%9c%8d%e5%8a%a1%e5%90%af%e7%94%a8%e5%8f%8c%e5%90%91-tls>为每个命名空间或服务启用双向 TLS</a><ol><li role=none aria-label=命名空间范围的策略><a href=#%e5%91%bd%e5%90%8d%e7%a9%ba%e9%97%b4%e8%8c%83%e5%9b%b4%e7%9a%84%e7%ad%96%e7%95%a5>命名空间范围的策略</a></ol></li><li role=none aria-label=特定于服务的策略><a href=#%e7%89%b9%e5%ae%9a%e4%ba%8e%e6%9c%8d%e5%8a%a1%e7%9a%84%e7%ad%96%e7%95%a5>特定于服务的策略</a><li role=none aria-label=策略优先级><a href=#%e7%ad%96%e7%95%a5%e4%bc%98%e5%85%88%e7%ba%a7>策略优先级</a><ol><li role=none aria-label="清理第 2 部分"><a href=#%e6%b8%85%e7%90%86%e7%ac%ac-2-%e9%83%a8%e5%88%86>清理第 2 部分</a></ol></li><li role=none aria-label=设置终端用户认证><a href=#%e8%ae%be%e7%bd%ae%e7%bb%88%e7%ab%af%e7%94%a8%e6%88%b7%e8%ae%a4%e8%af%81>设置终端用户认证</a><ol><li role=none aria-label=具有每个路径要求的最终用户身份验证><a href=#%e5%85%b7%e6%9c%89%e6%af%8f%e4%b8%aa%e8%b7%af%e5%be%84%e8%a6%81%e6%b1%82%e7%9a%84%e6%9c%80%e7%bb%88%e7%94%a8%e6%88%b7%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81>具有每个路径要求的最终用户身份验证</a><ol><li role=none aria-label=禁用特定路径的最终用户身份验证><a href=#%e7%a6%81%e7%94%a8%e7%89%b9%e5%ae%9a%e8%b7%af%e5%be%84%e7%9a%84%e6%9c%80%e7%bb%88%e7%94%a8%e6%88%b7%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81>禁用特定路径的最终用户身份验证</a><li role=none aria-label=为特定路径启用最终用户身份验证><a href=#%e4%b8%ba%e7%89%b9%e5%ae%9a%e8%b7%af%e5%be%84%e5%90%af%e7%94%a8%e6%9c%80%e7%bb%88%e7%94%a8%e6%88%b7%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81>为特定路径启用最终用户身份验证</a></ol></li><li role=none aria-label="使用双向 TLS 进行最终用户身份验证"><a href=#%e4%bd%bf%e7%94%a8%e5%8f%8c%e5%90%91-tls-%e8%bf%9b%e8%a1%8c%e6%9c%80%e7%bb%88%e7%94%a8%e6%88%b7%e8%ba%ab%e4%bb%bd%e9%aa%8c%e8%af%81>使用双向 TLS 进行最终用户身份验证</a><li role=none aria-label="清理第 3 部分"><a href=#%e6%b8%85%e7%90%86%e7%ac%ac-3-%e9%83%a8%e5%88%86>清理第 3 部分</a></ol></li><li role=none aria-label=相关内容><a href=#see-also>相关内容</a></li></ol></div></nav></div></main><footer><div class=user-links><a class=channel title="Go download Istio 1.1.9 now" href=https://github.com/istio/istio/releases/tag/1.1.9 aria-label="Download Istio"><span>download</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#download"/></svg>
|
||
</a><a class=channel title="加入 Istio discussion board 参与讨论获取帮助" href=https://discuss.istio.io aria-label="Istio discussion board"><span>discuss</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#discourse"/></svg></a>
|
||
<a class=channel title="Stack Overflow 中列举了针对实际问题以及部署、配置和使用 Istio 的各项回答" href=https://stackoverflow.com/questions/tagged/istio aria-label="Stack Overflow"><span>stack overflow</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#stackoverflow"/></svg></a>
|
||
<a class=channel title="关注我们的 Twitter 来获取最新信息" href=https://twitter.com/IstioMesh aria-label=Twitter><span>twitter</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#twitter"/></svg></a><div class=tag>对于用户</div></div><div class=info><p class=copyright>中文内容由 ServiceMesher 社区维护,部分文档可能稍微滞后于英文版本,同步工作持续进行中<br>Istio 归档
|
||
1.1.9<br>© 2019 Istio Authors, <a href=https://policies.google.com/privacy>隐私政策</a><br>归档于 2019年6月18日</p></div><div class=dev-links><a class=channel title="Istio 的代码在 GitHub 上开发" href=https://github.com/istio/community aria-label=GitHub><span>github</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#github"/></svg></a>
|
||
<a class=channel title="在 Slack 上与 Istio 社区交互讨论开发问题(仅限邀请)" href=https://istio.slack.com aria-label=slack><span>slack</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#slack"/></svg></a>
|
||
<a class=channel title="如果您想深入了解 Istio 的技术细节,请查看我们日益完善的设计文档" href=https://groups.google.com/forum/#!forum/istio-team-drive-access aria-label="team drive"><span>drive</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#drive"/></svg></a>
|
||
<a class=channel title="如果您想为 Istio 项目做出贡献,请考虑加入我们的工作组" href=https://github.com/istio/community/blob/master/WORKING-GROUPS.md aria-label="working groups"><span>working groups</span><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#working-groups"/></svg></a><div class=tag>对于开发者</div></div></footer><div id=scroll-to-top-container aria-hidden=true><button id=scroll-to-top title=回到顶部><svg class="icon"><use xlink:href="/v1.1/img/icons.svg#top"/></svg></button></div></body></html> |