Currently, the SecurityPolicy does not support forwarding the ID token and using a different header name for the forwarded token. Our use case requires the forwarding of the ID token into a custom header. We can work around this through a custom Lua script that adds cookies to the DYNAMIC_METADATA and use a requestHeaderModifier in a HTTPRoute to add it to a header. However, it feels like this is something that the SecurityPolicy should be able to do as well.
For inspiration, check out how Gloo Gateway (the commercial 2.x is based on KGateway) is supporting this: https://docs.solo.io/gloo-edge/main/reference/api/github.com/solo-io/gloo/projects/gloo/api/v1/enterprise/options/extauth/v1/extauth.proto.sk/#headerconfiguration
Would be nice to have something similar in Envoy Gateway.