On Cloudera, Apache Ranger is the central place where Impala and Hive authorization is written. A policy names a resource (database, table, column), the users, groups or roles it applies to, and the access it allows. Ranger can also mask columns and filter rows, and it records every allow and deny in an audit trail. Write policies on groups and tags, test as a real user, and read the audit log first when access fails.
Product names and menus differ across Cloudera releases, so confirm details in your version's documentation. The policy examples below are illustrative and were not run in a Duczer East lab.
Policy model
A Ranger resource-based policy has four parts.
| Part | What it holds | Example |
|---|---|---|
| Resource | Database, table and column, with wildcards | sales_db, orders, all columns |
| Subjects | Users, groups or roles | group analysts_emea |
| Permissions | What is allowed | select, create, drop |
| Conditions | Extra limits | an IP range, or an allow with exceptions |
Impala and Hive share the Hive service in Ranger on Cloudera, so one policy can cover both engines. Impala's own authorization documentation explains how it uses Ranger. Our Ranger policy design guide covers naming and structure.
Good practice:
- Grant to groups from your directory, never to individual users.
- Deny only where an exception is needed. Use allow policies as the base.
- Name policies by purpose, such as
sales_read_emea, so an auditor can read them. - Use tag-based policies for sensitive columns, as in tag-based access with Atlas and Ranger.
Column and row controls
Ranger offers two kinds of policy beyond plain access.
- Masking policies change what a user sees in a column, for example showing the last four characters of an identifier, hashing it, or returning null.
- Row filter policies add a condition to every query by a user or group, for example
region = 'EMEA'.
Illustrative examples:
| Need | Policy type | Example |
|---|---|---|
| Analysts see customer name but not national ID | Mask | Show last four or nullify national_id for group analysts |
| Regional teams see only their region | Row filter | region = 'EMEA' for group analysts_emea |
| Data science reads a de-identified copy | Resource access | Select on a masked view only |
| Auditors read everything | Resource access | Select on all, with audit review |
Test every masking and row filter policy as a user in the target group. Check that both Impala and Hive return the same result, since a gap between engines is a leak.
Audit
Ranger logs each access decision, whether allowed or denied, with the user, resource, action and the policy that matched. Use it to:
- Find out why a user was denied.
- Prove who read sensitive columns for a given period.
- Find policies nobody uses.
- Spot access that is allowed more broadly than intended.
Decide how long audit data is kept and who can read it, since it records who looked at what. Cloudera's audit storage differs by release, so confirm where it lands and how long it stays.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| User denied on a table they should read | No matching policy, or the group is not synced | Check group membership and the Ranger access audit |
| Works in Hive, fails in Impala | Policy sync delay or a different service name | Check the policy refresh and the service the engine uses |
| User sees all rows | Row filter policy not enabled or the user is in an exempt group | Check the policy and group order |
| Column not masked | Mask policy attached to the wrong resource, or the user matches an allow without a mask | Check the policy evaluation order |
| New table not covered | Policy lists tables one by one | Use wildcards or tag-based policy |
| Admin cannot see audit | Missing Ranger audit permission | Grant the audit role |
When a user is denied, always open the audit entry first. It names the policy, or the absence of one, and saves guessing.
For policy design in depth, read Apache Ranger policy design. For the service, see SDX, Ranger and Atlas on Cloudera and Impala and Hive on Cloudera.
A short test routine
Before you tell anyone a policy works, test it as the people it affects.
- Create or pick a test user in each group the policy names.
- Run the same query in Impala and in Hive, and compare columns, masked values and row counts.
- Run a query the user should not be able to run, and confirm the denial appears in the audit.
- Change group membership and check that access follows after the sync interval.
- Keep the queries and results with the policy record, so a reviewer can repeat them.
Questions we hear
Does Impala use Ranger? On Cloudera, yes. Impala's documentation describes using Ranger for authorization, and Impala and Hive can share one policy service.
Can Ranger mask columns in Impala? Ranger supports masking and row filter policies for Hive and Impala on Cloudera. Test the result in both engines for your release.
Where do I see why access was denied? In the Ranger audit. It shows the user, resource and the matching policy.
Sources checked November 27, 2026:



