{"id":34837274,"url":"https://github.com/arenadata/ranger-plugin-tutorial","last_synced_at":"2026-05-23T11:39:33.120Z","repository":{"id":104956438,"uuid":"575045438","full_name":"arenadata/ranger-plugin-tutorial","owner":"arenadata","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-11T19:24:43.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-12-27T01:41:31.506Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arenadata.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-06T16:24:36.000Z","updated_at":"2022-12-15T01:37:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"8315be72-abc8-4f1e-bcbb-6be0480c35fa","html_url":"https://github.com/arenadata/ranger-plugin-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arenadata/ranger-plugin-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arenadata%2Franger-plugin-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arenadata%2Franger-plugin-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arenadata%2Franger-plugin-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arenadata%2Franger-plugin-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arenadata","download_url":"https://codeload.github.com/arenadata/ranger-plugin-tutorial/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arenadata%2Franger-plugin-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33394670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-25T16:08:47.053Z","updated_at":"2026-05-23T11:39:33.114Z","avatar_url":"https://github.com/arenadata.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo Apache Ranger plugin\n\nThis git-repo includes two Java projects, related to:\n- server-side implementation of Ranger plugin, which is going to work under Ranger Admin Tomcat service\n- client-side implementation of Ranger plugin, which is represented as a simple REST API with Ranger client authorizer usage\n\n### Details\n\n- server-side part is compiled and tested against Apache Ranger v2.0.0 (ADPS, v1.0.2_b7-1)\n- REST API uses Vert.x, Hibernate JPA \u0026 the H2 embedded database\n- a naive logger is used in the server-side Ranger plugin part, due to the existing bug in Ranger Admin v2.0.0, related to the Apache Tomcat logging process\n\n### How to build each Java project?\n\n```sh\nmvn clean package -U -Dmaven.test.skip=true -Drat.skip=true -X\n```\n\n### Apply servicedef to Ranger\n\n```sh\ncurl -vk -u \"admin:\u003cranger-admin-password\u003e\" -X POST \\\n    -H \"Accept: application/json\" -H \"Content-Type: application/json\" \\\n    --data @/sourcedir/servicedef.json \\\n   \"http://\u003cranger-admin-host\u003e:\u003cranger-admin-port\u003e/service/plugins/definitions\" | jq\n```\n\n### Remove servicedef from Ranger\n\n```sh\ncurl -vk -u \"admin:\u003cranger-admin-password\u003e\" -X DELETE \\\n    -H \"Accept: application/json\" \\\n    -H \"Content-Type: application/json\" \\\n    \"http://\u003cranger-admin-host\u003e:\u003cranger-admin-port\u003e/service/public/v2/api/servicedef/name/\u003cranger-service-name\u003e\"\n```\n\n### Get a list of installed services from Ranger with paging/offset\n\n```sh\ncurl -vk -u \"admin:\u003cranger-admin-password\u003e\" -X GET \\\n\"http://localhost:6080/service/public/v2/api/servicedef?pageSize=25\u0026startIndex=0\" | jq\n```\n\nIt's needed to define a new Ranger service for testing our demo plugin.\n\n### Metadata query\n\n```sh\ncurl -v --header \"test-ranger-user: $testuser\" \"http://\u003crest-api-host\u003e:\u003crest-api-port\u003e/api/v1/metadata\" | jq\n```\n\nThe metadata REST endpoint is the only endpoint which isn't handled by authorization logic.\n\n### Test queries\n\n```sh\ncurl -v --header \"test-ranger-user: $testuser\" \"http://\u003crest-api-host\u003e:\u003crest-api-port\u003e/api/v1/datetime\" | jq\n\ncurl -v --header \"test-ranger-user: $testuser\" \"http://\u003crest-api-host\u003e:\u003crest-api-port\u003e/api/v1/data\" | jq\n\ncurl -v --header \"test-ranger-user: $testuser\" \"http://\u003crest-api-host\u003e:\u003crest-api-port\u003e/api/v1/data?offset=10\u0026limit=10\" | jq\n```\n\n**$testuser** is a test user, which was imported by usersync service of Apache Ranger and which was defined in the service policy.\n\n### ADPS (Arenadata Platform Security, v1.0.2_b7-1) details\n\nIf you're using the ADPS distro from Arenadta, Ranger plugins location is here:\n\n```sh\nsudo ls -lah /usr/lib/ranger-admin/ews/webapp/WEB-INF/classes/ranger-plugins/\n```\n\nHere, you need to create a new directory and upload the JAR artifact to it \u0026 restart Ranger Admin service:\n\n```sh\nscp test-ranger-plugin-0.1.0.jar myuser@rangerhost:.\n\nsudo mkdir /usr/lib/ranger-admin/ews/webapp/WEB-INF/classes/ranger-plugins/testrestapi\n\nsudo cp -v ~/test-ranger-plugin-0.1.0.jar /usr/lib/ranger-admin/ews/webapp/WEB-INF/classes/ranger-plugins/testrestapi/test-ranger-plugin-0.1.0.jar\n\nsudo ls -lah /usr/lib/ranger-admin/ews/webapp/WEB-INF/classes/ranger-plugins/testrestapi/\n\nsudo systemctl restart ranger-admin\nsystemctl status ranger-admin\n```\n\nAlso, it's needed to set the next value for **ranger.supportedcomponents** . By default, the ADPS distro prevents custom plugins setup. First, edit next file:\n\n```sh\nsudo vim /etc/ranger/admin/conf/ranger-admin-site.xml\n```\n\nAnd set next value:\n\n```xml\n\u003cproperty\u003e\n    \u003cname\u003eranger.supportedcomponents\u003c/name\u003e\n    \u003cvalue /\u003e\n\u003c/property\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farenadata%2Franger-plugin-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farenadata%2Franger-plugin-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farenadata%2Franger-plugin-tutorial/lists"}