You observe high response times (latency) for the ####/v1/AuthPolicies/download API. Monitoring tools may show significant gaps or delays between sequential database calls during policy generation.
The latency you see between database calls is due to an intentional Rego validation step introduced in the 4.0 release.
All policies in the platform are represented in Rego format, which is a native, declarative query language used to write policies as code. During backend policy generation, the system performs a validation re-check between database calls to ensure that only valid policies are included in the policy bundle.
This safeguard prevents invalid Rego—which could result from an accidentally misconfigured policy—from being included in the bundle. If invalid Rego were included, it could cause the entire policy bundle to fail to load. This check ensures invalid policies are isolated and excluded while the remaining valid policies continue to function.
You can safely ignore the high response time for the ####/v1/AuthPolicies/download API.
This delay is a built-in safeguard rather than a performance issue. There is no functionality impact at the user end, and no harm is caused to the system. The additional time spent during the validation step ensures the stability and integrity of your policy bundles.