Creating a resource policy for a volume using UI
Learn how to create a resource policy in Ranger to grant the permissions for a volume using UI.
- Sign in to Cloudera Manager.
- In the left navigation, click Clusters.
- Select the relevant Ranger cluster.
- Click the Web UI dropdown menu and click one of the Ranger Admin Web UI. The Ranger log in page displays.
- Sign in to Ranger. The Ranger home page displays.
- In the left navigation pane, select Resource Policies, and then select cm_ozone.
-
Use one of the following methods to locate the policy associated with your
target volume:
- If a volume policy already exists (for example,
S3_VOLUME_POLICY_FOR_OZONE_CANARY), enter the policy name in the search box and click the link in the Policy ID column to edit it. - If no policy exists for the volume,
- Click Add New Policy.
- Enter a Policy Name.
- In the Resources section, click the Ozone Volume drop-down menu and select Ozone Volume.
- In the Add policy Resources text box, enter the volume name (for example, s3v).
- Wait for few seconds and then select create [***VOLUME_NAME***] (for example, create s3v).
- If a volume policy already exists (for example,
-
In the Allow Rules section, perform the following
actions:
- (Optional) Click the plus (+) button to add a new row.
- Under Select Roles, click the Select Roles dropdown menu.
-
Select your target access role (for example,
iceberg-data-all-access). - Under Permissions, click the plus sign (+).
-
Select the check boxes next to Read and
List (optional), and then select the
check
mark at the bottom of the dialog box.
-
Locate the row assigned to your target user or role (for example,
iceberg-data-all-access). - Under Rule Conditions, click the plus (+) button to add a new condition.
- Under Actions, select GetObject and PutObject.
- Click Save in the dialog box.
- Click Save.
