Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HDP 2.6 Ranger 0.7.0 import policy from ranger UI

Solved Go to solution
Highlighted

HDP 2.6 Ranger 0.7.0 import policy from ranger UI

Explorer

Hi Team,

what is the process to import ranger policy in ranger 0.7.0, from GUI. Iam getting error saying unauthorized policy name. Can someone share the sample .jSON templete

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: HDP 2.6 Ranger 0.7.0 import policy from ranger UI

Guru

@suresh krish,

The error is because there is no attribute by name 'policyName'. Moreover, the policies are exported / imported at service repository level, not at an individual policy level. For your reference, I'm attaching two exported service repo json - HDFS and Hive.

Hope this helps !

View solution in original post

3 REPLIES 3

Re: HDP 2.6 Ranger 0.7.0 import policy from ranger UI

Explorer
{"policyName":"import_test_range"
,"databases":"s_auth"
,"tables":"*"
,"columns":"*"
,"description":"s_auth"
,"repositoryName":"dsh_prod_hive"
,"repositoryType":"hive"
,"tableType":"Inclusion"
,"columnType":"Inclusion"
,"isEnabled":true
,"isAuditEnabled":true
,"permMapList":[{"userList":["sboppun"],"permList":["all"]}]
}
Highlighted

Re: HDP 2.6 Ranger 0.7.0 import policy from ranger UI

Explorer

Error :

Unrecognized field "policyName" (Class org.apache.ranger.view.RangerExportPolicyList), not marked as ignorable at [Source: java.io.StringReader@4a5e4468; line: 1, column: 16] (through reference chain: org.apache.ranger.view.RangerExportPolicyList["policyName"])

Highlighted

Re: HDP 2.6 Ranger 0.7.0 import policy from ranger UI

Guru

@suresh krish,

The error is because there is no attribute by name 'policyName'. Moreover, the policies are exported / imported at service repository level, not at an individual policy level. For your reference, I'm attaching two exported service repo json - HDFS and Hive.

Hope this helps !

View solution in original post

Don't have an account?
Coming from Hortonworks? Activate your account here