{"id":91835,"date":"2019-05-15T16:00:04","date_gmt":"2019-05-15T13:00:04","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=91835"},"modified":"2019-05-14T12:09:45","modified_gmt":"2019-05-14T09:09:45","slug":"beautiful-simplicity-apache-ranger-plugin","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html","title":{"rendered":"The beautiful simplicity of Apache Ranger plugin"},"content":{"rendered":"<p>If you are here, you already know what&nbsp;<a href=\"https:\/\/ranger.apache.org\/\">Apache Ranger<\/a>&nbsp;is. It is the most popular, if not the only, way to manage security in the Hadoop framework. It has integrations with Active Directory, Kerberos and various others for authentication but I believe the most interesting feature is its authorization support. Being part of the Hadoop ecosystem, one would not be surprised that it has inbuilt support (via plugins) for most frameworks in the Hadoop ecosystem &#8211; Hive, HBase, HDFS etc. However, I&#8217;ve found that it&#8217;s actually very easy to spin your own custom plugin for Ranger.<\/p>\n<p>This post would focus on the simplicity of design in Ranger plugins and showcase how easy it is to build one for ourselves. As an example, we&#8217;ll build a Ranger plugin for managing access to a simple HTTP service written using Akka HTTP.<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nNote : You are not required to know about Akka HTTP to follow this post. All you needed to know is that Akka HTTP is just a way (albeit, a great way) to build HTTP services\n\n<\/pre>\n<\/div>\n<p>The code behind this post is split into two repositories:<\/p>\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/arunma\/RangerHTTPPlugin\">Ranger HTTP plugin<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/arunma\/RangerManagedHTTPService\">Ranger Managed Akka HTTP Service<\/a><\/li>\n<\/ol>\n<h2 class=\"wp-block-heading\" id=\"writingaplugin\">WRITING A PLUGIN<\/h2>\n<p>To reiterate what we are attempting to do here, we are going to write a REST service and let Ranger manage the authorization for it.<\/p>\n<p>Writing a Ranger plugin is actually a two part problem &#8211; writing the&nbsp;<strong>server-side component<\/strong>&nbsp;and the&nbsp;<strong>application-side component<\/strong>.<\/p>\n<ol class=\"wp-block-list\">\n<li><strong>Server-side component<\/strong>&nbsp;is the code\/configuration that resides on the Ranger side.<\/li>\n<li><strong>Application-side component<\/strong>&nbsp;is the code that resides in our REST service that invokes the Ranger service and checks if the application&#8217;s end user has access to the resource that he is requesting.<\/li>\n<\/ol>\n<p>We&#8217;ll look into these two things in detail. Let&#8217;s attempt to write the server-side components first.<\/p>\n<h3 class=\"wp-block-heading\" id=\"1serversidecomponents\">1. SERVER-SIDE COMPONENTS :<\/h3>\n<p>As an inspiration, if we open up the&nbsp;<a href=\"https:\/\/github.com\/apache\/ranger\">ranger code base<\/a>, we can see some of the in-built plugins.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"724\" height=\"404\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/list_of_plugins.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91836\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/list_of_plugins.png 724w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/list_of_plugins-300x167.png 300w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/figure>\n<\/div>\n<p>Pictorially, within the Ranger code base, we have bunch of plugins and we would like to add our own plugin.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"595\" height=\"131\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/broad_plugins.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91837\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/broad_plugins.png 595w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/broad_plugins-300x66.png 300w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><\/figure>\n<\/div>\n<p>Zooming in the previous picture, the server-side component on the plugin would mean writing a<\/p>\n<ol class=\"wp-block-list\">\n<li>servicedef configuration<\/li>\n<li>A class that inherits&nbsp;<code>RangerBaseService<\/code><\/li>\n<\/ol>\n<p>So, there&#8217;s literally&nbsp;<strong>&#8220;one&#8221;<\/strong>&nbsp;configuration and&nbsp;<strong>&#8220;one&#8221;<\/strong>&nbsp;class that you need to implement for the server-side.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"864\" height=\"211\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/granular_plugins.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91838\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/granular_plugins.png 864w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/granular_plugins-300x73.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/granular_plugins-768x188.png 768w\" sizes=\"(max-width: 864px) 100vw, 864px\" \/><\/figure>\n<\/div>\n<h4 class=\"wp-block-heading\" id=\"1servicedefconfiguration\">1. SERVICEDEF CONFIGURATION<\/h4>\n<p>Let&#8217;s look at Hive&#8217;s servicedef configuration :<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"818\" height=\"1024\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/hive_servicedef-818x1024.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91839\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/hive_servicedef-818x1024.png 818w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/hive_servicedef-240x300.png 240w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/hive_servicedef-768x961.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/hive_servicedef.png 1342w\" sizes=\"(max-width: 818px) 100vw, 818px\" \/><\/figure>\n<\/div>\n<p>In my opinion, there are three important things that we are talking about here :<\/p>\n<h5 class=\"wp-block-heading\" id=\"aresource\">A. RESOURCE:<\/h5>\n<p>In the Hive example, the &#8220;resource&#8221; that we are trying to protect are&nbsp;<strong>databases<\/strong>,&nbsp;<strong>tables<\/strong>&nbsp;and&nbsp;<strong>columns<\/strong>, for Kafka, the &#8220;resource&#8221; that we are trying to protect is the Kafka&nbsp;<strong>topic<\/strong>, for HDFS, it would be a file&nbsp;<strong>path<\/strong>. For our HTTP service, the resource that we are trying to protect is the&nbsp;<strong>REST slug<\/strong>. Let&#8217;s call it a &#8220;path&#8221;.<\/p>\n<pre class=\"brush:js\">\"resources\": [\n    {\n      \"itemId\": 1,\n      \"name\": \"path\",\n      \"type\": \"path\",\n      \"level\": 10,\n      \"parent\": \"\",\n      \"mandatory\": true,\n      \"lookupSupported\": true,\n      \"recursiveSupported\": true,\n      \"excludesSupported\": true,\n      \"matcher\": \"org.apache.ranger.plugin.resourcematcher.RangerPathResourceMatcher\",\n      \"matcherOptions\": {\n        \"wildCard\": true,\n        \"ignoreCase\": true\n      },\n      \"validationRegEx\": \"\",\n      \"validationMessage\": \"\",\n      \"uiHint\": \"\",\n      \"label\": \"HTTP Path\",\n      \"description\": \"HTTP Path\"\n    }\n<\/pre>\n<h5 class=\"wp-block-heading\" id=\"baccesstype\">B. ACCESS TYPE:<\/h5>\n<p>Access types simply means the kind of access that the user would require &#8211; say, for Hive,&nbsp;<strong>select<\/strong>,&nbsp;<strong>create<\/strong>,&nbsp;<strong>delete<\/strong>&nbsp;would be examples. For HDFS,&nbsp;<strong>read<\/strong>,&nbsp;<strong>write<\/strong>,&nbsp;<strong>execute<\/strong>&nbsp;would be examples. For Kafka,&nbsp;<strong>publish<\/strong>&nbsp;and&nbsp;<strong>consume<\/strong>. For our HTTP service, the access type would be the HTTP methods &#8211;&nbsp;<strong>GET<\/strong>,&nbsp;<strong>POST<\/strong>,&nbsp;<strong>DELETE<\/strong>.<\/p>\n<pre class=\"brush:js\">\"accessTypes\": [\n    {\n      \"itemId\": 1,\n      \"name\": \"get\",\n      \"label\": \"get\"\n    },\n    {\n      \"itemId\": 2,\n      \"name\": \"post\",\n      \"label\": \"post\"\n    },\n    {\n      \"itemId\": 3,\n      \"name\": \"delete\",\n      \"label\": \"delete\"\n    }\n  ]\n<\/pre>\n<h5 class=\"wp-block-heading\" id=\"cconfigs\">C. CONFIGS:<\/h5>\n<p>We know that Ranger can manage security for several Kakfa topics, HDFS and HBase clusters. Each of these services would be running in a different host and the way to authenticate into each of them would be different. The place to capture this information would be this&nbsp;<code>configs<\/code>&nbsp;part. For the sake of simplicity of this example, we don&#8217;t care about authentication for our HTTP service. So, we are just capturing a URL that we could ping to, to ensure that our service is up and running.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:js\">\"configs\": [\n    {\n      \"itemId\": 1,\n      \"name\": \"services_list_url\",\n      \"type\": \"string\",\n      \"subType\": \"\",\n      \"mandatory\": true,\n      \"validationRegEx\": \"\",\n      \"validationMessage\": \"\",\n      \"uiHint\": \"\",\n      \"label\": \"HTTP URL for the services list eg. http:\/\/localhost:8080\/services\"\n    }\n  ]\n<\/pre>\n<h4 class=\"wp-block-heading\" id=\"2aclassthatinheritsrangerbaseservice\">2. A CLASS THAT INHERITS RANGERBASESERVICE<\/h4>\n<p>The second and the last part of implementing our server-side component for the ranger plugin is to write a class that inherits the&nbsp;<code>RangerBaseService<\/code>.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/base_service_impl-1024x633.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91840\" width=\"768\" height=\"475\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/base_service_impl-1024x633.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/base_service_impl-300x186.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/base_service_impl-768x475.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/base_service_impl.png 1620w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<p>The class expects two functions to be overridden:<\/p>\n<ol class=\"wp-block-list\">\n<li><code>validateConfig<\/code>: Remember the&nbsp;<code>configs<\/code>&nbsp;section of the servicedef. Obviously, we would be accepting values for those parameters right? Now, this&nbsp;<code>validateConfig<\/code>&nbsp;is the place where we validate the values that are passed. For our HTTP service, all that we are accepting in the config is the&nbsp;<strong>services_list_url<\/strong>. Now, the implementation of this function would be to use a simple HTTP client to ping and check whether the service is up and running.<\/li>\n<\/ol>\n<pre class=\"brush:java\">class RangerServiceHTTP extends RangerBaseService {\n\n  override def validateConfig(): util.Map[String, AnyRef] = {\n    if (configs.containsKey(\"services_list_url\")) {\n      val serviceUp = HttpServiceClient.isServiceUp(configs.get(\"services_list_url\"))\n      if (serviceUp) retSuccessMap() else returnFailureMap()\n    }\n    else {\n      returnFailureMap()\n    }\n  }\n<\/pre>\n<ol class=\"wp-block-list\">\n<li><code>lookupResource<\/code>: This is an interesting function. Consider the following screenshot.<\/li>\n<\/ol>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/lookup_services-1024x717.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91841\" width=\"768\" height=\"538\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/lookup_services-1024x717.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/lookup_services-300x210.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/lookup_services-768x538.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/lookup_services.png 1628w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<p>Later, when we configure an access policy, we would be configuring the&nbsp;<strong>resources<\/strong>&nbsp;in it. Now, this function is used to lookup and autofill those resources. Say, if we are entering a HDFS resource or Hive table, the number of options are quite a lot and it&#8217;s easy to do a typo. In case of Hive, this function would connect to the metastore and populate the tables and databases for us.<\/p>\n<p>In the case of HTTP service, remember the&nbsp;<code>service_list_url<\/code>? That URL would just return a comma separated list of REST resources. For implementing this function, I am just calling the service again and tokenizing the response.<\/p>\n<pre class=\"brush:java\"> override def lookupResource(resourceLookupContext: ResourceLookupContext): util.List[String] = {\n    val serviceUrl = configs.get(\"services_list_url\")\n    HttpServiceClient.getServicePaths(serviceUrl).asJava\n  }\n<\/pre>\n<p>Now, as a final step to the code, we&#8217;ll need to tie this class&nbsp;<code>RangerServiceHTTP<\/code>&nbsp;and the servicedef configuration together. The way we do this is by configuring the class in the&nbsp;<code>implClass<\/code>&nbsp;property. Also notice that we are configuring the name of this&nbsp;<em>ranger plugin<\/em>&nbsp;as&nbsp;<code>httpservice<\/code>:<\/p>\n<pre class=\"brush:js\">{\n  \"name\": \"httpservice\",\n  \"label\": \"HTTP Service\",\n  \"description\": \"Rudimentary Ranger plugin to enforce security on top of a HTTP Service\",\n  \"guid\": \"b8290b7f-6f69-44a9-89cc-06b6975ea676\",\n  \"implClass\": \"com.arunma.ranger.http.RangerServiceHTTP\",\n* *   \"version\": 1,\n  \"isEnabled\": 1,\n  \"resources\": [\n    {\n      \"itemId\": 1,\n      \"name\": \"path\",\n      ...\n      ...\n<\/pre>\n<p>The full configuration looks like&nbsp;<a href=\"https:\/\/github.com\/arunma\/RangerHTTPPlugin\/blob\/master\/http-ranger.json\">this<\/a>.<\/p>\n<p>There are two more minor administrative steps:<\/p>\n<ol class=\"wp-block-list\">\n<li>In order to ensure that our class is made available on the Ranger classpath, we&#8217;ll bundle it into a jar and drop it at&nbsp;<code>&lt;RANGER_HOME&gt;\/ews\/webapp\/WEB-INF\/classes\/ranger-plugins\/httpservice<\/code>. The name of the folder&nbsp;<code>httpservice<\/code>&nbsp;corresponds to the name that is declared in the&nbsp;<code>servicedef<\/code>&nbsp;configuration.<\/li>\n<\/ol>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/ranger_plugin_copy_webinf-1024x462.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91842\" width=\"768\" height=\"347\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/ranger_plugin_copy_webinf-1024x462.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/ranger_plugin_copy_webinf-300x135.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/ranger_plugin_copy_webinf-768x346.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/ranger_plugin_copy_webinf.png 1490w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<ol class=\"wp-block-list\">\n<li>Upload our configuration into Ranger so that our service becomes visible in the Ranger UI.<\/li>\n<\/ol>\n<pre class=\"brush:js\">curl -u admin:admin -X POST -H \"Accept: application\/json\" -H \"Content-Type: application\/json\" --data @http-ranger.json http:\/\/localhost:6080\/service\/plugins\/definitions\n<\/pre>\n<p>Bounce the Ranger server.<\/p>\n<p>Yaay! We now see&nbsp;<strong>HTTPSERVICE<\/strong>&nbsp;on our Ranger UI<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/ranger_ui_http.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91843\" width=\"626\" height=\"339\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/ranger_ui_http.png 834w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/ranger_ui_http-300x163.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/ranger_ui_http-768x416.png 768w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/figure>\n<\/div>\n<h3 class=\"wp-block-heading\" id=\"2applicationsidecomponents\">2. APPLICATION-SIDE COMPONENTS :<\/h3>\n<p>On the application side, things couldn&#8217;t get any simpler. In order to use the policies used in Ranger, all that an application would need to do is to call Ranger and check if the user has access to a resource. The function is literally called&nbsp;<code>isAccessAllowed<\/code>.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/server-client-components-1024x609.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91844\" width=\"768\" height=\"457\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/server-client-components-1024x609.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/server-client-components-300x178.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/server-client-components-768x457.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/server-client-components.png 1728w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<p>The following code is pretty much all that needs to be written on the application side:<\/p>\n<pre class=\"brush:java\">package com.arunma.ranger\n\nimport org.apache.ranger.plugin.audit.RangerDefaultAuditHandler\nimport org.apache.ranger.plugin.policyengine.{RangerAccessRequestImpl, RangerAccessResourceImpl}\nimport org.apache.ranger.plugin.service.RangerBasePlugin\n\nimport scala.collection.JavaConverters._\n\nobject RangerAuthorizer {\n  lazy val plugin = {\n    val plg = new RangerBasePlugin(\"httpservice\", \"httpservice\")\n    plg.setResultProcessor(new RangerDefaultAuditHandler)\n    plg.init()\n    plg\n  }\n\n  def authorize(path: String, accessType: String, userName: String, userGroups: Set[String] = Set(\"public\")): Boolean = {\n    val resource = new RangerAccessResourceImpl()\n    resource.setValue(\"path\", path)\n    val request = new RangerAccessRequestImpl(resource, accessType, userName, userGroups.asJava)\n    val result = plugin.isAccessAllowed(request)\n    result != null &amp;&amp; result.getIsAllowed\n  }\n}\n<\/pre>\n<p>The&nbsp;<code>RangerBasePlugin(\"httpservice\", \"httpservice\")<\/code>&nbsp;and the&nbsp;<code>init()<\/code>&nbsp;function serves as our entry point into the Ranger service. Note the&nbsp;<code>httpservice<\/code>&nbsp;parameter inside the&nbsp;<code>RangerBasePlugin<\/code>. This must match the name that was given in the servicedef configuration.<\/p>\n<p>The&nbsp;<code>authorize<\/code>&nbsp;function is the one that gets called by the interceptor just before the client is given access to a REST resource. The function simply constructs a AccessRequest &#8211; the&nbsp;<code>RangerAccessRequestImpl<\/code>&nbsp;and calls the plugin&#8217;s&nbsp;<code>isAccessAllowed<\/code>&nbsp;function, which returns a&nbsp;<code>Boolean<\/code>.<\/p>\n<p>The interceptor&nbsp;<a href=\"https:\/\/doc.akka.io\/docs\/akka-http\/current\/routing-dsl\/directives\/security-directives\/authorize.html\">directive<\/a>&nbsp;<code>authorize<\/code>&nbsp;invokes the function&nbsp;<code>isRangerAuthorized<\/code>&nbsp;which then calls the&nbsp;<code>authorize<\/code>&nbsp;function in RangerAuthorizer.<\/p>\n<pre class=\"brush:java\">def isRangerAuthorized(path: String, httpMethod: String, userName: String): Boolean = RangerAuthorizer.authorize(path, httpMethod.toLowerCase, userName)  \n\nlazy val userRoutes: Route =\n    headerValueByName(\"username\") { userName =&gt;\n      extractMethod { method =&gt;\n        pathPrefix(\"users\") {\n          extractMatchedPath { matchedPath =&gt;\n            authorize(isRangerAuthorized(matchedPath.toString(), method.name(), userName)) {\n              concat(\n                pathEnd {\n                  concat(\n                    get {\n                      val users: Future[Users] =\n                        (userRegistryActor ? GetUsers).mapTo[Users]\n                      complete(users)\n<\/pre>\n<p>One last thing that we are required to do is to copy an&nbsp;<code>audit<\/code>&nbsp;and&nbsp;<code>security<\/code>&nbsp;xml into our classpath. These are like the&nbsp;<strong>site xmls<\/strong>&nbsp;for Ranger. For this exercise, we&#8217;ll just place the xmls in our&nbsp;<code>resources<\/code>&nbsp;directory.<\/p>\n<p>The&nbsp;<code>audit<\/code>&nbsp;xml and the&nbsp;<code>security<\/code>&nbsp;xml could be copied from the&nbsp;<a href=\"https:\/\/github.com\/apache\/ranger\/tree\/master\/plugin-atlas\/conf\">ranger codebase<\/a>. If you are running a local ranger, the audit XML can remain as-is but&nbsp;<code>security<\/code>&nbsp;xml needs to be changed for our service. The easiest way to achieve this is to copy a sample xml from the ranger code base and start replacing the service as&nbsp;<code>httpservice<\/code>&nbsp;like so:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"674\" height=\"476\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/security_xml_httpservice.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91845\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/security_xml_httpservice.png 674w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/security_xml_httpservice-300x212.png 300w\" sizes=\"(max-width: 674px) 100vw, 674px\" \/><\/figure>\n<\/div>\n<p>There&#8217;s also one property that needs special attention. That&#8217;s the property called&nbsp;<code>ranger.plugin.httpservice.service.name<\/code>. This property&#8217;s value must be the same as the&nbsp;<strong>Service Name<\/strong>&nbsp;that you use in your Ranger UI.<\/p>\n<pre class=\"brush:xml\">&lt;property&gt;\n\t&lt;name&gt;ranger.plugin.httpservice.service.name&lt;\/name&gt;\n\t&lt;value&gt;MyService&lt;\/value&gt;\n\t&lt;description&gt;\n\t\tName of the Ranger service containing policies for this httpservice instance\n\t&lt;\/description&gt;\n&lt;\/property&gt;\n<\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/service_name_big.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91846\" width=\"646\" height=\"592\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/service_name_big.png 861w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/service_name_big-300x275.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/service_name_big-768x704.png 768w\" sizes=\"(max-width: 646px) 100vw, 646px\" \/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"testride\">TEST RIDE<\/h2>\n<p>This would involve two steps<\/p>\n<ol class=\"wp-block-list\">\n<li>Configure a Ranger Policy<\/li>\n<li>Verifying your HTTP Service<\/li>\n<\/ol>\n<h4 class=\"wp-block-heading\" id=\"1configurearangerpolicy\">1. CONFIGURE A RANGER POLICY<\/h4>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/create_policy-1024x537.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91847\" width=\"768\" height=\"403\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/create_policy-1024x537.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/create_policy-300x157.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/create_policy-768x403.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/create_policy.png 1154w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<h4 class=\"wp-block-heading\" id=\"2verifyingyourhttpservice\">2. VERIFYING YOUR HTTP SERVICE<\/h4>\n<p>Let&#8217;s verify the policy by bringing up our HTTP Service &#8211; start the&nbsp;<code>com.arunma.RangerManagedHttpServer<\/code><\/p>\n<p><strong>Policy-configured user<\/strong><\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl -X GET -H &#039;username:arunma&#039; http:\/\/localhost:8080\/users\n<\/pre>\n<\/div>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"527\" height=\"36\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/curl_good.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91848\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/curl_good.png 527w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/curl_good-300x20.png 300w\" sizes=\"(max-width: 527px) 100vw, 527px\" \/><\/figure>\n<\/div>\n<p><strong>Invalid user<\/strong><\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl -X GET -H &#039;username:nobody&#039; http:\/\/localhost:8080\/users\n<\/pre>\n<\/div>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"575\" height=\"36\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/curl_bad.png\" alt=\"Apache Ranger plugin\" class=\"wp-image-91849\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/curl_bad.png 575w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/05\/curl_bad-300x19.png 300w\" sizes=\"(max-width: 575px) 100vw, 575px\" \/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"summary\">SUMMARY<\/h2>\n<p>The Ranger plugin has two parts to it &#8211; a server-side component and a client-side component. For the server-side component, we created a&nbsp;<code>servicedeef<\/code>json and a class that inherited the&nbsp;<code>RangerBaseService<\/code>. For the client side-component, we just called an&nbsp;<code>isAccessAllowed<\/code>&nbsp;function of the&nbsp;<code>plugin<\/code>.<\/p>\n<p>You now have a working Ranger authorized HTTP Service.<\/p>\n<p>Thanks for reading. Happy Hacking !<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Java Code Geeks with permission by Arun Manivannan, partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener noreferrer\">JCG program<\/a>. See the original article here: <a href=\"https:\/\/rerun.me\/2019\/05\/14\/the-beautiful-simplicity-of-apache-ranger-plugin\/\" target=\"_blank\" rel=\"noopener noreferrer\">The beautiful simplicity of Apache Ranger plugin<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you are here, you already know what&nbsp;Apache Ranger&nbsp;is. It is the most popular, if not the only, way to manage security in the Hadoop framework. It has integrations with Active Directory, Kerberos and various others for authentication but I believe the most interesting feature is its authorization support. Being part of the Hadoop ecosystem, &hellip;<\/p>\n","protected":false},"author":287,"featured_media":227,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[677,1899,1831],"class_list":["post-91835","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-hadoop","tag-ranger","tag-scala"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The beautiful simplicity of Apache Ranger plugin - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about Apache Ranger plugin? Check our article explaining how you can manage security in the Hadoop framework with apache ranger plugin.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The beautiful simplicity of Apache Ranger plugin - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about Apache Ranger plugin? Check our article explaining how you can manage security in the Hadoop framework with apache ranger plugin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-15T13:00:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/scala-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Arun Manivannan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Arun Manivannan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html\"},\"author\":{\"name\":\"Arun Manivannan\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c7775dd45c5b0728bb6171194497e152\"},\"headline\":\"The beautiful simplicity of Apache Ranger plugin\",\"datePublished\":\"2019-05-15T13:00:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html\"},\"wordCount\":1456,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/scala-logo.jpg\",\"keywords\":[\"Hadoop\",\"ranger\",\"Scala\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html\",\"name\":\"The beautiful simplicity of Apache Ranger plugin - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/scala-logo.jpg\",\"datePublished\":\"2019-05-15T13:00:04+00:00\",\"description\":\"Interested to learn about Apache Ranger plugin? Check our article explaining how you can manage security in the Hadoop framework with apache ranger plugin.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/scala-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/scala-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/05\\\/beautiful-simplicity-apache-ranger-plugin.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"The beautiful simplicity of Apache Ranger plugin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c7775dd45c5b0728bb6171194497e152\",\"name\":\"Arun Manivannan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fecbd2c62933013fa13416ad9a930bacd9edcc34dc9b3227de9f2495f9758472?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fecbd2c62933013fa13416ad9a930bacd9edcc34dc9b3227de9f2495f9758472?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/fecbd2c62933013fa13416ad9a930bacd9edcc34dc9b3227de9f2495f9758472?s=96&d=mm&r=g\",\"caption\":\"Arun Manivannan\"},\"sameAs\":[\"http:\\\/\\\/www.rerun.me\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Arun-Manivannan\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The beautiful simplicity of Apache Ranger plugin - Java Code Geeks","description":"Interested to learn about Apache Ranger plugin? Check our article explaining how you can manage security in the Hadoop framework with apache ranger plugin.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html","og_locale":"en_US","og_type":"article","og_title":"The beautiful simplicity of Apache Ranger plugin - Java Code Geeks","og_description":"Interested to learn about Apache Ranger plugin? Check our article explaining how you can manage security in the Hadoop framework with apache ranger plugin.","og_url":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2019-05-15T13:00:04+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/scala-logo.jpg","type":"image\/jpeg"}],"author":"Arun Manivannan","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Arun Manivannan","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html"},"author":{"name":"Arun Manivannan","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c7775dd45c5b0728bb6171194497e152"},"headline":"The beautiful simplicity of Apache Ranger plugin","datePublished":"2019-05-15T13:00:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html"},"wordCount":1456,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/scala-logo.jpg","keywords":["Hadoop","ranger","Scala"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html","url":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html","name":"The beautiful simplicity of Apache Ranger plugin - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/scala-logo.jpg","datePublished":"2019-05-15T13:00:04+00:00","description":"Interested to learn about Apache Ranger plugin? Check our article explaining how you can manage security in the Hadoop framework with apache ranger plugin.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/scala-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/scala-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2019\/05\/beautiful-simplicity-apache-ranger-plugin.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"The beautiful simplicity of Apache Ranger plugin"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c7775dd45c5b0728bb6171194497e152","name":"Arun Manivannan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/fecbd2c62933013fa13416ad9a930bacd9edcc34dc9b3227de9f2495f9758472?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/fecbd2c62933013fa13416ad9a930bacd9edcc34dc9b3227de9f2495f9758472?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fecbd2c62933013fa13416ad9a930bacd9edcc34dc9b3227de9f2495f9758472?s=96&d=mm&r=g","caption":"Arun Manivannan"},"sameAs":["http:\/\/www.rerun.me\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Arun-Manivannan"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/91835","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/287"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=91835"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/91835\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/227"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=91835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=91835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=91835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}