Observing failure while importing permissions into ranger using ranger import API( /service/plugins/policies/importPoliciesFromFile?updateIfExists=true).
- Create a ranger policy for resource "db1/table1/column1" with policy name policy-1 in service hivedev.
- Import permissions for resource "db1/table1/column1" which has policy name policy-2 into hivedev service using import API mentioned above.
This results in below failure
Validation failure: error code, reason[Another policy already exists for matching resource: policy-name=[policy-1], service=[hivedev]], field[resources], subfield[null], type[semantically incorrect]
This issue will be seen only when there is a policy that already exists for the resource with different policy name from the one that is being imported. If the policy names match, the policy is updated properly.
- links to