使用ISTIO的信任链内部和外部运行网格的服务之间的MTL

发布于 2025-02-13 18:48:38 字数 914 浏览 0 评论 0原文

我知道我可以为其城堡组件配置Istio,以使用我提供的root X509证书 +私钥。我可以以一种还使用相同的根来扩展此系统,以向在同一K8S群集中运行的旧工作负载发布证书,然后配置目标规则以从网格内部访问这些工作负载?类似:

---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: originate-mtls
spec:
  host: mymtls-app.legacy.svc.cluster.local
  trafficPolicy:
    portLevelSettings:
    - port:
        number: 8443
      tls:
        mode: ISTIO_MUTUAL
        sni: mymtls-app.legacy.svc.cluster.local

以上可以工作吗?除上述内容以外,我还需要其他配置吗?我可能无法运行Spiffe/Spire来管理网格外工作负载的证书 - 这使Spiffe -FeDeration解决方案像这样对我来说有点遥不可及。但这在任何情况下似乎也不是完全支持的机制。

我已经能够使用单独的证书层次结构来配置MTL,我必须通过秘密注入该层次结构并将其安装到有问题的Pods/SideCars中(图解了在这里)。

I understand that I can configure Istio for its Citadel component to use a root x509 certificate + private key that I provide. Can I extend this system in a way that I also use the same root to issue certificates to legacy workloads running in the same k8s cluster, and then configure a destination rule to access these workloads from inside the mesh? Something like:

---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: originate-mtls
spec:
  host: mymtls-app.legacy.svc.cluster.local
  trafficPolicy:
    portLevelSettings:
    - port:
        number: 8443
      tls:
        mode: ISTIO_MUTUAL
        sni: mymtls-app.legacy.svc.cluster.local

Can the above work? Do I need any additional configuration besides the above? I may not be in a position to run spiffe / spire to manage the certificates for workloads outside the mesh - which puts a spiffe-federation solution like this somewhat out of reach for me. But this also doesn't seem like a fully supported mechanism in any case.

I have been able to configure mTLS using a separate certificate hierarchy which I have to inject via secrets and mount into the pods / sidecars in question (illustrated here).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文