Access control
Follow a privilege from catalog to table. Apply row filters, column masks, and governed tags to limit what different groups can see.
Three access control systems
Access is controlled at three levels, each with its own system. Most of this module is about the third one, Unity Catalog privileges on data.
| Level | Objects | System |
|---|---|---|
| Account | Users, groups, service principals, workspaces | Account roles (account admin, service principal manager/user...), apply across all workspaces |
| Workspace | Notebooks, folders, clusters, jobs, SQL warehouses, dashboards | Workspace object ACLs (Can View, Can Run, Can Edit, Can Manage...) |
| Data | Catalogs, schemas, tables, views, volumes, functions, models | Unity Catalog privileges (GRANT / REVOKE) |
Privilege model
- Privileges are granted on a securable (catalog, schema, table, volume, function, external location...) to a principal (user, group, service principal).
- Privileges inherit downward:
SELECTgranted on a catalog applies to all current and future tables in all its schemas. - To use an object you also need access to its parents:
USE CATALOGon the catalog andUSE SCHEMAon the schema. - Owners and metastore admins can grant. Users with
MANAGEon an object can grant on it too.
USE CATALOG on the catalog + USE SCHEMA on the schema + SELECT on the table (or on the schema/catalog). Missing USE CATALOG is the classic reason a user with SELECT still gets "permission denied".
Common privileges
| Privilege | Allows |
|---|---|
USE CATALOG, USE SCHEMA | Traverse into the catalog/schema (no data access by itself) |
BROWSE | See object metadata in Catalog Explorer and search without data access |
SELECT | Read a table or view |
MODIFY | Insert, update, delete, merge data in a table |
CREATE SCHEMA, CREATE TABLE, CREATE VOLUME, CREATE FUNCTION, CREATE MATERIALIZED VIEW | Create child objects |
READ VOLUME, WRITE VOLUME | Read or write files in a volume |
EXECUTE | Call a function or use a model |
REFRESH | Refresh a materialized view or streaming table |
MANAGE | Manage privileges and ownership on the object without owning it |
ALL PRIVILEGES | All applicable privileges (except MANAGE-type admin rights) |
READ FILES, WRITE FILES, CREATE EXTERNAL TABLE | On external locations |
Some slides list INSERT, UPDATE and DELETE as Unity Catalog privileges. They are not: one MODIFY privilege covers insert, update, delete and merge.
GRANT, REVOKE, SHOW GRANTS
GRANT USE CATALOG ON CATALOG prod TO `analysts`;
GRANT USE SCHEMA, SELECT ON SCHEMA prod.sales TO `analysts`;
GRANT MODIFY ON TABLE prod.sales.orders TO `etl-sp`; -- service principal (by application ID or name)
GRANT CREATE TABLE ON SCHEMA prod.sales TO `data-eng`;
REVOKE SELECT ON SCHEMA prod.sales FROM `analysts`;
SHOW GRANTS ON TABLE prod.sales.orders;
SHOW GRANTS `analysts` ON SCHEMA prod.sales;
ALTER TABLE prod.sales.orders SET OWNER TO `data-eng`;
Principals with special characters (hyphens, @) are quoted in backticks. In the UI: Catalog Explorer, select the object, Permissions tab, Grant.
What about DENY?
The exam guide lists GRANT, REVOKE and DENY. In Unity Catalog, the documented model is grant-only: there is no DENY statement, and access is removed by REVOKE or by not granting it. DENY exists in the legacy Hive metastore table access control (the hive_metastore catalog), where an explicit deny overrides grants. Fine-grained restriction in Unity Catalog uses row filters, column masks and ABAC policies. The official sample question offers "set a DENY permission on the column" as a wrong answer for masking. I could not confirm whether Databricks has added a Unity Catalog DENY since; check the current Manage privileges documentation before your exam.
Row filters and column masks
Both are SQL UDFs attached to a table. They run on every query, for every user, so one table serves everyone with different visibility. Membership checks use is_account_group_member('group') (account-level groups). current_user() returns the user's email.
-- Row filter: admins see all rows, others only US rows
CREATE FUNCTION prod.sec.us_only(region STRING)
RETURN IF(is_account_group_member('admins'), TRUE, region = 'US');
ALTER TABLE prod.sales.orders SET ROW FILTER prod.sec.us_only ON (region);
ALTER TABLE prod.sales.orders DROP ROW FILTER;
-- Column mask: only finance_team sees full card numbers
CREATE FUNCTION prod.sec.mask_card(card STRING)
RETURN CASE WHEN is_account_group_member('finance_team') THEN card
ELSE concat('****-****-****-', right(card, 4)) END;
ALTER TABLE prod.sales.payments ALTER COLUMN credit_card_number SET MASK prod.sec.mask_card;
ALTER TABLE prod.sales.payments ALTER COLUMN credit_card_number DROP MASK;
Older alternative: dynamic views, a view with CASE WHEN is_account_group_member(...) logic, granting users access to the view only.
ABAC policies New exam
Attribute-based access control scales row filters and column masks. Instead of attaching a function to each table, you:
- Tag data with governed tags (e.g. column tag
pii = ssn, table tagsensitivity = high). Governed tags have controlled allowed values and who may assign them. - Write a policy once at the catalog, schema or table level that says: for these principals (except these), on tables/columns matching these tag conditions, apply this row filter or column mask function.
- Every current and future table matching the tags is protected automatically, inherited down the hierarchy.
-- illustrative syntax; check the docs for the exact form
CREATE POLICY mask_ssn
ON CATALOG prod
COLUMN MASK prod.sec.mask_ssn
TO `account users` EXCEPT `hr_admins`
FOR TABLES
MATCH COLUMNS has_tag_value('pii', 'ssn') AS ssn_col
ON COLUMN ssn_col;
| Table-level row filter / column mask | ABAC policy | |
|---|---|---|
| Applied to | One table/column at a time | All matching objects under a catalog/schema, by tags |
| New tables | Must be protected manually | Protected automatically once tagged |
| Best for | A few specific tables | Central, scalable governance of sensitive data |
Other access controls
These are the non-data controls from the workspace level of the first table:
- Workspace object ACLs: notebooks and folders (Can Read, Can Run, Can Edit, Can Manage), clusters, jobs, pipelines, SQL warehouses (Can Use, Can Manage), dashboards.
- Secret scope ACLs: READ, WRITE, MANAGE.
- Entitlements: workspace access, Databricks SQL access, cluster creation.
Trace an access request
A new group has SELECT on a table in a production schema. Its members still cannot read it. List the additional namespace privileges to check.
Check your reasoning
Check USE CATALOG on the containing catalog and USE SCHEMA on the containing schema. Grant the missing privileges to the group and verify the underlying table grant.
Product reference
Access control in Unity Catalog in the Databricks documentation
Access control quiz
Answer 5 questions. Check each answer for an explanation.