Hi,
I struggle with converting istio filter from istio version 1.2 to the new api for envoy filters from istio 1.3. However, I have some problems with that, maybe someone will be willing to help me and figure out what I did wrong. Everything applied correctly but traffic isn’t redirected to auth-service (with filter config from version 1.2 it works). Maybe I don’t need to convert this because there isn’t any info that the previous config will stop working soon?
config from istio 1.2
kind: EnvoyFilter
metadata:
name: edge-lua-filter
spec:
workloadLabels:
app: istio-ingressgateway
filters:
- listenerMatch:
listenerType: ANY
filterName: envoy.ext_authz
filterType: HTTP
filterConfig:
http_service:
server_uri:
uri: http://authorization-svc.default.svc.cluster.local:8080
cluster: outbound|8080||authorization-svc.default.svc.cluster.local
timeout: 5s
path_prefix: /authorization/validate
authorizationRequest:
allowedHeaders:
patterns:
- exact: "cookie"
authorizationResponse:
allowed_upstream_headers:
patterns:
- exact: "User-Id"
istio version 1.3
kind: EnvoyFilter
metadata:
name: ext-auth
namespace: default
spec:
workloadSelector:
labels:
app: istio-ingressgateway
configPatches:
- applyTo: HTTP_FILTER
match:
context: GATEWAY
listener:
filterChain:
filter:
name: "envoy.http_connection_manager"
subFilter:
name: "envoy.ext_authz"
patch:
operation: INSERT_BEFORE
value:
config:
http_service:
server_uri:
uri: http://authorization-svc.default.svc.cluster.local:8080
cluster: outbound|8080||authorization-svc.default.svc.cluster.local
timeout: 5s
path_prefix: /authorization/validate
authorizationRequest:
allowedHeaders:
patterns:
- exact: "cookie"
authorizationResponse:
allowed_upstream_headers:
patterns:
- exact: "User-Id"