I am using Envoy's JWT authentication HTTP filter, and it works fine when no Lua filters are placed before it. However, if I place a Lua filter before the JWT auth filter, I get the following error:
"response": {
"upstream-service-time": null,
"flags": "-",
"code": 401,
"details": "jwt_authn_access_denied{Jwt_issuer_is_not_configured}",
"duration": 7
}
- name: envoy.filters.http.lua
typed_config:
"@type": type.googleapis/envoy.extensions.filters.http.lua.v3.Lua
inline_code: |
function envoy_on_request(handle)
-- Log Authorization Headers
local auth_header = handle:headers():get("Authorization")
if auth_header then
handle:logInfo("Authorization Header: " .. auth_header)
else
handle:logInfo("Authorization Header: MISSING")
end
end
- name: envoy.filters.http.jwt_authn
typed_config:
"@type": type.googleapis/envoy.extensions.filters.http.jwt_authn.v3.JwtAuthentication
providers:
aws-cognito-jwt:
clear_route_cache: true