Managing delta sync for Ranger policies
Enabling delta sync allows component services to download only policy changes and update the policy engine incrementally, rather than rebuilding it completely from scratch every time a policy changes.
Delta sync significantly reduces compute rebuild time, minimizes network traffic between Ranger Admin and component services, and avoids frequent JVM garbage collection and compaction caused by excessive object churn.
The following configuration parameters control this feature:
| Property | Description | Type | Values |
|---|---|---|---|
| ranger.admin.supports.policy.deltas | Controls whether the Ranger Admin server supports incremental policy updates. | Boolean |
The default is |
| ranger.plugin.<service-type>.supports.policy.deltas | Controls whether the service plugin supports incremental policy updates. | Boolean |
The default is |
By default, the properties are enabled. You can verify this by checking the Ranger Admin access
log, where you can see
supportsPolicyDeltas=false:GET /service/plugins/secure/policies/download/<servicename>?supportsPolicyDeltas=falseEnable resource-based policy delta sync
You can enable resource-based policy delta sync for services by setting the following
properties:
- Go to .
- Set the Ranger Admin Advanced Configuration Snippet (Safety Valve) for
conf/ranger-admin-site.xml property as
follows:
Name: ranger.admin.supports.policy.deltas Value: true - For all supported services, go to .
- Set the <Service> Service Advanced Configuration Snippet (Safety Valve)
for ranger-<service-type>-security.xml property as
follows:
Name: ranger.plugin.<service-type>.supports.policy.deltas Value: true - To confirm, you can check the logs in the Ranger Admin access log, where you can see
supportsPolicyDeltas=true:GET /service/plugins/secure/policies/download/<servicename>?supportsPolicyDeltas=true
Enable tag-based policy delta sync
You can enable tag-based policy delta sync for services by setting the following properties:
- Go to .
- Set the Ranger Admin Advanced Configuration Snippet (Safety Valve) for
conf/ranger-admin-site.xml property as
follows:
Name: ranger.admin.supports.policy.deltas Value: true - For all supported services, go to .
- Set the <Service> Service Advanced Configuration Snippet (Safety Valve)
for ranger-<service-type>-security.xml property as
follows:
Name: ranger.plugin.<service-type>.supports.tag.deltas Value: true - To confirm, you can check the logs in the Ranger Admin access log, where you can see
supportsTagDeltas=true:/service/tags/secure/download/cm_<service>?pluginId=<service>@<hostname>-<servicetype>&lastActivationTime=1656064926869&pluginCapabilities=3ffff&lastKnownVersion=4&supportsTagDeltas=true
