Creating a tag-based policy from classifications

Create a tag-based policy in Ranger to control access to catalog metadata based on the classifications assigned to assets in Cloudera Unified Data Fabric, such as denying a group access to every asset classified as PII.

  • You are a Ranger administrator. For more information, see Accessing the Ranger Admin web UI.
  • The classification exists in Cloudera Unified Data Fabric and is assigned to the assets that you want to protect.

When you assign a classification to an asset, such as a table or a column, in Cloudera Unified Data Fabric, Ranger TagSync imports it into Ranger as a tag on that asset in the awc_udf service. A tag-based policy in the udf_tag service then applies to every asset that has the tag, so you do not need to list the assets in a resource-based policy. When you add or remove the classification, the tag follows after a short delay.

Tag-based policies are evaluated before resource-based policies. A deny condition in a tag-based policy denies access even if a resource-based policy allows it.

  1. In the Ranger Admin web UI, click Tag Policies, and then click udf_tag.
    The policies of the udf_tag service open on the Access tab.
  2. Click Add New Policy.
    The Create Policy page is displayed.
  3. Under Policy Details, enter a Policy Name, for example, deny pii - contractors.

    Optionally, add a Policy Label and a Description. Leave the policy enabled, and leave Audit Logging set to Yes.

  4. In the TAG drop-down list, enter the name of the classification, for example, pii.
  5. Under Allow Rules or Deny Rules, select the roles, groups, or users in Select Roles, Select Groups, or Select Users.

    To exempt some users from a deny rule, add them under Exclude from Deny Rules. To add another rule, click below the rules table. To remove a rule, click the red delete button at the end of its row.

  6. In the Permissions column of the rule, click Add Permissions, select the UDF component, and then select the access types, such as Read Entity or Remove Classification.
    For the list of available access types, see Ranger services and resources for Cloudera Unified Data Fabric.
  7. Optional: To apply the policy only for a limited time, click Add Validity Period, and then set the start date, end date, and time zone.
  8. Click Save.

After the services refresh their policies, the policy applies to every asset, such as a table or a column, that has the classification, including assets that are classified later.