Envoy-authz is a middleware of Envoy which performs external authorization through casbin. This proxy would be deployed on any type of envoy-based service meshes like Istio.
go get github.com/casbin/envoy-authz
The grpc server is based on protocol buffer from external_auth.proto.
You can verify/test your policies on online casbin-editor.
$ go build . $ ./authz
$ envoy -c authz.yaml -l info
Once the envoy starts, it will start intercepting requests for the authorization process.
You need to send custom headers, which would contain usernames in the JWT token OF headers for this middleware to work. You can check the official Istio docs to get more info on modifying Request Headers.
In case of any query, you can ask on our Discord.