Technically, the integration works similarly to the Envoy setup by utilizing the External Authorization filter. This can be implemented in two ways:
via HTTP
via gRPC (recommended)
In both approaches, the filter sends a request to an external gRPC or HTTP service (in this case, heimdall) to determine if the incoming HTTP request is authorized. If heimdall responds with a 2xx
status code, the request is forwarded to the upstream service. Otherwise, heimdall’s response is returned to the caller.
For Istio, this integration involves configuring an envoyExtAuthzHttp
or envoyExtAuthzGrpc
ExtensionProvider for heimdall in the mesh configuration. The configured extension can then be enabled via an AuthorizationPolicy
resource. Depending on its definition, heimdall can be used globally for all requests served through a particular gateway, or selectively for specific requests only.
The sections below explain how to achieve this for Istio’s Ingress Gateway, as well as using the Kubernetes Gateway API.
| This guide assumes that Istio and heimdall are installed in the same cluster. If they are not, you will need to register heimdall in Istio’s internal service registry using a ServiceEntry resource. |