Configuring Ranger policies

Configure Ranger policies for Cloudera Storage Optimizer to grant Hive and OM users the required Ozone volume, bucket, and URL access during service upgrades..

Policy 1: Hive Access Policy (HadoopSQL)

  1. Sign in to Ranger Admin UI and go to Resource Policies > Hadoop SQL.
  2. Click Add New Policy.
  3. Provide the following settings:
    • In the Policy Details section, specify the following values:
      • Policy Name: OZONE_TIERING_HIVE_POLICY
      • Description: Ozone tiering hive policy to grant access to om user on the URL for the Ozone storage
    • In the Resources > URL field, enter ofs://${<***OZONE_SERVICE_ID***>}/tiering-volume/tiering-bucket/tables.
    • In the Allow Conditions section, specify the following values:
      • Users: hdfs, om
      • Permissions: All
  4. Click Save.

Policy 2: Volume Read Policy (cm_ozone)

  1. Sign in to Ranger Admin UI and go to the cm_ozone policy page.
  2. Click Add New Policy.
  3. Provide the following settings:
    • In the Policy Details section, specify the following values:
      • Policy Name: OZONE_TIERING_VOLUME_POLICY
      • Description: Policy for OZONE_TIERING_VOLUME_POLICY to grant hive user read access to tiering-volume
      • Audit Logging: Yes
    • In the Resources > Ozone Volume field, enter tiering-volume.
    • In the Allow Conditions section, specify the following values:
      • Users: hive.
      • Permissions: Read
  4. Click Save.

Policy 3: Bucket Access Policy (cm_ozone)

  1. Sign in to Ranger Admin UI and go to the cm_ozone policy page.
  2. Click Add New Policy.
  3. Provide the following settings:
    • In the Policy Details section, specify the following values:
      • Policy Name: OZONE_TIERING_POLICY
      • Description: Policy for OZONE_TIERING_POLICY to grant hive user all access to tiering-volume/tiering-bucket
      • Audit Logging: Yes
    • In the Resources section, specify the following values:
      • Ozone Volume: Enter tiering-volume and switch on the Include toggle.
      • Ozone Bucket: Enter tiering-bucket and switch on the Include toggle.
      • Ozone Key: *
    • In the Allow Conditions section, specify the following values:
      • Users: hive.
      • Permissions: All, Create, Write, Read, List, Delete
  4. Click Save.