Good Ranger design is a small set of policies, each with an owner, written by role and by classification rather than by individual. Use resource policies to start, tag-based policies once classification exists, and row and column controls where the engine enforces them. Review the set on a schedule so it stays explainable.
The policy model
Ranger authorizes access to resources in each service, for example Hive tables, Impala tables, HDFS paths or Ozone buckets. A policy lists the resource, who may do what, and conditions. Cloudera lists four access conditions: Allow, Exclude from Allow, Deny and Exclude from Deny. Deny policies and exceptions exist, but every one is a rule you must later explain.
How Ranger decides: evaluation order
Knowing the order stops most policy arguments. The Apache Ranger design notes set it out like this:
- Deny conditions are checked first. If a request matches a deny and none of that policy's deny-excludes, access is denied.
- A matching deny-exclude lets the request move on to the next deny condition.
- If nothing denied it, allow conditions are checked. A match with no matching allow-exclude grants access.
- If no allow matches, the result is undetermined. Most components then deny. HDFS and YARN fall back to their own native ACLs instead.
Cloudera's pages state the same default: with no allowing policy, the request is typically denied. The practical rule is that a deny always beats an allow, so use a deny only when you mean it to be final, and use an exclude when one person is the exception.
Resource policies versus tag policies
| Question | Resource policy | Tag policy |
|---|---|---|
| Written against | A named database, table or column | A classification such as personal data |
| New data | Needs a new policy or a wildcard | Covered once the data carries the tag |
| Best for | Platform areas and teams | Sensitive data across many tables |
| Risk | Wildcards grow too broad | Unclassified data is not covered |
| What it controls | Data access, and metadata when written on Atlas | Data access only, not the metadata shown in a catalog |
Start with resource policies for platform areas, and add tag policies when Atlas classification is in place. The Atlas-to-Ranger pattern shows how.
Security zones for separate owners
When different teams own different data, a security zone lets each manage its own policies. Cloudera describes a zone as a set of resources, such as a Hive database and some HDFS paths, whose policies only apply inside the zone. When a request arrives, Ranger works out which zone holds the resource, and only that zone's policies apply. A resource that matches no zone falls to the default zone.
- Only users with the ROLE_SYS_ADMIN role create, change or delete zones.
- Zone administrators manage policies for their zone only, and zone auditors can read but not change them.
- A resource cannot belong to more than one zone, and Ranger rejects zones that overlap.
Zones suit a bank with a finance and a markets team on one cluster. They add a layer to explain, so do not create them for a single team.
Row and column controls
Ranger can mask a column or filter rows for the engines that enforce those policies. Use masking for fields that analysts need in shape but not in value, and row filters for data that belongs to one region or business unit. Cloudera documents these mask types for Hive:
| Mask | Result |
|---|---|
| Redact | Letters become x and digits become n |
| Partial, last 4 or first 4 | Only those characters show |
| Hash | The whole value becomes a hash |
| Nullify | The value becomes NULL |
| Date, year only | Month and day are set to 01/01 |
| Custom | Any Hive function that returns the column's type |
Four rules from the Cloudera pages shape the design:
- Each column needs its own masking policy, and wildcards are not supported there.
- Masking conditions are evaluated top to bottom in the order listed.
- An audit entry is written each time a mask applies.
- Cloudera warns that users with ALTER permission on a table can override row-filter and masking policies. Keep ALTER tight on protected tables.
Cloudera also notes that when a row filter or mask applies to a user on a table, insert, update, delete and export are denied for that user on it. Plan the write path for those tables. Test each rule with a real user in each engine, because the engines that reach the data may differ in what they enforce. For example, the Iceberg REST catalog path does not support masking or row filtering, as covered in the REST catalog guide.
A review process
- Name an owner for every policy and record it in the description.
- Use groups that map to roles, not to individuals.
- Review policies every quarter: remove unused, merge overlapping, narrow broad ones.
- Export the policy set and keep the history as audit evidence.
- Test a sample of users after each change.
Smells that mean the set needs cleaning
| Smell | Why it hurts | Fix |
|---|---|---|
| Policies named after people | Nobody can tell why a rule exists once the person moves | Move to role groups |
| Many deny policies with excludes | The outcome depends on evaluation order, which few people hold in their head | Replace with narrower allows |
| Wildcards on a whole database | New tables get access nobody approved | Name the tables or use a tag |
| No owner in the description | No one answers the audit question | Add an owner and a review date |
| A tag policy with no unclassified-data check | Untagged data is not covered | List unclassified tables weekly |
Questions we hear
Do deny policies override allow policies? Yes. Deny conditions are checked first, and a matching deny ends the check unless a deny-exclude applies.
Should we use zones or just groups? Start with groups. Add zones when separate teams must administer their own policies.
Policy design is one part of governance. The wider operating model, catalog and quality rules are on our data governance consulting page, and the Cloudera view is on Ranger and Atlas on Cloudera.
A first engagement
Duczer East offers a policy review: we export your policy set, map it against the checks above, test a sample of users in each engine and hand back a short list of fixes with owners.




