Extending OPA #335
-
I'm looking at https://www.openpolicyagent.org/docs/latest/extensions/, the examples are written in go, so that's the only supported language? Is this feature common and being used by many enterprise grade applications? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi Ronnie! Yes, since OPA itself is written in Go, that's what you'll need to use in order to extend it. Since OPA also comes with a Wasm runtime, we've talked about allowing extensions compiled to Wasm at some point in the future, which would allow you to write extensions in any language that compiles to Wasm. But we're not there yet. I would not say that I believe it's common to extend OPA with custom functionality in enterprise apps. Is there any particular plugin or builtin function you find missing? |
Beta Was this translation helpful? Give feedback.
-
Hi @anderseknert
I'm joining the office hour, will discuss more on these questions. Thank you! |
Beta Was this translation helpful? Give feedback.
Hi @anderseknert
1)
In this document “https://www.openpolicyagent.org/docs/latest/external-data/#option-5-pull-data-during-evaluation”
It says 'The ‘http.send’ built-in functions do not implement any retry logic.'
Does it mean that it may not be suitable for production workloads?
So I need to write my own custom built-in function and shouldn't use 'http.send'?
Do you use the custom built-in function to query the data in runtime?
This is an open source project example https://github.com/aserto-dev/topaz/tree/main/builtins/edge/ds
in the OPA document https://www.openpolicyagent.org/docs/latest/extensions/#custom-built-in-functions-in-go
It says ‘Custom built-in functions must not be use…