DatabricksSonakshi PandeyExplainer
Beyond embedding: How to secure AI/BI Dashboards for every viewer
Summary
Embedding a Databricks AI/BI Dashboard in a customer-facing application is straightforward; authorization determines which rows each viewer may see. The pattern supports external partners and internal Databricks teams with one dashboard and shared dataset, while applying different regional access and masking rules. An entitlements table stores partner IDs and IdP-synchronized group names alongside regions and PII-mask flags; a secured view filters on the signed __aibi_external_value from the embed token. Direct SQL access is separately protected by Unity Catalog row filters and column masks, which evaluate the querying user's identity and groups. The design provides a default-deny, pooled logical multi-tenancy model that centralizes rules while covering both application and workspace query paths.
Context
The central problem is enforcing viewer-specific row access and sensitive-field masking after embedding a shared Databricks AI/BI Dashboard. External partners access the dashboard without Databricks accounts, while internal teams use Databricks and identity-provider groups; both audiences need consistent controls without separate dashboards or manually repeated query filters.
Approach / What changed
Use one entitlements table as the source of truth and a secured view that matches its scopes against the signed __aibi_external_value in embed tokens. Protect direct Databricks SQL access separately with Unity Catalog row filters and column masks based on the querying user's identity and account-level groups. Resolve internal groups in the backend before minting tokens, fail closed when no entitlement exists, and keep sensitive values masked where required.
Takeaways
The same entitlements table can map external partner IDs and internal identity-provider group names to regions and masking requirements, avoiding per-customer dashboards and duplicated filters.
The backend signs external_viewer_id and external_value into the embed token; the viewer cannot modify the signed scope, and an unknown scope matches no rows for default-deny behavior.
Embedded queries run under the configured publishing identity, whereas Unity Catalog row filters for direct SQL evaluate the actual Databricks user's identity and account-level groups.
Source and freshness
- Source
- databricks.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.