https://github.com/dio/envoy-lua-opa
Simple example of calling OPA from Envoy's Lua httpCall() API
https://github.com/dio/envoy-lua-opa
Last synced: 5 months ago
JSON representation
Simple example of calling OPA from Envoy's Lua httpCall() API
- Host: GitHub
- URL: https://github.com/dio/envoy-lua-opa
- Owner: dio
- Created: 2020-07-25T08:29:44.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-25T08:30:08.000Z (almost 6 years ago)
- Last Synced: 2025-08-03T06:37:48.237Z (11 months ago)
- Language: Open Policy Agent
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Call OPA endpoint from Envoy's Lua `httpCall()` API
Client calls envoy, will be intercepted by Lua Filter, in which calls OAP service, then the request
is forwarded to google.com.
```
client -> envoy -- via httpCall() --> opa
\-- google.com
```
```
$ docker-compose up -d
$ ./feed-opa.sh
... response from google.com ...
$ docker-compose logs envoy | tail -1
envoy_1 | [2020-07-25 08:21:58.550][21][info][lua] [source/extensions/filters/http/lua/lua_filter.cc:705] script log: {"decision_id":"3664a035-7b76-42b7-b579-56bdec716a30","result":{"allow":false,"subordinates":{"alice":[],"betty":["charlie"],"bob":["alice"],"charlie":[]}}}
```