How do Databricks Apps enforce Unity Catalog governance?
Summary
- Databricks Apps never get a private, ungoverned data path. Every query an app runs goes through Unity Catalog, so an app reaches only the data it has been granted, and access controls are applied on each request.
- Each app runs as an identity. Databricks creates a service principal for the app, and you grant that principal the Unity Catalog privileges it needs (for a table,
USE CATALOG,USE SCHEMA, andSELECTorMODIFY). - Apps can also act on behalf of the signed-in user. After single sign-on, an app can use the user's own identity to reach governed resources like SQL warehouses, so each person sees only what their permissions allow.
- Credentials stay out of app code. Unity Catalog manages connection credentials and surfaces a connection to the app through environment variables, so secrets aren't embedded in the application.
- Enforcement happens at the query engine, not in the app. Row filters, column masks, and privilege checks run where the query executes, so an app can't route around them.
How do Databricks Apps enforce Unity Catalog governance?
Databricks Apps enforce governance by never bypassing Unity Catalog. An app reads and writes through the same governed layer that secures every other workload on the platform, so it reaches only the tables, volumes, and connections it has been granted, and Unity Catalog applies access controls on every request. There is no separate data path for application code. An app is an identity with explicit privileges, and enforcement happens where the query runs.
The two identities an app can use
Every Databricks App has an associated service principal that Databricks creates for it. This is the app's own identity: you grant it the Unity Catalog privileges the app needs, and all users of the app share that access. It fits work that doesn't depend on who is logged in, like scheduled tasks, logging, or system actions.
Apps can also authorize on behalf of the signed-in user. After a person signs in through single sign-on, the app can use that user's identity to reach governed resources such as SQL warehouses, honoring the fine-grained permissions Unity Catalog already holds for them, without granting those permissions to the service principal. An app declares the OAuth scopes it needs in its manifest, which bounds the APIs and resources it can touch. A builder picks shared-identity access or per-user access for each part of an app.
Key capabilities to evaluate
These are the controls to require of any platform's application layer before you trust it with governed data.
| Governance capability | Why it matters |
|---|---|
| App runs as a governed identity | The app is a principal with explicit grants, not an anonymous process holding a static key. |
| Per-user authorization option | Sensitive screens can resolve data against the signed-in user's permissions, not one shared role. |
| Central privilege model | One place defines who can read or write each catalog, schema, table, volume, and connection. |
| Fine-grained controls at query time | Row filters and column masks apply automatically, so users see only permitted rows and columns. |
| Credentials managed by the platform | Connection secrets aren't embedded in app code; the platform vends them. |
| Uniform enforcement across surfaces | The same rules apply whether a query comes from an app, a notebook, a dashboard, or an agent. |
How Databricks approaches it
Databricks Apps rely on Unity Catalog for identity, resource grants, and governed access.
- Governed resources with explicit grants. You add a Unity Catalog table, volume, or connection to an app as a resource, and Databricks grants the app's service principal the privileges required to use it: for a table,
USE CATALOGon the parent catalog,USE SCHEMAon the parent schema, andSELECTorMODIFY; for a volume,READ VOLUMEorWRITE VOLUME; for a connection,USE CONNECTION. Automatic granting works when the privilege is available to all account users or you holdMANAGEon the object. - Credentials out of code. A connection's credentials are managed by Unity Catalog and are not exposed to application code; the connection is surfaced to the app through environment variables.
- Enforcement at the SQL engine. Unity Catalog enforces access where the query executes. On each request it checks that the calling identity holds the needed privileges, then applies row filters and column masks transparently. Because enforcement lives at the engine, an app gets the same governed result any other client would, and it can't read around a mask or a filter.
- Attribute-based policies. Beyond direct grants, Unity Catalog supports attribute-based access control using governed tags, so a policy written once against a classification such as a
piitag applies to every table that carries the tag.
Use cases
- Operational internal tools. An app that lets an ops team update records writes back through the service principal's
MODIFYgrant, and every change stays governed. - Per-user analytics front ends. A reporting app authorizes on behalf of the signed-in user against a SQL warehouse, so each viewer's row filters and column masks are resolved to their own permissions.
- Agent and AI interfaces. An app that hosts an agent uses the same grants, so the agent's tools read only governed data.
FAQs
Does a Databricks App have its own identity?
Yes. Databricks creates a service principal for each app. You grant that principal Unity Catalog privileges, and the app accesses data as that identity unless it is authorizing on behalf of a signed-in user.
Can an app show each user only their own data?
Yes. With user authorization, the app uses the signed-in user's identity after single sign-on, so Unity Catalog resolves that person's grants, row filters, and column masks.
Are database or connection credentials stored in app code?
No. Unity Catalog manages connection credentials and does not expose them to application code. The connection is provided to the app through environment variables.
Can an app bypass Unity Catalog to reach data directly?
No. Enforcement happens at the query engine, so any read or write passes through Unity Catalog's privilege checks and fine-grained controls. An app can't route around governance.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.