Check whether the opal-client has latest policy #148
-
Hi team, I am trying to know whether the opal-client has latest policy.
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @hongbo-miao, welcome back from vacaction :) You can either use the update callbacks feature or the healthcheck policy feature to achieve this. In essence: The healthcheck policy is special OPA policy that (if activated) is loaded into OPA as the system.opal rego package. This special policy can be used to make sure that OPA is ready to accept authorization queries, and than its state is not out of sync due to failed data updates. The update callback feature will trigger a callback (HTTP call to a configurable url) after every successful data update or policy update. It allows you to track which updates completed successfully and were correctly saved to OPA cache. Example configurationWe have an example docker compose configuration with healthcheck policy and callbacks already configured. Pointers for the example configuration:callbacksIf you replace the URL on line 55 of the config - you can hit your own server with update callbacks. healthcheck policyHealthcheck policy is also configured, check out the urls in lines 59-60 of the example config (OPA api urls you can hit to check the policy). |
Beta Was this translation helpful? Give feedback.
Hi @hongbo-miao, welcome back from vacaction :)
You can either use the update callbacks feature or the healthcheck policy feature to achieve this.
Go over this document which explains about both of these features.
In essence:
The healthcheck policy is special OPA policy that (if activated) is loaded into OPA as the system.opal rego package. This special policy can be used to make sure that OPA is ready to accept authorization queries, and than its state is not out of sync due to failed data updates.
The update callback feature will trigger a callback (HTTP call to a configurable url) after every successful data update or policy update. It allows you to track which updates completed succes…