mirror of https://github.com/istio/istio.io.git
220 lines
48 KiB
HTML
220 lines
48 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="Istio v1beta1 授权策略概述"><meta name=description content="Istio v1beta1 授权策略的设计原则、基本概述及迁移操作。"><meta name=author content="Yangmin Zhu (Google)"><meta name=keywords content="microservices,services,mesh,security,RBAC,access control,authorization"><meta property="og:title" content="Istio v1beta1 授权策略概述"><meta property="og:type" content="website"><meta property="og:description" content="Istio v1beta1 授权策略的设计原则、基本概述及迁移操作。"><meta property="og:url" content="/v1.5/zh/blog/2019/v1beta1-authorization-policy/"><meta property="og:image" content="/v1.5/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.5 / Istio v1beta1 授权策略概述</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.5/blog/feed.xml><link rel=alternate type=application/rss+xml title="Istio News" href=/v1.5/news/feed.xml><link rel=alternate type=application/rss+xml title="Istio Blog and News" href=/v1.5/feed.xml><link rel="shortcut icon" href=/v1.5/favicons/favicon.ico><link rel=apple-touch-icon href=/v1.5/favicons/apple-touch-icon-180x180.png sizes=180x180><link rel=icon type=image/png href=/v1.5/favicons/favicon-16x16.png sizes=16x16><link rel=icon type=image/png href=/v1.5/favicons/favicon-32x32.png sizes=32x32><link rel=icon type=image/png href=/v1.5/favicons/android-36x36.png sizes=36x36><link rel=icon type=image/png href=/v1.5/favicons/android-48x48.png sizes=48x48><link rel=icon type=image/png href=/v1.5/favicons/android-72x72.png sizes=72x72><link rel=icon type=image/png href=/v1.5/favicons/android-96x96.png sizes=96xW96><link rel=icon type=image/png href=/v1.5/favicons/android-144x144.png sizes=144x144><link rel=icon type=image/png href=/v1.5/favicons/android-192x192.png sizes=192x192><link rel=manifest href=/v1.5/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.5/css/all.css><script src=/v1.5/js/themes_init.min.js></script></head><body class="language-unknown archive-site"><script>const branchName="release-1.5";const docTitle="Istio v1beta1 授权策略概述";const iconFile="\/v1.5/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.5/js/all.min.js data-manual defer></script><header><nav><a id=brand href=/v1.5/zh/><span class=logo><svg viewBox="0 0 300 300"><circle cx="150" cy="150" r="146" stroke-width="2"/><polygon points="65 240 225 240 125 270"/><polygon points="65 230 125 220 125 110"/><polygon points="135 220 225 230 135 30"/></svg></span><span class=name>Istioldie 1.5</span></a><div id=hamburger><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#hamburger"/></svg></div><div id=header-links><a title="了解如何部署、使用和运维 Istio。" href=/v1.5/zh/docs/>文档</a>
|
||
<a class=current title="关于使用 Istio 的博客文章。" href=/v1.5/zh/blog/2020/>博客<i class=dot data-prefix=/blog></i></a>
|
||
<a title="关于 Istio 项目的最新报道。" href=/v1.5/zh/news/>新闻<i class=dot data-prefix=/news></i></a>
|
||
<a title="关于 Istio 的常见问题。" href=/v1.5/zh/faq/>FAQ</a>
|
||
<a title="关于 Istio 项目的说明。" href=/v1.5/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.5/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/blog\/2019\/v1beta1-authorization-policy\/');return false;">当前版本</a>
|
||
<a tabindex=-1 role=menuitem onclick="navigateToUrlOrRoot('https://preliminary.istio.io/blog\/2019\/v1beta1-authorization-policy\/');return false;">下个版本</a>
|
||
<a tabindex=-1 role=menuitem href=https://istio.io/archive>旧版本</a></div></div><button id=search-show title="搜索 istio.io" aria-label=搜索><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#magnifier"/></svg></button></div><form id=search-form name=cse role=search><input type=hidden name=cx value=002184991200833970123: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.5/search>
|
||
<input id=search-textbox class=form-control name=q type=search aria-label="搜索 istio.io">
|
||
<button id=search-close title=取消搜索 type=reset aria-label=取消搜索><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#cancel-x"/></svg></button></form></nav></header><div class=banner-container></div><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=card0 title="2020 年的博客文章。" aria-controls=card0-body><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#blog"/></svg>2020 年的博客文章</button><div class=body aria-labelledby=card0 role=region id=card0-body><ul role=tree aria-expanded=true class=leaf-section aria-labelledby=card0><li role=none><a role=treeitem title="Istio 的扩展中使用 WASM 的前景。 (2020年3月5日)" href=/v1.5/zh/blog/2020/wasm-announce/>重新定义代理的扩展性:Envoy 和 Istio 引入 WebAssembly</a></li><li role=none><a role=treeitem title="Istio 在 2020 年的愿景声明及路线图。 (2020年3月3日)" href=/v1.5/zh/blog/2020/tradewinds-2020/>Istio 2020——为了商用</a></li><li role=none><a role=treeitem title="一种更安全的秘密管理方式。 (2020年2月20日)" href=/v1.5/zh/blog/2020/istio-agent/>移除跨 pod Unix domain socket</a></li><li role=none><a role=treeitem title="为 Istio deployment(cluster)提供自动化 Istio 配置,并让其像单个网格一样工作。 (2020年1月5日)" href=/v1.5/zh/blog/2020/multi-cluster-mesh-automation/>使用 Admiral 管理 Istio 多集群的配置和服务发现</a></li></ul></div></div><div class=card><button class="header dynamic" id=card1 title="2019 年的博客文章。" aria-controls=card1-body><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#blog"/></svg>2019 年的博客文章</button><div class="body default" aria-labelledby=card1 role=region id=card1-body><ul role=tree aria-expanded=true class=leaf-section aria-labelledby=card1><li role=none><a role=treeitem title="一种更安全管理 Istio webhook 的方法。 (2019年11月14日)" href=/v1.5/zh/blog/2019/webhook/>安全管理 Webhook</a></li><li role=none><a role=treeitem title="关于 Istio 基于 operator 的安装和控制平面管理特性的介绍。 (2019年11月14日)" href=/v1.5/zh/blog/2019/introducing-istio-operator/>Istio Operator 简介</a></li><li role=none><span role=treeitem class=current title="Istio v1beta1 授权策略的设计原则、基本概述及迁移操作。 (2019年11月14日)">Istio v1beta1 授权策略概述</span></li><li role=none><a role=treeitem title="通过分析 Istio 配置来发现潜在问题和一般问题。 (2019年11月14日)" href=/v1.5/zh/blog/2019/introducing-istioctl-analyze/>istioctl analyze 介绍</a></li><li role=none><a role=treeitem title="在 Istio 中配置和管理 DNS 证书。 (2019年11月14日)" href=/v1.5/zh/blog/2019/dns-cert/>DNS 证书管理</a></li><li role=none><a role=treeitem title="正式启用访问 Istio 资源。 (2019年11月14日)" href=/v1.5/zh/blog/2019/announcing-istio-client-go/>Istio client-go 发布公告</a></li><li role=none><a role=treeitem title="把 Istio 入口网关配置为外部服务的代理。 (2019年10月15日)" href=/v1.5/zh/blog/2019/proxy/>把 Istio 作为外部服务的代理</a></li><li role=none><a role=treeitem title="将需要隔离的环境部署到单独的网格中,并通过网格联邦启用网格间通信。 (2019年10月2日)" href=/v1.5/zh/blog/2019/isolated-clusters/>用于隔离和边界保护的多网格部署</a></li><li role=none><a role=treeitem title="如何使用 Istio 去监控被阻止的和透传的外部服务流量。 (2019年9月28日)" href=/v1.5/zh/blog/2019/monitoring-external-service-traffic/>监控被阻止的和透传的外部服务流量</a></li><li role=none><a role=treeitem title="本文演示 Mixer 进程外适配器实现 Knative scale-from-zero 逻辑的具体过程。 (2019年9月18日)" href=/v1.5/zh/blog/2019/knative-activator-adapter/>适用于 Knative 的 Mixer 适配器</a></li><li role=none><a role=treeitem title="使用 Istio 实现零代码改动保护多云 Kubernetes 应用。 (2019年9月18日)" href=/v1.5/zh/blog/2019/app-identity-and-access-adapter/>APP 身份和访问适配器</a></li><li role=none><a role=treeitem title="利用 Kubernetes 可信任的 JWT 来更安全地为工作负载实例颁发证书。 (2019年9月10日)" href=/v1.5/zh/blog/2019/trustworthy-jwt-sds/>Istio 1.3 Secret 服务发现的更改</a></li><li role=none><a role=treeitem title="Istio API 的设计原则和这些 API 是如何演变的。 (2019年8月5日)" href=/v1.5/zh/blog/2019/evolving-istios-apis/>Istio API 的演变</a></li><li role=none><a role=treeitem title="管控出口流量的备选方案比较,包括性能因素。 (2019年7月22日)" href=/v1.5/zh/blog/2019/egress-traffic-control-in-istio-part-3/>Istio 中安全管控出口流量,第三部分</a></li><li role=none><a role=treeitem title="使用 Istio 的出口流量管控来阻止相关出口流量攻击。 (2019年7月10日)" href=/v1.5/zh/blog/2019/egress-traffic-control-in-istio-part-2/>Istio 中的安全管控出口流量,第二部分</a></li><li role=none><a role=treeitem title="评估 Istio 数据平面性能的工具和指南。 (2019年7月9日)" href=/v1.5/zh/blog/2019/performance-best-practices/>最佳实践:Service Mesh 基准性能测试</a></li><li role=none><a role=treeitem title="了解如何延长 Istio 自签名根证书的有效期。 (2019年6月7日)" href=/v1.5/zh/blog/2019/root-transition/>延长 Istio 自签名根证书的有效期</a></li><li role=none><a role=treeitem title="涉及出口流量攻击和出口流量管控要求。 (2019年5月22日)" href=/v1.5/zh/blog/2019/egress-traffic-control-in-istio-part-1/>Istio 中的安全管控出口流量,第一部分</a></li><li role=none><a role=treeitem title="Istio 1.1 性能概览。 (2019年3月19日)" href=/v1.5/zh/blog/2019/istio1.1_perf/>为性能而设计的 Istio 1.1</a></li><li role=none><a role=treeitem title="在多集群服务网格环境中配置 Istio 的路由规则。 (2019年2月7日)" href=/v1.5/zh/blog/2019/multicluster-version-routing/>多集群服务网格中的分版本路由</a></li><li role=none><a role=treeitem title="宣布新的博客策略。 (2019年2月5日)" href=/v1.5/zh/blog/2019/sail-the-blog/>博客策略更新!</a></li><li role=none><a role=treeitem title="揭秘 Istio 是如何将其数据平面组件添加到现有 deployment。 (2019年1月31日)" href=/v1.5/zh/blog/2019/data-plane-setup/>揭开 Istio Sidecar 注入模型的神秘面纱</a></li><li role=none><a role=treeitem title="评估加入 Egress gateway 对性能造成的影响。 (2019年1月31日)" href=/v1.5/zh/blog/2019/egress-performance/>Egress gateway 性能测试</a></li><li role=none><a role=treeitem title="使用 AppSwitch 解决应用程序启动顺序和启动延迟。 (2019年1月14日)" href=/v1.5/zh/blog/2019/appswitch/>使用 AppSwitch 进行 Sidestepping 依赖性排序</a></li><li role=none><a role=treeitem title="Istio 有了一个新的论坛。 (2019年1月10日)" href=/v1.5/zh/blog/2019/announcing-discuss.istio.io/>Istio 论坛成立</a></li><li role=none><a role=treeitem title="如何使用 cert-manager 手工部署一个自定义 Ingress 网关。 (2019年1月10日)" href=/v1.5/zh/blog/2019/custom-ingress-gateway/>使用 Cert-Manager 部署一个自定义 Ingress 网关</a></li></ul></div></div><div class=card><button class="header dynamic" id=card2 title="2018 年的博客文章。" aria-controls=card2-body><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#blog"/></svg>2018 年的博客文章</button><div class=body aria-labelledby=card2 role=region id=card2-body><ul role=tree aria-expanded=true class=leaf-section aria-labelledby=card2><li role=none><a role=treeitem title="如何在不部署 Sidecar 代理的情况下使用 Istio 进行流量管理。 (2018年11月21日)" href=/v1.5/zh/blog/2018/incremental-traffic-management/>增量式应用 Istio 第一部分,流量管理</a></li><li role=none><a role=treeitem title="描述了一个基于 Istio 的 Bookinfo 示例的简单场景。 (2018年11月16日)" href=/v1.5/zh/blog/2018/egress-mongo/>使用外部 MongoDB 服务</a></li><li role=none><a role=treeitem title="Istio 在 Twitch 举办了为期一天的直播庆祝 1.0 的发布。 (2018年8月3日)" href=/v1.5/zh/blog/2018/istio-twitch-stream/>Istio 在 Twitch 上全天直播</a></li><li role=none><a role=treeitem title="惠普如何在 Istio 上构建其下一代鞋类个性化平台。 (2018年7月31日)" href=/v1.5/zh/blog/2018/hp/>Istio 是惠普 FitStation 平台的改变者</a></li><li role=none><a role=treeitem title="使用 AppSwitch 自动接入应用并降低延迟。 (2018年7月30日)" href=/v1.5/zh/blog/2018/delayering-istio/>使用 AppSwitch 精简 Istio 层次</a></li><li role=none><a role=treeitem title="描述 Istio 的授权功能以及如何在各种用例中使用它。 (2018年7月20日)" href=/v1.5/zh/blog/2018/istio-authorization/>基于 Istio 授权的 Micro-Segmentation</a></li><li role=none><a role=treeitem title="如何通过 Stackdriver 将 Istio 访问日志导出到 BigQuery、GCS、Pub/Sub 等不同的接收器。 (2018年7月9日)" href=/v1.5/zh/blog/2018/export-logs-through-stackdriver/>通过 Stackdriver 将日志导出到 BigQuery、GCS、Pub/Sub</a></li><li role=none><a role=treeitem title="描述如何配置 Istio 进行 HTTP Egress 流量监控和访问策略。 (2018年6月22日)" href=/v1.5/zh/blog/2018/egress-monitoring-access-control/>HTTP Egress 流量监控和访问策略</a></li><li role=none><a role=treeitem title="Istio v1alpha3 路由 API 介绍, 动机及其设计原则。 (2018年4月25日)" href=/v1.5/zh/blog/2018/v1alpha3-routing/>Istio v1aplha3 路由 API 介绍</a></li><li role=none><a role=treeitem title="描述如何在 AWS 上使用网络负载均衡器配置 Istio Ingress。 (2018年4月20日)" href=/v1.5/zh/blog/2018/aws-nlb/>使用 AWS NLB 配置 Istio Ingress</a></li><li role=none><a role=treeitem title="使用 Kubernetes 命名空间和 RBAC 为 Istio 构建软性多租户环境。 (2018年4月19日)" href=/v1.5/zh/blog/2018/soft-multitenancy/>Istio 的软性多租户支持</a></li><li role=none><a role=treeitem title="介绍更安全,低风险的部署和发布到生产。 (2018年2月8日)" href=/v1.5/zh/blog/2018/traffic-mirroring/>用于在生产环境进行测试的 Istio 流量镜像功能</a></li><li role=none><a role=treeitem title="描述基于 Istio 的 Bookinfo 示例的简单场景。 (2018年2月6日)" href=/v1.5/zh/blog/2018/egress-tcp/>使用外部 TCP 服务</a></li><li role=none><a role=treeitem title="描述基于 Istio Bookinfo 示例的简单场景。 (2018年1月31日)" href=/v1.5/zh/blog/2018/egress-https/>使用外部 Web 服务</a></li></ul></div></div><div class=card><button class="header dynamic" id=card3 title="2017 年的博客文章。" aria-controls=card3-body><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#blog"/></svg>2017 年的博客文章</button><div class=body aria-labelledby=card3 role=region id=card3-body><ul role=tree aria-expanded=true class=leaf-section aria-labelledby=card3><li role=none><a role=treeitem title="提高可用,降低延迟。 (2017年12月7日)" href=/v1.5/zh/blog/2017/mixer-spof-myth/>Mixer 和 SPOF 神话</a></li><li role=none><a role=treeitem title="概要说明 Mixer 的插件架构。 (2017年11月3日)" href=/v1.5/zh/blog/2017/adapter-model/>Mixer 适配器模型</a></li><li role=none><a role=treeitem title="Istio 的策略如何关联 Kubernetes 的网络策略 。 (2017年8月10日)" href=/v1.5/zh/blog/2017/0.1-using-network-policy/>Istio 使用网络策略</a></li><li role=none><a role=treeitem title="使用 Istio 创建自动缩放的金丝雀部署。 (2017年6月14日)" href=/v1.5/zh/blog/2017/0.1-canary/>使用 Istio 进行金丝雀部署</a></li><li role=none><a role=treeitem title="Istio Auth 0.1 公告。 (2017年5月25日)" href=/v1.5/zh/blog/2017/0.1-auth/>使用 Istio 增强端到端安全</a></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.5/img/icons.svg#pull"/></svg></button><nav aria-label=Breadcrumb><ol><li><a href=/v1.5/zh/ title=用于连接、保护、控制和观测服务。>Istio</a></li><li><a href=/v1.5/zh/blog/ title="关于使用 Istio 的博客文章。">博客</a></li><li><a href=/v1.5/zh/blog/2019/ title="2019 年的博客文章。">2019 年的博客文章</a></li><li>Istio v1beta1 授权策略概述</li></ol></nav><article aria-labelledby=title><div class=title-area><div style=width:100%><h1 id=title>Istio v1beta1 授权策略概述</h1><p class=byline><span>作者</span>
|
||
<span class=attribution>Yangmin Zhu (Google)</span><span> | </span><span><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#calendar"/></svg><span> </span>2019年11月14日</span><span> | </span><span title="810 字"><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#clock"/></svg><span> </span>阅读大约需要 4 分钟</span></p></div></div><nav class=toc-inlined aria-label="Table of Contents"><div><hr><ol><li role=none aria-label=背景><a href=#background>背景</a><li role=none aria-label=设计目标><a href=#design-goals>设计目标</a><li role=none aria-label=AuthorizationPolicy><a href=#authorization-policy><code>AuthorizationPolicy</code></a><ol><li role=none aria-label=示例><a href=#example>示例</a><li role=none aria-label=工作负载选择器><a href=#workload-selector>工作负载选择器</a><li role=none aria-label=根命名空间><a href=#root-namespace>根命名空间</a><li role=none aria-label="Ingress/Egress 网关支持"><a href=#ingress-egress-gateway-support>Ingress/Egress 网关支持</a><li role=none aria-label=比较><a href=#comparison>比较</a><ol><li role=none aria-label=特性><a href=#feature>特性</a><li role=none aria-label=ClusterRbacConfig><a href=#clusterrbacconfig><code>ClusterRbacConfig</code></a><li role=none aria-label=ServiceRole><a href=#servicerole><code>ServiceRole</code></a><li role=none aria-label=ServiceRoleBinding><a href=#servicerolebinding><code>ServiceRoleBinding</code></a></ol></li></ol></li><li role=none aria-label="未来的 v1alpha1 策略"><a href=#future-of-the-v1alpha1-policy>未来的 <code>v1alpha1</code> 策略</a><li role=none aria-label="从 v1alpha1 策略迁移"><a href=#migration-from-the-v1alpha1-policy>从 <code>v1alpha1</code> 策略迁移</a><ol><li role=none aria-label=一般准则><a href=#general-guideline>一般准则</a><li role=none aria-label=迁移示例><a href=#migration-example>迁移示例</a><li role=none aria-label=自动化迁移><a href=#automation-of-the-migration>自动化迁移</a></ol></li><li role=none aria-label=相关内容><a href=#see-also>相关内容</a></li></ol><hr></div></nav><div><aside class="callout warning"><div class=type><svg class="large-icon"><use xlink:href="/v1.5/img/icons.svg#callout-warning"/></svg></div><div class=content>该博客文章是在 Istio 1.4 的版本下编写的,因此其中某些内容现在可能已过时。</div></aside></div><p>Istio 1.4 引入了 <a href=/v1.5/zh/docs/reference/config/security/authorization-policy/><code>v1beta1</code> 授权策略</a>,这是对
|
||
以前 <code>v1alpha1</code> 的基于角色的访问控制(RBAC)策略的重要更新。包括以下改进:</p><ul><li>符合 Istio 配置模型。</li><li>通过简化 API 改善用户体验。</li><li>支持更多用例(例如,Ingress/Egress 网关支持),而不会增加复杂性。</li></ul><p>该 <code>v1beta1</code> 策略不向后兼容,需要一次转换。Istio 提供了一个工具来自动执行此过程。
|
||
Istio 1.6 以后将不再支持先前的配置资源 <code>ClusterRbacConfig</code>、<code>ServiceRole</code> 和 <code>ServiceRoleBinding</code>。</p><p>本文描述了新的 <code>v1beta1</code> 授权策略模型、设计目标和从 <code>v1alpha1</code> RBAC 策略的迁移。
|
||
有关 <code>v1beta1</code> 授权策略的详细说明,请参见 <a href=/v1.5/zh/docs/concepts/security/#authorization>authorization concept</a> 页面。</p><p>我们欢迎您在 <a href=https://discuss.istio.io/c/security>discuss.istio.io</a> 上反馈有关 <code>v1beta1</code> 授权策略的相关信息。</p><h2 id=background>背景</h2><p>迄今为止,Istio 提供了 RBAC 策略,以便使用 <code>ClusterRbacConfig</code>、<code>ServiceRole</code> 和 <code>ServiceRoleBinding</code> 配置资源
|
||
对 <span class=term data-title=Service data-body='<p>使用<a href="#service-name">服务名称</a>标识一组具有关联行为的服务<a href="#service-mesh">服务网格</a>,
|
||
并使用这些名称应用 Istio 策略(例如负载均衡和路由)。
|
||
服务通常由一个或多个<a href="#service-endpoint">服务 Endpoint</a> 实现,并且或许包含多个
|
||
<a href="#service-version">服务版本</a>。</p>'>服务</span> 实施访问控制。使用此 API,用户可以在网格级别、命名空间级别和服务级别强
|
||
制实施访问控制。与其他 RBAC 策略一样,Istio RBAC 使用相同的角色和绑定概念来授予身份权限。</p><p>尽管 Istio RBAC 一直稳定可靠的工作着,但我们还是发现了许多改进空间。</p><p>例如,用户错误地假定访问控制实施发生在服务级别,因为 <code>ServiceRole</code> 使用服务指定在何处应用策略,但是,策略实际上应用于
|
||
<span class=term data-title=Workload data-body='<p><a href="#operator">operators</a> 部署的二进制文件,用于提供服务网格应用的一些功能。
|
||
工作负载有自己的名称,命名空间,和唯一的 id。
|
||
这些属性可以通过下面的<a href="#attribute">属性</a>被策略配置和遥测配置使用:</p>
|
||
|
||
<ul>
|
||
<li><code>source.workload.name</code>, <code>source.workload.namespace</code>, <code>source.workload.uid</code></li>
|
||
<li><code>destination.workload.name</code>, <code>destination.workload.namespace</code>, <code>destination.workload.uid</code></li>
|
||
</ul>
|
||
|
||
<p>在 Kubernetes 环境中,一个工作负载通常对应一个 Kubernetes deployment,
|
||
并且一个<a href="#workload-instance">工作负载实例</a>对应一个独立的被 deployment 管理的 <a href="#pod">pod</a>。</p>'>工作负载</span>,该服务仅用于查找相应的工作负载。当多个服务引用相同的工作负载时,
|
||
这种细微差别非常重要。如果两个服务引用相同的工作负载,则服务 A 的 <code>ServiceRole</code> 也会影响服务 B,这可能会导致混淆和不
|
||
正确的配置。</p><p>另一个示例是,由于需要深入了解三个相关资源,用户很难维护和管理 Istio RBAC 配置。</p><h2 id=design-goals>设计目标</h2><p>新的 <code>v1beta1</code> 授权策略具有几个设计目标:</p><ul><li><p>与 <a href=https://goo.gl/x3STjD>Istio 配置模型</a>保持一致,以便更清楚地了解策略目标。
|
||
配置模型提供统一的配置层次结构、解决方案和目标选择。</p></li><li><p>通过简化 API 改善用户体验。管理一个包含所有访问控制规范的 CRD(自定义资源定义)比管理多个 CRD 更容易。</p></li><li><p>支持更多用例,而不会增加复杂性。例如,允许在 Ingress/Egress 网关上应用策略,以对进出网格的流量实施访问控制。</p></li></ul><h2 id=authorization-policy><code>AuthorizationPolicy</code></h2><p>通过 <a href=/v1.5/zh/docs/reference/config/security/authorization-policy/><code>AuthorizationPolicy</code> 自定义资源</a>启用对工作
|
||
负载的访问控制。本节介绍 <code>v1beta1</code> 授权策略中的变化。</p><p><code>AuthorizationPolicy</code> 包括 <code>selector</code> 和一个 <code>rule</code> 列表。<code>selector</code> 指定应用策略的工作负载,<code>rule</code> 列表指定工作
|
||
负载的详细访问控制规则。</p><p><code>rule</code> 是累加的,这意味着如果任何 <code>rule</code> 允许请求,则请求将被允许。每个 <code>rule</code> 都包含 <code>from</code>、<code>to</code> 和 <code>when</code> 的定义,
|
||
其指定了允许<strong>谁</strong>在哪些<strong>条件</strong>下执行哪些<strong>操作</strong>。</p><p><code>selector</code> 将替换 <code>ClusterRbacConfig</code> 和 <code>ServiceRole</code> 中的 <code>services</code> 字段提供的功能。
|
||
<code>rule</code> 将替换 <code>ServiceRoleBinding</code> 和 <code>ServiceRole</code> 中的其他字段。</p><h3 id=example>示例</h3><p>以下授权策略适用于 <code>foo</code> 命名空间中含有 <code>app: httpbin</code> 和 <code>version: v1</code> 标签的工作负载:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: security.istio.io/v1beta1
|
||
kind: AuthorizationPolicy
|
||
metadata:
|
||
name: httpbin
|
||
namespace: foo
|
||
spec:
|
||
selector:
|
||
matchLabels:
|
||
app: httpbin
|
||
version: v1
|
||
rules:
|
||
- from:
|
||
- source:
|
||
principals: ["cluster.local/ns/default/sa/sleep"]
|
||
to:
|
||
- operation:
|
||
methods: ["GET"]
|
||
when:
|
||
- key: request.headers[version]
|
||
values: ["v1", "v2"]
|
||
</code></pre><p>当来自 <code>cluster.local/ns/default/sa/sleep</code> 的请求头中包含值为 <code>v1</code> 或 <code>v2</code> 的 <code>version</code> 字段时,
|
||
该策略将允许其通过 <code>GET</code> 请求访问工作负载。默认情况下,任何与策略不匹配的请求都将被拒绝。</p><p>假设 <code>httpbin</code> 服务定义为:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: v1
|
||
kind: Service
|
||
metadata:
|
||
name: httpbin
|
||
namespace: foo
|
||
spec:
|
||
selector:
|
||
app: httpbin
|
||
version: v1
|
||
ports:
|
||
# omitted
|
||
</code></pre><p>如果要在 <code>v1alpha1</code> 中实现相同的目的,您需要配置三个资源:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: "rbac.istio.io/v1alpha1"
|
||
kind: ClusterRbacConfig
|
||
metadata:
|
||
name: default
|
||
spec:
|
||
mode: 'ON_WITH_INCLUSION'
|
||
inclusion:
|
||
services: ["httpbin.foo.svc.cluster.local"]
|
||
---
|
||
apiVersion: "rbac.istio.io/v1alpha1"
|
||
kind: ServiceRole
|
||
metadata:
|
||
name: httpbin
|
||
namespace: foo
|
||
spec:
|
||
rules:
|
||
- services: ["httpbin.foo.svc.cluster.local"]
|
||
methods: ["GET"]
|
||
constraints:
|
||
- key: request.headers[version]
|
||
values: ["v1", "v2"]
|
||
---
|
||
apiVersion: "rbac.istio.io/v1alpha1"
|
||
kind: ServiceRoleBinding
|
||
metadata:
|
||
name: httpbin
|
||
namespace: foo
|
||
spec:
|
||
subjects:
|
||
- user: "cluster.local/ns/default/sa/sleep"
|
||
roleRef:
|
||
kind: ServiceRole
|
||
name: "httpbin"
|
||
</code></pre><h3 id=workload-selector>工作负载选择器</h3><p><code>v1beta1</code> 授权策略中的一个主要更改是,它现在使用工作负载选择器指定应该在何处应用策略。
|
||
这与 <code>Gateway</code>、<code>Sidecar</code> 和 <code>EnvoyFilter</code> 配置中使用的工作负载选择器相同。</p><p>工作负载选择器显式的表明,策略是在工作负载(而不是服务)上应用和强制执行的。
|
||
如果策略适用于由多个不同服务使用的工作负载,则同一策略将影响所有不同服务的流量。</p><p>只需将 <code>selector</code> 留空,即可将策略应用于命名空间中的所有工作负载。以下策略适用于命名空间 <code>bar</code> 中的所有工作负载:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: security.istio.io/v1beta1
|
||
kind: AuthorizationPolicy
|
||
metadata:
|
||
name: policy
|
||
namespace: bar
|
||
spec:
|
||
rules:
|
||
# omitted
|
||
</code></pre><h3 id=root-namespace>根命名空间</h3><p>根命名空间中的策略应用于网格中每个命名空间中的所有工作负载。
|
||
根命名空间可在 <a href=/v1.5/zh/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig><code>MeshConfig</code></a> 中配置,
|
||
其默认值为 <code>istio-system</code>。</p><p>例如,您在 <code>istio-system</code> 命名空间中安装了 Istio,并在 <code>default</code> 和 <code>bookinfo</code> 命名空间中部署了工作负载。
|
||
把根命名空间从默认值更改为 <code>istio-config</code> 后,以下策略将应用于每个命名空间中的工作负载,
|
||
包括 <code>default</code>、<code>bookinfo</code> 和 <code>istio-system</code>:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: security.istio.io/v1beta1
|
||
kind: AuthorizationPolicy
|
||
metadata:
|
||
name: policy
|
||
namespace: istio-config
|
||
spec:
|
||
rules:
|
||
# omitted
|
||
</code></pre><h3 id=ingress-egress-gateway-support>Ingress/Egress 网关支持</h3><p><code>v1beta1</code> 授权策略也可以应用于 ingress/egress 网关,以对进入或离开网格的流量实施访问控制,
|
||
您只需更改 <code>selector</code> 即可选择入口或出口工作负载。</p><p>以下策略适用于具有 <code>app: istio-ingressgateway</code> 标签的工作负载:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: security.istio.io/v1beta1
|
||
kind: AuthorizationPolicy
|
||
metadata:
|
||
name: ingress
|
||
namespace: istio-system
|
||
spec:
|
||
selector:
|
||
matchLabels:
|
||
app: istio-ingressgateway
|
||
rules:
|
||
# omitted
|
||
</code></pre><p>请注意,授权策略仅适用于与策略相同的命名空间中的工作负载,除非在根命名空间中应用该策略:</p><ul><li><p>如果不更改根命名空间的默认值(即 <code>istio-system</code>),上述策略将应用于<strong>每个</strong>命名空间中
|
||
含有 <code>app: istio-ingressgateway</code> 标签的工作负载。</p></li><li><p>如果将根命名空间更改为其他值,则上述策略将<strong>仅适用</strong>于 <code>istio-system</code> 命名空间中
|
||
含有 <code>app: istio-ingressgateway</code> 标签的工作负载。</p></li></ul><h3 id=comparison>比较</h3><p>下表突出显示了旧的 <code>v1alpha1</code> RBAC 策略和新的 <code>v1beta1</code> 授权策略之间的主要区别。</p><h4 id=feature>特性</h4><table><thead><tr><th>特性</th><th><code>v1alpha1</code> RBAC 策略</th><th><code>v1beta1</code> 授权策略</th></tr></thead><tbody><tr><td>API 稳定性</td><td><code>alpha</code>:<strong>不</strong> 向后兼容</td><td><code>beta</code>:<strong>确保</strong>向后兼容</td></tr><tr><td>CRD 数量</td><td>三个:<code>ClusterRbacConfig</code>、<code>ServiceRole</code> 和 <code>ServiceRoleBinding</code></td><td>一个:<code>AuthorizationPolicy</code></td></tr><tr><td>策略目标</td><td><strong>service</strong></td><td><strong>workload</strong></td></tr><tr><td>默认拒绝行为</td><td>通过<strong>显式</strong>的配置 <code>ClusterRbacConfig</code> 启用</td><td><strong>隐式</strong>的通过 <code>AuthorizationPolicy</code> 启用</td></tr><tr><td>Ingress/Egress 网关支持</td><td>不支持</td><td>支持</td></tr><tr><td>策略中的 <code>"*"</code> 值</td><td>匹配所有内容(空和非空)</td><td>仅匹配非空内容</td></tr></tbody></table><p>下表显示了 <code>v1alpha1</code> 和 <code>v1beta1</code> API 之间的关系。</p><h4 id=clusterrbacconfig><code>ClusterRbacConfig</code></h4><table><thead><tr><th><code>ClusterRbacConfig.Mode</code></th><th><code>AuthorizationPolicy</code></th></tr></thead><tbody><tr><td><code>OFF</code></td><td>未应用策略</td></tr><tr><td><code>ON</code></td><td>在根命名空间中应用的全部拒绝策略</td></tr><tr><td><code>ON_WITH_INCLUSION</code></td><td>策略应用于 <code>ClusterRbacConfig</code> 中包含的命名空间或工作负载</td></tr><tr><td><code>ON_WITH_EXCLUSION</code></td><td>策略应用于 <code>ClusterRbacConfig</code> 中包含的命名空间或工作负载</td></tr></tbody></table><h4 id=servicerole><code>ServiceRole</code></h4><table><thead><tr><th><code>ServiceRole</code></th><th><code>AuthorizationPolicy</code></th></tr></thead><tbody><tr><td><code>services</code></td><td><code>selector</code></td></tr><tr><td><code>paths</code></td><td><code>to</code> 字段下的 <code>paths</code></td></tr><tr><td><code>methods</code></td><td><code>to</code> 字段下的 <code>methods</code></td></tr><tr><td>在约束中的 <code>destination.ip</code></td><td>不支持</td></tr><tr><td>在约束中的 <code>destination.port</code></td><td><code>to</code> 字段下的 <code>ports</code></td></tr><tr><td>在约束中的 <code>destination.labels</code></td><td><code>selector</code></td></tr><tr><td>在约束中的 <code>destination.namespace</code></td><td>替换为策略的命名空间,即元数据中的 <code>namespace</code></td></tr><tr><td>在约束中的 <code>destination.user</code></td><td>不支持</td></tr><tr><td>在约束中的 <code>experimental.envoy.filters</code></td><td><code>when</code> 字段下的 <code>experimental.envoy.filters</code></td></tr><tr><td>在约束中的 <code>request.headers</code></td><td><code>when</code> 字段下的 <code>request.headers</code></td></tr></tbody></table><h4 id=servicerolebinding><code>ServiceRoleBinding</code></h4><table><thead><tr><th><code>ServiceRoleBinding</code></th><th><code>AuthorizationPolicy</code></th></tr></thead><tbody><tr><td><code>user</code></td><td><code>from</code> 字段下的 <code>principals</code></td></tr><tr><td><code>group</code></td><td><code>to</code> 字段下的 <code>paths</code></td></tr><tr><td><code>source.ip</code> 属性</td><td><code>from</code> 字段下的 <code>ipBlocks</code></td></tr><tr><td><code>source.namespace</code> 属性</td><td><code>from</code> 字段下的 <code>namespaces</code></td></tr><tr><td><code>source.principal</code> 属性</td><td><code>from</code> 字段下的 <code>principals</code></td></tr><tr><td><code>request.headers</code> 属性</td><td><code>when</code> 字段下的 <code>request.headers</code></td></tr><tr><td><code>request.auth.principal</code> 属性</td><td><code>from</code> 字段下的 <code>requestPrincipals</code> 或 <code>when</code> 字段下的 <code>request.auth.principal</code></td></tr><tr><td><code>request.auth.audiences</code> 属性</td><td><code>when</code> 字段下的 <code>request.auth.audiences</code></td></tr><tr><td><code>request.auth.presenter</code> 属性</td><td><code>when</code> 字段下的 <code>request.auth.presenter</code></td></tr><tr><td><code>request.auth.claims</code> 属性</td><td><code>when</code> 字段下的 <code>request.auth.claims</code></td></tr></tbody></table><p>除了所有差异之外,与 <code>v1alpha1</code> 类似,<code>v1beta1</code> 策略也由 Envoy 引擎强制执行,并支持同样的身份验证(双向 TLS 或 JWT)、条件和其他基元(如 IP、端口等)。</p><h2 id=future-of-the-v1alpha1-policy>未来的 <code>v1alpha1</code> 策略</h2><p><code>v1alpha1</code> RBAC 策略(<code>ClusterRbacConfig</code>、<code>ServiceRole</code> 和 <code>ServiceRoleBinding</code>)将被 <code>v1beta1</code> 授权策略替代并弃用。</p><p>Istio 1.4 继续支持 <code>v1alpha1</code> RBAC 策略,以便使您有足够的时间完成迁移。</p><h2 id=migration-from-the-v1alpha1-policy>从 <code>v1alpha1</code> 策略迁移</h2><p>对于给定的工作负载,Istio 仅支持两个版本之一:</p><ul><li>如果仅为工作负载配置 <code>v1beta1</code> 策略,则 <code>v1beta1</code> 策略生效。</li><li>如果仅为工作负载配置 <code>v1alpha1</code> 策略,则 <code>v1alpha1</code> 策略生效。</li><li>如果同时为工作负载配置 <code>v1beta1</code> 和 <code>v1alpha1</code> 策略,则仅 <code>v1beta1</code> 策略生效,<code>v1alpha1</code> 策略将被忽略。</li></ul><h3 id=general-guideline>一般准则</h3><div><aside class="callout warning"><div class=type><svg class="large-icon"><use xlink:href="/v1.5/img/icons.svg#callout-warning"/></svg></div><div class=content>迁移时,对给定工作负载使用 <code>v1beta1</code> 策略时,请确保新的 <code>v1beta1</code> 策略涵盖应用于工作负载的所有现有 <code>v1alpha1</code> 策略,
|
||
因为在应用 <code>v1beta1</code> 后,将忽略应用于工作负载的 <code>v1alpha1</code> 策略。</div></aside></div><p>迁移到 <code>v1beta1</code> 策略的典型流程是首先检查 <code>ClusterRbacConfig</code>,以确定哪些命名空间或服务启用了 RBAC。</p><p>对于启用了 RBAC 的每个服务:</p><ol><li>从服务定义中获取工作负载选择器。</li><li>使用工作负载选择器创建一个 <code>v1beta1</code> 策略。</li><li>根据应用与服务的每个 <code>ServiceRole</code> 和 <code>ServiceRoleBinding</code> 更新 <code>v1beta1</code> 策略。</li><li>应用该 <code>v1beta1</code> 策略并监视流量,以确保该策略按预期工作。</li><li>对启用了 RBAC 的下一个服务重复该过程。</li></ol><p>对于启用了 RBAC 的每个命名空间:</p><ol><li>把拒绝所有流量的 <code>v1beta1</code> 策略应用到给定的命名空间。</li></ol><h3 id=migration-example>迁移示例</h3><p>假设在 <code>foo</code> 命名空间中您有以下 <code>v1alpha1</code> 策略用于 <code>httpbin</code> 服务:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: "rbac.istio.io/v1alpha1"
|
||
kind: ClusterRbacConfig
|
||
metadata:
|
||
name: default
|
||
spec:
|
||
mode: 'ON_WITH_INCLUSION'
|
||
inclusion:
|
||
namespaces: ["foo"]
|
||
---
|
||
apiVersion: "rbac.istio.io/v1alpha1"
|
||
kind: ServiceRole
|
||
metadata:
|
||
name: httpbin
|
||
namespace: foo
|
||
spec:
|
||
rules:
|
||
- services: ["httpbin.foo.svc.cluster.local"]
|
||
methods: ["GET"]
|
||
---
|
||
apiVersion: "rbac.istio.io/v1alpha1"
|
||
kind: ServiceRoleBinding
|
||
metadata:
|
||
name: httpbin
|
||
namespace: foo
|
||
spec:
|
||
subjects:
|
||
- user: "cluster.local/ns/default/sa/sleep"
|
||
roleRef:
|
||
kind: ServiceRole
|
||
name: "httpbin"
|
||
</code></pre><p>以下述方式将上面的策略迁移到 <code>v1beta1</code>:</p><ol><li><p>假设 <code>httpbin</code> 服务具有以下工作负载选择器:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>selector:
|
||
app: httpbin
|
||
version: v1
|
||
</code></pre></li><li><p>通过工作负载创建 <code>v1beta1</code> 策略:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: security.istio.io/v1beta1
|
||
kind: AuthorizationPolicy
|
||
metadata:
|
||
name: httpbin
|
||
namespace: foo
|
||
spec:
|
||
selector:
|
||
matchLabels:
|
||
app: httpbin
|
||
version: v1
|
||
</code></pre></li><li><p>根据服务所应用的 <code>ServiceRole</code> 和 <code>ServiceRoleBinding</code> 更新 <code>v1beta1</code> 策略:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: security.istio.io/v1beta1
|
||
kind: AuthorizationPolicy
|
||
metadata:
|
||
name: httpbin
|
||
namespace: foo
|
||
spec:
|
||
selector:
|
||
matchLabels:
|
||
app: httpbin
|
||
version: v1
|
||
rules:
|
||
- from:
|
||
- source:
|
||
principals: ["cluster.local/ns/default/sa/sleep"]
|
||
to:
|
||
- operation:
|
||
methods: ["GET"]
|
||
</code></pre></li><li><p>应用 <code>v1beta1</code> 策略并监视流量,以确保该策略按预期工作。</p></li><li><p>应用下面的 <code>v1beta1</code> 策略,该策略拒绝所有到达 <code>foo</code> 命名空间的流量,因为命名空间 <code>foo</code> 启用了 RBAC:</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: security.istio.io/v1beta1
|
||
kind: AuthorizationPolicy
|
||
metadata:
|
||
name: deny-all
|
||
namespace: foo
|
||
spec:
|
||
{}
|
||
</code></pre></li></ol><p>确保 <code>v1beta1</code> 策略按预期工作,然后可以从集群中删除 <code>v1alpha1</code> 策略。</p><h3 id=automation-of-the-migration>自动化迁移</h3><p>为了帮助简化迁移,可通 <code>istioctl experimental authz convert</code> 转换命令自动将 <code>v1alpha1</code> 策略
|
||
转换为 <code>v1beta1</code> 策略。</p><p>迁移时您可以考虑该命令,但它在 Istio 1.4 中是实验性的,并且截至此博客文章发布,其还不能够完整支持 v1alpha1 的全部语义。</p><p>支持完整 v1alpha1 语义的命令预计在 Istio 1.4 之后的修补程序版本中发布。</p><nav id=see-also><h2>相关内容</h2><div class=see-also><div class=entry><p class=link><a data-skipendnotes=true href=/v1.5/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.5/zh/docs/tasks/security/authorization/authz-http/>HTTP 流量授权</a></p><p class=desc>展示如何设置基于角色的 HTTP 流量访问控制。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.5/zh/docs/tasks/security/authorization/authz-tcp/>TCP 流量的授权</a></p><p class=desc>展示如何设置 TCP 流量的访问控制。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.5/zh/docs/tasks/security/authorization/rbac-groups/>基于组和列表声明的授权</a></p><p class=desc>有关如何在 Istio 中配置基于组的授权和列表类型声明的授权的教程。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.5/zh/docs/concepts/security/>安全</a></p><p class=desc>描述 Istio 的授权与认证功能。</p></div><div class=entry><p class=link><a data-skipendnotes=true href=/v1.5/zh/docs/tasks/security/authorization/authz-td-migration/>授权策略信任域迁移</a></p><p class=desc>阐述如何在不更改授权策略的前提下从一个信任域迁移到另一个。</p></div></div></nav></article><nav class=pagenav><div class=left><a title="关于 Istio 基于 operator 的安装和控制平面管理特性的介绍。" href=/v1.5/zh/blog/2019/introducing-istio-operator/><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#left-arrow"/></svg>Istio Operator 简介</a></div><div class=right><a title="通过分析 Istio 配置来发现潜在问题和一般问题。" href=/v1.5/zh/blog/2019/introducing-istioctl-analyze/>istioctl analyze 介绍<svg class="icon"><use xlink:href="/v1.5/img/icons.svg#right-arrow"/></svg></a></div></nav><div id=feedback><div id=feedback-initial>这些信息有用吗?<br><button class="btn feedback" onclick="sendFeedback('zh',1)">是的</button>
|
||
<button class="btn feedback" onclick="sendFeedback('zh',0)">没有</button></div><div id=feedback-comment>Do you have any suggestions for improvement?<br><br><input id=feedback-textbox type=text placeholder="Help us improve..." data-lang=zh></div><div id=feedback-thankyou>Thanks for your feedback!</div></div><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=#background>背景</a><li role=none aria-label=设计目标><a href=#design-goals>设计目标</a><li role=none aria-label=AuthorizationPolicy><a href=#authorization-policy><code>AuthorizationPolicy</code></a><ol><li role=none aria-label=示例><a href=#example>示例</a><li role=none aria-label=工作负载选择器><a href=#workload-selector>工作负载选择器</a><li role=none aria-label=根命名空间><a href=#root-namespace>根命名空间</a><li role=none aria-label="Ingress/Egress 网关支持"><a href=#ingress-egress-gateway-support>Ingress/Egress 网关支持</a><li role=none aria-label=比较><a href=#comparison>比较</a><ol><li role=none aria-label=特性><a href=#feature>特性</a><li role=none aria-label=ClusterRbacConfig><a href=#clusterrbacconfig><code>ClusterRbacConfig</code></a><li role=none aria-label=ServiceRole><a href=#servicerole><code>ServiceRole</code></a><li role=none aria-label=ServiceRoleBinding><a href=#servicerolebinding><code>ServiceRoleBinding</code></a></ol></li></ol></li><li role=none aria-label="未来的 v1alpha1 策略"><a href=#future-of-the-v1alpha1-policy>未来的 <code>v1alpha1</code> 策略</a><li role=none aria-label="从 v1alpha1 策略迁移"><a href=#migration-from-the-v1alpha1-policy>从 <code>v1alpha1</code> 策略迁移</a><ol><li role=none aria-label=一般准则><a href=#general-guideline>一般准则</a><li role=none aria-label=迁移示例><a href=#migration-example>迁移示例</a><li role=none aria-label=自动化迁移><a href=#automation-of-the-migration>自动化迁移</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="立刻下载 Istio 1.5.4" href=/v1.5/docs/setup/getting-started/#download aria-label="Download Istio"><span>download</span><svg class="icon"><use xlink:href="/v1.5/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.5/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.5/img/icons.svg#stackoverflow"/></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.5/img/icons.svg#slack"/></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.5/img/icons.svg#twitter"/></svg></a><div class=tag>对于用户</div></div><div class=info><p class=copyright>中文内容由 ServiceMesher 社区维护,部分文档可能稍微滞后于英文版本,同步工作持续进行中<br>Istio 归档
|
||
1.5.4<br>© 2020 Istio Authors, <a href=https://policies.google.com/privacy>隐私政策</a><br>归档于 2020年5月21日</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.5/img/icons.svg#github"/></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.5/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.5/img/icons.svg#working-groups"/></svg></a><div class=tag>对于开发者</div></div></footer><script src=https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js defer></script><div id=scroll-to-top-container aria-hidden=true><button id=scroll-to-top title=回到顶部><svg class="icon"><use xlink:href="/v1.5/img/icons.svg#top"/></svg></button></div></body></html> |