API key based authorization

How can I do the api key in uri based authorization in Istio?
For example:
Allow requests with the specific api_key value
https://example.com/service?api_key=abcdef12345

this is a very insecure method of authorization and is not supported by Istio. If you would like to support something like this you would probably have to write a LUA filter to parse the key and potentially call another service to validate it.