Databricks Assume Role

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a databricks assume role flow by linking a cloud role to compute clusters. This setup lets jobs read and write cloud data without static keys in notebooks. Data teams often assign one shared role to an entire workspace to save time. When that shared role has broad permissions, any user on the cluster can read sensitive buckets. Overly broad roles also let bad queries alter or delete production tables by mistake. How a databricks assume role setup works In a standard cloud setup, yo

Role-Based Access Control (RBAC): the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up a databricks assume role flow by linking a cloud role to compute clusters. This setup lets jobs read and write cloud data without static keys in notebooks. Data teams often assign one shared role to an entire workspace to save time. When that shared role has broad permissions, any user on the cluster can read sensitive buckets. Overly broad roles also let bad queries alter or delete production tables by mistake.

How a databricks assume role setup works

In a standard cloud setup, you first create an identity role in your cloud account. You attach a storage policy to this role that grants read or write rights. Next, you set up a trust policy so the workspace control plane can use that role. You also allow the compute nodes to take on the role when they boot up.

Admins then register this cloud role inside the workspace settings and assign it to users. When a data engineer starts a cluster, they pick the registered role from a list. The cloud provider gives the cluster temporary credentials that rotate on a set schedule. Jobs running on that cluster use those temporary keys to read files from object storage.

Newer catalog tools can also manage storage roles at the table level instead of the cluster level. In that model, the catalog service assumes the cloud role on behalf of the user. It then sends short-term storage keys down to the compute workers for specific table reads. Both methods remove the need to paste secret keys directly into code or job settings.

Where native role setups leave gaps

Using assumed roles solves the problem of hardcoded cloud keys in user notebooks. It also centralizes storage rights inside your cloud provider instead of scattering them across scripts. Cloud logs will show that the cluster role read a bucket at a certain time.

Still, a cloud role only checks who starts a cluster or requests a storage path. It does not inspect the actual SQL statements or Python commands running inside the session. Once a cluster assumes a role, every command on that shared node inherits those storage rights. If a table holds emails, phone numbers, or card numbers, the role returns everything.

Role-Based Access Control (RBAC): architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Cloud trail logs also struggle to tie a specific storage read back to one person. When five engineers share one cluster, the cloud log only records the shared cluster role. You cannot see which user ran a risky command or pulled raw customer records. Native role assignment controls the door at login, not what queries do in flight.

Why teams need query and command controls

Securing data workflows requires looking past the initial cloud role handoff. Teams need a way to check individual statements before they hit the compute engine. When you inspect commands in flight, you can block drops or full table dumps right away. You can also apply rules that rewrite matched fields like national IDs in query results.

Tying every action to a single human user is just as important for audits. Instead of logging a shared machine role, your audit trail should record the actual person. Combining least-privilege cloud roles with live command checks closes the gap left by cluster permissions.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

What is the difference between a cluster role and catalog credentials?

A cluster role gives every user on that compute node the same cloud storage rights. Catalog credentials tie cloud roles to specific tables and grant access per query.

Why do shared cluster roles create audit gaps?

Cloud logs record the role name rather than the person running the notebook cell. When multiple people share a cluster, all storage reads look identical in cloud logs.

Does an assumed role hide sensitive columns in results?

No, a cloud role only grants or denies access to storage buckets and files. Rewriting fields like emails or card numbers in results requires a separate data masking rule.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.