Hi,
After KubeCon I got to fiddle around with the decision engine OPA. It is available as go binary and as wasm32-unknown-unknown wasm module. The Go binary offers the capability to send http requests via http.send.
In the wasm module the capability is not implemented.
The wasm module can be extended by host functions (https://github.com/open-policy-agent/npm-opa-wasm/blob/main/test/opa-custom-builtins.test.js#L47), but right now it is impossible to have async functions like Javascript Promises.
If I got the wasm component model right, it should be possible to:
Is that on a high level correct?
For async behavior, the typical solution is to have host functions implemented with callbacks.
Longer term, I'd expect OPA to support wasi and the outgoing-handler interface of wasi-http.
Last updated: Dec 23 2024 at 12:05 UTC