[ https://issues.apache.org/jira/browse/RANGER-2484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pradeep Agrawal updated RANGER-2484: ------------------------------------ Description: Observing failure while importing permissions into ranger using ranger import API( /service/plugins/policies/importPoliciesFromFile?updateIfExists=true). *Precondition:* * Create a ranger policy for resource "db1/table1/column1" with policy name policy-1 in service hivedev. *Reproduction Steps:* * 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 {noformat} Validation failure: error code[3010], reason[Another policy already exists for matching resource: policy-name=[policy-1], service=[hivedev]], field[resources], subfield[null], type[semantically incorrect] {noformat} 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. > Improve import API to merge the policies if resources are exactly same > ---------------------------------------------------------------------- > > Key: RANGER-2484 > URL: https://issues.apache.org/jira/browse/RANGER-2484 > Project: Ranger > Issue Type: Improvement > Components: Ranger > Affects Versions: 2.0.0 > Reporter: Pradeep Agrawal > Assignee: Pradeep Agrawal > Priority: Major > Fix For: 2.0.0 > > > Observing failure while importing permissions into ranger using ranger import > API( /service/plugins/policies/importPoliciesFromFile?updateIfExists=true). > *Precondition:* > * Create a ranger policy for resource "db1/table1/column1" with policy name > policy-1 in service hivedev. > *Reproduction Steps:* > * 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 > {noformat} > Validation failure: error code[3010], reason[Another policy already exists > for matching resource: policy-name=[policy-1], service=[hivedev]], > field[resources], subfield[null], type[semantically incorrect] > {noformat} > 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. -- This message was sent by Atlassian JIRA (v7.6.3#76005)