Duczer East
Healthcare

In-perimeter AI on governed clinical and operational data.

Financial Services

Private AI and data platforms built to clear model-risk and audit review.

Financial services

Private AI, KYC/AML, API gateways and data governance for banks.

Insurance

Change data capture, governed agents and integration for insurers.

Healthcare

PHI document intelligence, FHIR APIs and in-perimeter AI for health systems and plans.

GuideCloudera / Data Services & AI6 min read

Tag-based access control on Cloudera: from Atlas classification to Ranger policy

Classify once, enforce everywhere the tag travels

Authored byCo-Founder and Managing Partner, Duczer East
Part of the Insights topic: Private AI & Data Architecture
On this page
  1. How the pieces fit
  2. Classify with Atlas
  3. Map tags to policies
  4. Test
  5. When tag policies do not take effect
  6. Operate
  7. Questions we hear

To control access by classification on Cloudera, classify data in Atlas, let Ranger TagSync carry the tags into the Ranger tag store, and write policies against the tags. A new column that carries a tag picks up its rules without a new policy. Test with real users, then run a review cycle.

How the pieces fit

Cloudera describes tag-based control as separating two jobs: classifying a resource, and authorizing access to it. You tag resources such as Hive tables or HDFS files with labels like PII, PCI or PHI, and the authorization for the tag is enforced automatically, so you do not write a policy for each resource. One tag policy can govern several components, without separate services and policies in each.

PieceJob
AtlasHolds classifications and attaches them to databases, tables, views and columns
Ranger TagSyncA daemon, similar to UserSync, that receives change notifications from Atlas and updates the tag store
Tag storeRanger Admin keeps tag details in its policy store and serves them to plugins over REST
Ranger plugins in Hive and ImpalaCache the tags, poll the store for changes, and evaluate tag policies with the request

The plugins also keep a local cache file. If the tag store cannot be reached on a restart, they use that file, so a short outage does not strip protection.

Classify with Atlas

Atlas holds classifications such as personal data. You can apply them by hand, by rule or through lineage propagation, where a tag on a source column follows later columns made from it. Cloudera states that no manual step is needed for propagated tags, and the Ranger policies built on them apply to the new location. Prefer rules over manual tagging, because hand-applied tags drift.

Classifications can carry attributes, and Ranger policies can read them. Cloudera's example marks a column as a national ID with an attribute naming the region whose rules apply, such as EU or JPN, and policies then apply different mask patterns by region. Use attributes when one tag needs more than one treatment.

Map tags to policies

Ranger TagSync receives tag details from Atlas through change notifications. The service user it runs as needs read access to classifications, business metadata and labels in Atlas. The tag service in Ranger must be linked to the Hive, Impala and other services you want the tags to govern.

A tag policy then names the tag and the access it grants or denies. The shape below is an illustration of a Ranger tag policy, not an export. Take the real service name and access types from your own cluster.

json
{
  "service": "<tag-service-name>",
  "name": "personal-data-analysts-deny",
  "policyType": 0,
  "resources": { "tag": { "values": ["PII"], "isExcludes": false } },
  "denyPolicyItems": [
    { "groups": ["analysts"],
      "accesses": [ { "type": "hive:select", "isAllowed": true } ] }
  ]
}

Treat this as a sketch.

Tag policies can also mask. A tag-based masking policy targets columns by their tags and attribute values, so one rule can mask every column tagged as a national ID, wherever it sits. Remember that the usual Ranger evaluation order applies: a matching deny is checked before an allow. See Apache Ranger policy design for the order.

Test

  1. Tag one column in a test table, wait for TagSync, and confirm the tag appears in Ranger.
  2. Query as a user in the denied group in each engine, and confirm the denial.
  3. Create a derived table and confirm the tag propagated and the policy applies.
  4. Check the Ranger audit shows the denial.
  5. Remove the tag and confirm access returns after the plugins refresh their cache.

Plugins poll for tag changes, so a new tag is not instant. Build a wait into tests and into your change windows.

When tag policies do not take effect

SymptomLikely causeCheck
Tag never shows in RangerTagSync is stopped, or its service user cannot read classifications in AtlasTagSync health and the Atlas permissions of its user
Tag shows but the policy does nothingThe tag service is not linked to the Hive or Impala serviceThe tag service setting on each resource service
New column is not coveredNo classification, or propagation did not runThe lineage link and the classification on the new column
Group policy fails for some usersCloudera notes group policies may fail where SSSD gives a group more than one GIDThe group mapping; Cloudera suggests adding the Hadoop native library path to the Atlas process

Operate

CheckHow oftenWhy
TagSync running and healthyDailyTags stop flowing if it stops
Unclassified tables listWeeklyUnclassified data falls outside tag policies
Policy reviewQuarterlyKeep the set small and owned
Test queries as each roleAfter every changeCatch drift early

Tag-based policies restrict data access, not the metadata shown in a catalog. Cloudera says to control access to the metadata of a tagged asset with a resource-based policy on Atlas, so plan metadata visibility separately. Cloudera also ships a default tag policy for an EXPIRES_ON tag, which can time-limit access using a date attribute. Test the date logic carefully on your release before you rely on it.

Questions we hear

Is a tag policy better than a resource policy? It is better for sensitive data spread over many tables. Resource policies stay simpler for platform areas.

What if the data is not classified yet? Then no tag policy covers it. Keep new areas closed, with no allowing resource policy, until classification catches up.

For the design of the resource side see Apache Ranger policy design, and for a worked example tag-based access control for a bank.

Related: Impala and Hive authorization with Ranger

Frequently asked questions

How do Atlas tags reach Ranger?

Ranger TagSync is a daemon that receives classification changes from Atlas and updates the Ranger tag store. Tag-based policies then apply to the tagged data.

Do classifications follow derived data?

Atlas lineage can propagate a classification to columns created later from the same data, and policies built on that tag then apply to the new location.

Why do our tag policies not take effect?

Common causes: the TagSync service user cannot read classifications in Atlas, the tag service is not linked to the Hive or Impala service, or the data has no classification.

Do tag-based policies hide metadata in the catalog?

No. Cloudera notes that tag-based policies restrict data access but do not change metadata shown in metadata services.

Where do Ranger plugins get tag information?

Ranger Admin serves tags from its tag store over REST. Plugins cache them, poll for changes and keep a local cache file for restarts.

Can tag policies mask data?

Yes. Tag-based masking policies target columns by their tags and attribute values, so one rule can cover every column carrying a tag.

Can one tag need different treatment by region?

Yes. Classifications can carry attributes, and Ranger policies can read them. Cloudera's example applies different mask patterns by a region attribute.

Authored by

Co-Founder and Managing Partner, Duczer East

David deBoisblanc is co-founder of Duczer East and a digital transformation and innovation leader in data-centric AI, agentic systems, and enterprise integration. He shapes intent-driven AI solutions that modernize how organizations use data, drawing on deep experience with Cloudera and complex enterprise integration landscapes.

Newsletter

The Practitioner's Briefing

Senior-level insights on agentic AI, data engineering and enterprise integration, delivered to your inbox.

One email when there is something worth reading. Unsubscribe any time.

Let's Talk

Want to discuss the ideas raised here?

Tell us what you are working on. A senior practitioner replies, and only your email is required.

Get a quote