Short answer: tag the data, write policies on the tags and on attributes of the user and the purpose, and apply masking and row filters when the query runs. That way one table serves analysts, researchers and AI agents, each seeing what their purpose allows. The agent needs its own identity so the same rules apply to it.
What is attribute-based access control?
NIST's guide to ABAC (SP 800-162) defines it as granting or denying a request using attributes of the subject, attributes of the object, environment conditions and a set of policies written in terms of those attributes. An attribute is a name and a value. The guide's example is that all nurse practitioners in a cardiology department can view the records of heart patients, with no rule that names a person. Its main benefit is that a decision can change by changing an attribute value, without rewriting the rules, and a new user who carries the right attributes needs no rule change. Its main cost is that the attributes must be accurate, because they now carry the decision.
How tag-based policy works
A tag such as "sensitive" or "regulated" is attached to a column or table. A policy says who may see tagged data and under what conditions. New data that gets the tag inherits the rule. That moves the risk to classification, so how tags arrive matters more than the tool. Cloudera's Ranger documentation describes tag-based masking this way: the mask applies from the tags and tag values on a column, usually classifications from Atlas, rather than from where the column sits.
Which policy model should we use?
| Model | Decides by | Good for | Weak spot |
|---|---|---|---|
| Role-based | The role a person holds | Stable teams and platform areas | Role count grows with every exception |
| Tag-based | The classification on the data | Sensitive data across many tables | Untagged data is not covered |
| Attribute-based | Attributes of user, data and context | Rules such as region, department or purpose | Poor attribute quality gives wrong decisions |
| Purpose-based | A stated purpose with an approval and an expiry | Privacy and AI use | Needs a workflow and a record of each approval |
Dynamic masking
Dynamic masking changes what a query returns without changing the stored data. Snowflake describes its masking policies as column-level rules that hide or partly hide values when a query runs, with the result depending on the policy conditions, the execution context and the role hierarchy. A policy can be reused across many columns. Cloudera's Ranger masks sensitive columns at query output and can show, for example, only the first or last four characters.
| Technique | What the user sees | Watch for |
|---|---|---|
| Column mask | A hashed or partial value | Joins that depend on the raw value |
| Row filter | Only the rows they may read | Performance on large tables |
| Purpose approval | Access for a stated purpose and period | Expiry and a record of each approval |
Check each platform's limits before you design around it. Snowflake allows one masking policy on a column at a time and requires Enterprise Edition or higher for the feature. Cloudera warns that users with ALTER permission on a table can override row-filter and masking policies, so keep that permission tight on protected tables. Neither limit is visible in a design diagram, so test for it.
AI agents
Give each agent its own identity. Do not let agents share a service account that sees everything. Apply the same masking and purpose rules to the agent as to a person, and log each read. An agent that retrieves data for a user should carry that user's attributes as well as its own, or the policy cannot tell whose purpose it is serving.
What does a policy look like in plain words?
| Rule | Attributes used | Effect |
|---|---|---|
| Analysts see card numbers last four only | Data tag: payment card. User attribute: analyst | Partial mask |
| Regional staff see their own region's rows | User attribute: region. Row attribute: region | Row filter |
| A research agent reads customer data for model testing | Agent identity, stated purpose, approval with expiry | Masked values until the approval lapses |
| Support staff see names but not account numbers | Data tags and the support role | Column mask on one tag |
Design checklist
- Name the data classes and how tags arrive on new tables.
- Choose a policy model per class.
- Decide where each rule is enforced and what a bypass looks like.
- Write policies as reviewed, versioned files.
- Test with synthetic data, never real records.
- Check the audit record for one read.
- List unclassified tables every week, so untagged data does not slip through.
Questions we hear
Do we need ABAC, or are roles enough? Roles are enough while the rules are few and stable. Add attributes when the same rule would otherwise need a new role for every region, team or purpose.
Does masking protect data used to train a model? Only if the training job reads through the masked path. A job that reads files in storage directly may not pass through a query-time mask, so decide where the control sits before you choose it.
For the wider picture, see what data access governance is.
A first engagement
Duczer East offers a data access governance assessment: we map your data classes, policy models and enforcement points, test a sample of users and agents and hand back a ranked list of fixes.



