【问题标题】:Configuring EnvoyFilter in Istio for "set_current_client_cert_details"在 Istio 中为“set_current_client_cert_details”配置 EnvoyFilter
【发布时间】:2020-11-22 10:07:57
【问题描述】:

我有一个场景,我在 Istio Ingress Gateway 处终止 TLS 流量并将其转发到相应的服务。还设置了 mTls 和 ISTIO_MUTUAL。我需要验证在集群中调用我们的 Ingress-Gateway 时发送的客户端证书,并且我计划在需要将整个证书转发到我的服务代码的代码中执行此操作。

我尝试如下配置 EnvoyFilter:

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: xfcc-forward
  namespace: xfcc
spec:
  workloadSelector:
    labels:
      istio: ingressgateway
  configPatches:
  - applyTo: HTTP_FILTER
    match:
      context: GATEWAY
      listener:
        filterChain:
          sni: "*"
    patch:
      operation: MERGE
      value:
        set_current_client_cert_details:
            cert: true

申请时失败,我想可能是因为我没有正确配置它。有人可以帮助我为我的场景正确配置 EF。

【问题讨论】:

    标签: istio envoyproxy


    【解决方案1】:

    我想我的配置可以使用这个:

    apiVersion: networking.istio.io/v1alpha3
    kind: EnvoyFilter
    metadata:
      name: xfcc-forward
      namespace: xfcc
    spec:
      configPatches:
      - applyTo: NETWORK_FILTER
        match:
          context: GATEWAY
          listener:
            filterChain:
              filter:
                name: "envoy.http_connection_manager"
        patch:
          operation: MERGE
          value:
            typed_config:
              "@type": "type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager"
              forward_client_cert_details: ALWAYS_FORWARD_ONLY
              set_current_client_cert_details:
                subject: true
                cert: true
                chain: true
    

    我可以看到带有证书值的 XFCC 标头,但证书是 Citadel 为 mTls 传递的证书,而不是客户端在标头中发送的证书,我仍在查看。

    【讨论】:

      猜你喜欢
      • 2021-08-21
      • 2021-11-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-21
      • 2021-05-28
      • 2022-01-10
      • 2020-06-28
      相关资源
      最近更新 更多