hexa-org / policy-opa

Supports integration of Hexa IDQL Policy into OPA environments
Apache License 2.0
3 stars 1 forks source link

HexaBundleServer - Implement Etag Support and HTTP Long Polling #27

Open independentid opened 1 month ago

independentid commented 1 month ago

When HexaOpa and HexaBundleServer are deployed in the cloud, the polling cycle currently used for testing and demo purposes may be costly to run (loading files every 30 seconds).

OPA Supports ETAG processing which means, OPA will use the HTTP "if-none-match" header to request that bundles only be returned if the etag value has changed (returns 304 not modified).

Additionally HTTP Long Polling allows for HexaOPA to be updated in real time allowing OPA servers to hold open a request that responds only when a new bundle is available.

See: https://www.openpolicyagent.org/docs/latest/management-bundles/