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)
- Sign in to Ranger Admin UI and go to .
- Click Add New Policy.
- 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 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
- In the
Policy
Details
section,
specify
the following
values:
- Click Save.
Policy 2: Volume Read Policy (cm_ozone)
- Sign in to Ranger Admin UI and go to the cm_ozone policy page.
- Click Add New Policy.
- 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 field, enter tiering-volume.
- In the
Allow
Conditions
section,
specify
the following
values:
- Users: hive.
- Permissions: Read
- In the
Policy
Details
section,
specify
the following
values:
- Click Save.
Policy 3: Bucket Access Policy (cm_ozone)
- Sign in to Ranger Admin UI and go to the cm_ozone policy page.
- Click Add New Policy.
- 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
- In the
Policy
Details
section,
specify
the following
values:
- Click Save.
