Hey folks! We're looking into Cerbos Hub and lovin...
# help
t
Hey folks! We're looking into Cerbos Hub and loving the decentralised nature of authz. We have an extensive set of Cloudflare Workers and would love to deploy the PDP there but I note that it seems unsupported at the moment. Looking at the history, it was on the TODO in April. Has this moved any further? The primary issue is that Cloudflare Workers does not support WebAssembly.instantiateStreaming or
fetch
in the global scope and the
@cerbos/embeded
SDK requires this. I have got it working by bundling the wasm in the app and making a small (breaking) patch to the SDK but it would be nice to have a slicker deployment strategy. I'm happy to help
I threw an issue on Github with some more detail https://github.com/cerbos/cerbos-sdk-javascript/issues/1010
a
Hi Tom! Thanks for the detailed issue. I've implemented your suggestion, and will release that shortly. Webhooks to notify you of new builds is on our roadmap (but not imminently, at the moment). As far as a slicker deployment strategy is concerned, what would that look like to you? Is it just a case of having that webhook so you can update your workers with the new WASM automatically? Or is there a better way we could be supporting your use case?
t
This is great thank you! Webhooks would give the most flexibility for sure We're not using Github but I can see benefits of having a maintained Github Action which did the hard work for you of updating the bundle and deploying the script 🤷‍♂️ The only way I can see it being slicker is if Cerbos Hub was able to build and deploy the worker on our behalf. This worker would then expose the APIs from the embedded PDP over HTTP and/or RPC (which is how we will be implementing it) This could work similarly for other edge function providers like Cloudflare, Vercel, Netlify, Supabase etc But this comes with trade offs. Most notably, it means giving a SasS provider tokens to read and deploy our scripts
I'll have a think on it, and let you know if I come up with any more ideas
🙇🏼‍♂️ 1