Skip to main content

A PDM package to sync Azure users, roles and service principals to Databricks

Project description

databricks-azure-ad-sync-provider

Prerequisites: Authentication

There are multiple options to authenticate to Microsoft Entra ID and Azure Databricks, we used the following two and you could choose in between.

Option 1: If you have Azure CLI installed

  • Run 'az login' on your machine to authenticate yourself as an Azure user.
  • Setup environment variables for DATABRICKS_HOST and DATABRICKS_ACCOUNT_ID, or create a .databrickscfg file (~ for Linux or macOS, and %USERPROFILE% for Windows) containing the following info:
[DEFAULT]
host = https://accounts.azuredatabricks.net/
account_id = <Databricks account id>

Option 2: Use Microsoft Entra ID service principal:

  • Create a service principal in Microsoft Entra ID and add it to Azure Databricks and grant it target permissions (see reference documentation)

  • Add the following environment varialbes:

  • Alternatively, you can setup databricks environment varialbes in a .databrickscfg file (~ for Linux or macOS, and %USERPROFILE% for Windows) containing the following info:
[DEFAULT]
host = https://accounts.azuredatabricks.net/
account_id = <Databricks account id>
azure_tenant_id = <Azure tenant id>
azure_client_id = <Azure service principal application ID>
azure_client_secret = <Azure service principal secret>

Install

Run the following to install this package:

pip install db_az_sync_provider

Usage

Yaml file To use the package, it's required to provide:

  • Object ID(s) of Azure groups and (optionally) exclude object ID(s) in a yaml file (see syncgroups.yaml for example).
  • Existing relations between Azure and Databricks objects in a json file (see syncstates.json from example).

Executions The following two arguments are asked when you execute the sync:

  • -f/--file
  • -j/--json
  • -d/--delete (if this option provided, you enable to delete identities in Databricks, it's recommended to not use this option though)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

db_az_sync_provider-0.1.6.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

db_az_sync_provider-0.1.6-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file db_az_sync_provider-0.1.6.tar.gz.

File metadata

  • Download URL: db_az_sync_provider-0.1.6.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for db_az_sync_provider-0.1.6.tar.gz
Algorithm Hash digest
SHA256 a9a4d35c4a42dc70da603ff6f1608d79327658d97a6380cc35f11a0b6b4b8a76
MD5 a994d1c1daebe581bd140d6cbb45ed3f
BLAKE2b-256 3bedd5c6c9a35bbd20ee9e9c41017a75e92f1411f1298f9b46fe53caa962afa0

See more details on using hashes here.

File details

Details for the file db_az_sync_provider-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for db_az_sync_provider-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9afb749948dcecb90acff8b0666dde893f438d991f5cb4ac7737294113c536c1
MD5 1a313b283a3ff2aba9b2af59cab894af
BLAKE2b-256 e672779a2fce8907aa5a70939e3a472e6c9b600f1288ac6beca86b61fbba3b12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page