Enabling Ranger HDFS plugin manually on a Data Hub

How to enable an HDFS plugin for Ranger, service-wide, on a Data Hub using Cloudera Manager.

The Ranger HDFS plug-in helps to centralize HDFS authorization policies. Apache Ranger plugins validate the access of a user against the authorization policies defined in the Apache Ranger policy administration server, and stored in the HDFS service instance, also called a repository. When you enable the Ranger HDFS plugin and an HDFS service user attempts access, Ranger checks whether a policy exists granting or denying the user access. If no policy exists, Ranger defaults to use the native permissions model in HDFS. Access control rules configured through this combination of Ranger HDFS plugin and native file system permissions apply.

To enable users define Ranger authorization polices, using an HDFS service plugin:

  1. In a DataHub, go to Cloudera Manager > HDFS > Configuration.
  2. In Search, type Ranger Service, then click the box to enable the hdfs (service-wide) parameter for Ranger Service.
    Figure 1. Enabling the HDFS Ranger plugin parameter on a Data Hub
    Enabling HDFS Ranger plugin parameter on a Data Hub
    A stale configuration icon displays for the hdfs service.
    Figure 2. Result of adding a new configuration parameter
    Adding a new configuration parameter
  3. Before restarting Hdfs service for stale configurations, choose HDFS > Actions > Create Ranger Repository. After progress completes, close the Create Repository dialog.
  4. Now proceed to restart the Hdfs service. Click HDFS > Actions > Restart. After progress completes, close the Restart dialog.
  5. On the Data Lake, log in to Ranger.
  6. Go to Admin Web UI > Access Manager.
  7. In Service Manager > HDFS, confirm that (DataHub cluster name)_hdfs appears.
    Figure 3. Confirming HDFS plugin added
    Confirming HDFS plugin added
  8. Go to Audit > Plugins.
Confirm that the Http response code for the Ranger Hdfs plugin enabled on the DataHub Hdfs service displays 200 (successful).
Figure 4. Confirming successful http response
Confirming successful http response