Created on 12-21-2016 07:47 PM - edited 08-18-2019 04:06 AM
We are building our own plugin but we are getting this error when saving.
Created 12-22-2016 02:27 AM
Which version of Ranger do you use? This looks like the issue fixed in https://issues.apache.org/jira/browse/RANGER-1175.
@mehul.parikh
Created 12-21-2016 09:30 PM
Can you provide more information on the nature of the plugin? Are you able to share the code or snippet of relevant code? It looks like Ranger is trying to retrieve the resourceType property value, but it isn't defined.
Have you seen this: http://bryanbende.com/development/2016/04/25/building-a-plugin-for-apache-ranger
Created on 12-21-2016 09:37 PM - edited 08-18-2019 04:06 AM
Created 12-21-2016 11:07 PM
you need to check the service definition you created for your service
Here is the sample one check for HIVE. check it out https://github.com/apache/incubator-ranger/blob/master/agents-common/src/test/resources/admin/servic...
Created 12-21-2016 11:20 PM
I checked the service definition but nothing looks off:
{ "itemId": 6,"name": "language","type": "string","level": 20,"parent": "database","mandatory": true,"lookupSupported": true,"recursiveSupported": false,"excludesSupported": true,"Matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher","matcherOptions": {"wildCard":true, "ignoreCase":true},"validationRegEx": "","validationMessage": "","uiHint": "","label": "Language","description": "desc"}
Created 12-22-2016 12:08 AM
This service definition appears be "language" under the database element based on the "parent' value. What does the service definition for the tablespace component look like?
Created 12-22-2016 01:04 AM
{"itemId": 7,"name": "tablespace","type": "string","level": 10,"parent": "","mandatory": true,"lookupSupported": true,"recursiveSupported": false,"excludesSupported": true,"Matcher": "org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher","matcherOptions": {"wildCard":true, "ignoreCase":true},"validationRegEx": "","validationMessage": "","uiHint": "","label": "Tablespace","description": "desc"}
Created 12-22-2016 02:27 AM
Which version of Ranger do you use? This looks like the issue fixed in https://issues.apache.org/jira/browse/RANGER-1175.
@mehul.parikh
Created 12-22-2016 05:58 PM
I'm using HDP 2.5 on Hortonworks sandbox.
Created 12-22-2016 08:11 PM
Fix in RANGER-1175 may not be present in the sandbox. Can you try the following workaround, to get the fix in the sandbox?
1. cd /usr/hdp/current/ranger-admin/ews
2. mv webapp/scripts/views/policies/RangerPolicyForm.js webapp/scripts/views/policies/RangerPolicyForm.js.saved
3. curl https://raw.githubusercontent.com/apache/incubator-ranger/ranger-0.6/security-admin/src/main/webapp/... > webapp/scripts/views/policies/RangerPolicyForm.js
After this, please clear your browser cache and try.
Hope this helps.