External Authorization¶
This scenario demonstrates how Envoy's external authorization filter can be applied to an HttpRoute.
Context¶
We will use the Ext Authz service sample from the Istio distribution.
Deploy the service:
The contract¶
The service you just deployed will allow (200) any request bearing the header x-ext-authz: allow
.
The absence of the header, or the header with a value other than allow
will be denied (403).
Instructions¶
Make sure that the httpbin
service is deployed, and a simple route is defined from the gateway to the service.
Review the following security policy:
Apply the policy:
Send a test request:
curl -v -H "x-ext-authz: allow" http://httpbin.esuez.org/json --resolve httpbin.esuez.org:80:$GATEWAY_IP
The above request should succeed.
Absence of the header, or header value that is not "allow" will return a 403.