Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Managed identities with databricks cluster

Can we use managed identities with databricks? What I'm actually trying to achieve is, I have a cluster in databricks, I want it to be able to access secrets or keys stored in an azure key vault.
We generally perform this with VM, by enabling the managed identity and allowing that identity via access policy or Role-based access policy(RBAC) in key vaults.

Can we leverage the concept of manged identities in a similar way with databricks as well? Or is there any other way possible which I can use to access the secrets in key vault from databricks clusters?

P.S. The secret accessed in key vault will be used in init script of the databricks cluster, to perform decrypt opertations.

like image 296
Sandip Kumar Avatar asked Mar 14 '26 11:03

Sandip Kumar


1 Answers

Managed identity in Azure Databricks isn't supported yet. But right now you can pass the value of secret as an environment variable, and it will be available in your init script - just specify in cluster configuration:

MY_PASSWORD={{secrets/scope/key}}

and then use in the init script:

if [ -n "$MY_PASSWORD" ]; then
  use password
else
  exit 1
fi
like image 61
Alex Ott Avatar answered Mar 15 '26 23:03

Alex Ott



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!