I am looking to use the OPA policy based authorization in my project. I can use the bundle server to push my polices and data.json files to backend server and can evaluate policies for backend. I am not able to find how can I do that for frontend as I need to show/hide content on frontend based on the policy decisions. I do not want to send the data.json along with policies as WASM as I don't think that is secure way as my data.json file has data about all other users in my system.
Can anyone please suggest (possibly with an example) on how to implement authorization for frontend and backend using the similar opa policies?