Run Kong plugin before the match in HTTPRoute is done

Is it possible to run an auth plugin for all routes (global) and use a generated header to find the correct path from a HTTPRoute CRD.

Specifically, I want to run a custom auth plugin to validate a token via IdP and on this basis set a custom HTTP header containing the user’s roles. The route should be selected based on the HTTP header, path and the method. (matches[].headers, a field in the new Kubernetes Gateway API).

This would give me the possibility that the teams managing the HTTPRoute could also define which role is required for this route.

@hbagdi Maybe you have an idea or an approach how I could do it?