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