I am new in this field. Trying to implement lua filter with OPA [ open policy agent and istio ]
to implement a simple poc, i have created following following filter
############################################################
# Envoy External Authorization filter that will query OPA.
############################################################
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: ext-authz
namespace: istio-system
spec:
filters:
- insertPosition:
index: FIRST
listenerMatch:
listenerType: GATEWAY
listenerProtocol: HTTP
filterType: HTTP
filterName: envoy.lua
filterConfig:
inlineCode: |
function envoy_on_request(request_handle)
request_handle:logWarn("envoy_on_request")
end
function envoy_on_response(response_handle)
response_handle:logWarn("envoy_on_response")
response_handle:headers():add("x-this","It works")
end
---
When i am executing my api I am able to get the updated header value in output. [ seems lua filter is invoked in filter chain ]
but my problem is, i am not able to find the log “envoy_on_request” anywhere in the container logs.
need you suggestion to find the log…