Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 10-18-2016 02:37 PM
I am looking for a sample JSON or example to create ranger policies for kafka and solr using rest API
In this link i am only able to find for other commponents https://cwiki.apache.org/confluence/display/RANGER/REST+APIs+for+Policy+Management
Please share me the link if there is any place where json for kafka and solr are post.
Created 10-18-2016 02:58 PM
Below is an example to create sample kafka policy in ranger.
curl -iv -k -u <user:password> -H "Content-Type: application/json" -X POST https://<RANGER_HOST>:6182/service/public/v2/api/policy -d '{"allowExceptions": [],"denyExceptions": [],"denyPolicyItems":[],"description": "My first Kafka policy","isAuditEnabled": true,"isEnabled": true,"name": "kafka_policy_1","policyItems": [{"accesses": [{"isAllowed": true,"type": "consume"}],"conditions": [],"delegateAdmin": false,"groups": ["mygroup"],"users": []}],"resources": {"topic": {"isExcludes": false,"isRecursive": false,"values": ["ambari_kafka_service_check"]}},"service": "MYCLUSTER_kafka","version": 1}'
Created 10-18-2016 02:58 PM
Below is an example to create sample kafka policy in ranger.
curl -iv -k -u <user:password> -H "Content-Type: application/json" -X POST https://<RANGER_HOST>:6182/service/public/v2/api/policy -d '{"allowExceptions": [],"denyExceptions": [],"denyPolicyItems":[],"description": "My first Kafka policy","isAuditEnabled": true,"isEnabled": true,"name": "kafka_policy_1","policyItems": [{"accesses": [{"isAllowed": true,"type": "consume"}],"conditions": [],"delegateAdmin": false,"groups": ["mygroup"],"users": []}],"resources": {"topic": {"isExcludes": false,"isRecursive": false,"values": ["ambari_kafka_service_check"]}},"service": "MYCLUSTER_kafka","version": 1}'
Created 10-18-2016 03:18 PM
Thanks, It working. Can you also provide the sample json for creating solr policies in ranger