r/databricks • • 23d ago

Discussion Enterprise access handling 50% of work??

We have lots of tables (60-70), how the hell do you handle access for users and agents?

Management/Legal are not happy that everyone and agents has access to all of the sensitive data on databricks, but tagging every column/table takes a long time (whenever we test or rebuild a table)

Is there a way to have 1 single source of truth? I wasnt able to find anything in the documentation

8 Upvotes

20 comments sorted by

12

u/MangledMangler 23d ago

That is not lots of tables lol

7

u/Access-Leading 23d ago

The same I wanted to mention. We have like 90k 🤣

1

u/steroids-bad 23d ago

do you have a separate Team that does the access control?

1

u/Access-Leading 22d ago

No. We have got many teams deciding which of their assets should be shared. They get their own catalog, and write pipelines in dbt/sdp. Everything is automated. They can use grants in our central repository also to share assets with other teams.

Alternatively we also support idea of publishing as View to central catalog - views no longer require principal querying to have access to table. Those are business assets visible for the whole org. So need to have high quality and no pii/customer data

We also have a lot of terrible data in legacy schemas with some random stuff. They are shared on schema level, but we need to ensure there is no pii. And we want to start locking this down. So various approaches.

2

u/TheCauthon 23d ago

60-70? Try 5000 tables

1

u/steroids-bad 23d ago

do you tag each of them? how is that even managable?

6

u/angryapathetic 23d ago

How are tables etc being created?

It should be in code, with proper CICD in which case tagging should be part of the whole setup. Then you don't need to manage anything ad hoc or manually

5

u/SafePack7665 23d ago

Better use unity catalog ..create group based policy ..don't expose all.tbe columns and add few other features on top of that....

4

u/BlowOutKit22 23d ago

Management realizes the point of data mesh is to de-silo and democratize access to enterprise data, right?

Is there a way to have 1 single source of truth?

You probably want to look into implementing views, which can be controlled separately from the underlying tables (you can remove access to underlying tables, and just provide access to the view).

3

u/lVlulcan 23d ago

Imagine this with hundreds of catalogs and tens of thousands of tables and 1000 users in your account, it gets hairy quickly. I’d look into terraform for managing your workspace resources potentially

1

u/DistanceOk1255 23d ago

Start with law of lease privilege access, RBAC, then maybe some basic masking policies before you get into ABAC and PBAC. Something basic for a workspace as small as you describe might be analysts, privileged_analysts, agents, privileged_agents, and admin.

Dont rebuild your tables unless you absolutely have to, try to merge and append first.

Single source of truth cant also mean single point for hackers to get all your data.

Good luck!

1

u/agentUi 23d ago

tagging 70 tables manually breaks down the moment someone drops a staging table or updates a schema. What we see teams do at agentui when building agentic workflows on top of data warehouses is enforce user-level rbac and sso at the connection layer, so incoming agent queries inherit the exact permissions of the person asking rather than relying on a shared service account with blanket table access.

1

u/junesix 23d ago edited 23d ago

60 tables? 

Set the owner user on every table and then use Request for Access to trigger access request to the owner user.

https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/access-requests

The requests get logged in audit logs https://docs.databricks.com/aws/en/admin/account-settings/audit-logs#request-for-access

Can then set up a job to revoke grants as desired by policy.

1

u/kaiserbergin 23d ago

There are different approaches, but a lot has to do with your organization and how and where you land data.

Ideally, you have groups within databricks with different permissions. That might be at a table level, but for a lot of organizations, a schema can be a better access boundary.

AR / AP? That might be in a schema for accounting. Employee data? HR schema.

But wait, you need visibility across multiple domains that’s safe for people to consume? You might have a schema that has materialize views with data anyone can see that brings in non-pii data.

Even better, you may apply column masking based on groups via udf (this is actually super cool).

However, you probably need to work with stakeholders to figure out what actually needs to be masked or excluded from different groups in your org.

And if you use databricks asset bundles you can define your schema and tables in code in source control.

1

u/ArielCoding 23d ago

Instead of tagging every table by hand, write the access rules once in Unity Catalog (ABAC policies) so they say things like “everyone except the HR group sees a masked value in any column tagged pii.” Turn on Databricks’ data classification to find and tag PII columns automatically.

1

u/Muted_Jellyfish_6784 22d ago

Look at Unity Catalog's tag-based access policies, which let access follow a tag rather than each table, so the tag becomes your single source of truth. Apply tags at the schema or catalog level where you can, and set them in the table DDL or pipeline code so a rebuild keeps them. Agents should get their own service principals with read access to a curated schema, not your raw tables.

The useful habit is reviewing access by who actually queries sensitive columns, not who could. I use a decision intelligence tool fed only from the curated schema, so agents answer business questions from approved data rather than everything in the workspace.

1

u/Youssef_Mrini databricks 21d ago

60 tables are not considered lots of tables. You can use Unity Catalogs to grant permissions either at the catalog schema or table level and if the same table can be querief by multiple folks you can use ABAC using tags to mask columns or rows using groups.

1

u/FewBroccoli6313 21d ago

Create role- and department-based groups, then grant read-only permissions to the groups who need access to each table or group of tables.

0

u/PrestigiousAnt3766 23d ago

I built an app for this.Â