我在ISTIO中看到了EnvoyFilter的示例,其中grpc_service
作为外部服务调出的filterconfig受支持。
kind: EnvoyFilter
metadata:
name: ext-authz
namespace: istio-system
spec:
filters:
- insertPosition:
index: FIRST
listenerMatch:
listenerType: SIDECAR_INBOUND
listenerProtocol: HTTP
filterType: HTTP
filterName: "envoy.ext_authz"
filterConfig:
grpc_service:
google_grpc:
target_uri: 127.0.0.1:9191
stat_prefix: "ext_authz"
但是我想通过 http_service 而不是 grpc_service 将外部服务用作filterconfig,但每次遇到404 not found
错误时。
Istio的http_service
支持filterConfig
作为envoyFilter
吗?
版本信息:GKE为14,istio为1.1.17
答案 0 :(得分:1)
更新:修改了整个答案。
经过进一步的验证,似乎Istio过去拥有http_service
授权服务,但功能并不完整。
曾尝试为较旧版本的Istio实现外部HTTP服务授权,但是它确实起作用,唯一的解决方法是使用http lua过滤器或Nginx-Ingress Controller作为委托身份验证部分的Ingress Gateway。
以上所有情况均可在this github问题中找到。 HTTP调用成功,但是没有传递标头。
Here是将http_service
作为授权服务运行的另一种尝试。
您已经注意到Envoy 1.11.0
http_service
filterConfig
的{{3}}文档具有不同的语法。因此,我建议尝试从Envoy问题开始配置过滤器。如果它不起作用,请尝试使用http lua过滤器作为解决方法。
HTTP服务作为外部授权服务,在Istio文档中未提及,因此,可以肯定地说,它没有得到完全支持。