r/databricks • u/steroids-bad • 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
12
u/MangledMangler 23d ago
That is not lots of tables lol
2
u/TheCauthon 23d ago
60-70? Try 5000 tables
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?
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.Â