# Configuring Consul with Envoy's JWTAuthentication

**URL:** <https://discuss.hashicorp.com/t/configuring-consul-with-envoys-jwtauthentication/45697>\
**Category:** Consul\
**Created:** [October 17, 2022, 10:37am UTC](https://discuss.hashicorp.com/t/configuring-consul-with-envoys-jwtauthentication/45697 "2022-10-17T10:37:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![acarrilho](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/acarrilho/32/31398_2.png) [@acarrilho](https://discuss.hashicorp.com/u/acarrilho)\
**Post date:** [October 17, 2022, 10:37am UTC](https://discuss.hashicorp.com/t/configuring-consul-with-envoys-jwtauthentication/45697/1 "2022-10-17T10:37:36Z")

</div>

I am trying to configure an Envoy Filter using Consul but it doesn’t seem to apply the configuration correctly.

```auto
apiVersion: consul.hashicorp.com/v1alpha1
kind: ProxyDefaults
metadata:
  name: global
spec:
  config:
    lua_filter:
      name: envoy.filters.http.lua
      typed_config:
        "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
        inline_code: |
          -- Called on the response path.
          function envoy_on_response(response_handle)
            response_handle:headers():add("x-custom-header", "Lua_Envoy_Filter")
            responde_handle:logError("Logging Hello")
          end

```

I then do kubectl apply -f proxydefaults\_lua.yaml and reploy the app. But when I make the request to the app endpoint I don’t see the log or the response header.

To note that the app still works (I don’t get any errors) but I am expecting the request to pass through the lua filter which doesn’t seem to be the case

---

<div class="post-metadata">

**Author:** ![acarrilho](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/acarrilho/32/31398_2.png) [@acarrilho](https://discuss.hashicorp.com/u/acarrilho)\
**Post date:** [October 27, 2022, 8:24am UTC](https://discuss.hashicorp.com/t/configuring-consul-with-envoys-jwtauthentication/45697/2 "2022-10-27T08:24:27Z")

</div>

Is anybody able to help with this?

---

<div class="post-metadata">

**Author:** ![blake](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/blake/32/27620_2.png) [@blake](https://discuss.hashicorp.com/u/blake)\
**Post date:** [August 8, 2023, 5:56pm UTC](https://discuss.hashicorp.com/t/configuring-consul-with-envoys-jwtauthentication/45697/3 "2023-08-08T17:56:51Z")

</div>

Consul 1.16 now supports Lua scripts via the [Lua Envoy extension](https://developer.hashicorp.com/consul/docs/connect/proxies/envoy-extensions/usage/lua).
