Restricting search results with a row-filter policy

Add a row filter to the default rowFilter: all - catalog policy of the awc_udf service to limit which assets a user or group can find, for example, only assets in one data source or assets without a sensitive classification.

The users or groups have the search permission on the catalog. For more information, see Granting users permission to search the catalog.

A row-filter expression is applied inside every search request of the user, together with the search terms and filters that the user selects. The user finds only the assets that match the expression, in every type of search. A user's own filters can narrow the results further

Ranger checks a search request in two stages. First, the user needs the Search permission on the catalog, or the request is denied. Then, if a row-filter rule with a filter expression applies to the user, the expression is added to the search. If no row-filter rule applies, or its expression is empty, the user's results are not filtered.

You can also create a separate row-filter policy on the catalog resource, but Cloudera recommends that you add rules to the default policy unless you have a specific reason for a separate one.

  1. In the Ranger Admin web UI, click Resource Policies, and then click awc_udf under Cloudera Unified Data Fabric.
  2. Click the Row Level Filter tab and in the Actions column of the rowFilter: all - catalog policy, click .
    The Edit Policy page opens for the row-filter policy.
  3. In the Row Filter Rules panel, add a rule by clicking under the table.
    Do not change the existing rule, which applies to the administrator and the Cloudera Unified Data Fabric services.
  4. In the new rule, select the users, groups, or roles, add the Search permissions, and add a row filter expression.

    For example, deployment = 'hive:prod' limits the results to assets in the production Hive deployment. For the expression syntax, see Row-filter expression syntax for catalog search.

  5. Click Save.

After the services refresh their policies, the users and groups find only the assets that match the expression.