Repository navigation
feat(bindings): re-land Azure SP M2M napi + C-ABI surface onto main (mis-merged in #280) - #282
Merged
Merged
Conversation
…he binding Add AuthMode::AzureSpM2m to the napi binding, mirroring the pyo3 auth_type="azure-sp-m2m" surface added for Python. New ConnectionOptions fields: azureClientId + azureClientSecret (required), plus optional azureTenantId (kernel auto-discovers from the workspace /aad/auth redirect when omitted) and azureWorkspaceResourceId (when set, the kernel also sends the Azure SP management token + X-Databricks-Azure-Workspace-Resource-Id header, so an SP with an Azure RBAC role but no workspace membership can authenticate). The build_auth_config arm forwards to the kernel's AuthConfig::azure_service_principal; the kernel owns Azure resolution. Azure AD U2M needs no new mode — it rides the existing AuthMode::OAuthU2m (the kernel's workspace-federated browser flow, which Azure workspaces support). Regenerated napi/index.d.ts to match. Stacked on the pyo3/core azure-sp-m2m PR (#263), which is where AuthConfig::azure_service_principal lives. Co-authored-by: Isaac Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
…or Go/ODBC Add kernel_session_config_set_auth_azure_sp to the C ABI, so Go/ODBC consumers can use Azure Entra service-principal M2M — the C-ABI analog of the pyo3/napi azure-sp-m2m surface. Required azure_client_id + azure_client_secret; optional azure_tenant_id (NULL -> kernel auto-discovers from the workspace /aad/auth redirect) and azure_workspace_resource_id (set -> kernel also sends the Azure SP management token + X-Databricks-Azure-Workspace-Resource-Id header, for an SP with an Azure RBAC role but no workspace membership). New AuthSpec::AzureServicePrincipal variant + conversion to AuthConfig::azure_service_principal (carrying the shared federation client id). Hand-written header declaration added. Azure AD U2M needs no new setter — it rides set_auth_u2m (the kernel's workspace-federated browser flow, which Azure Databricks workspaces support). Co-authored-by: Isaac Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
eric-wang-1990
temporarily deployed
to
azure-prod
August 21, 2026 21:55 — with
GitHub Actions
Inactive
eric-wang-1990
temporarily deployed
to
azure-prod
August 21, 2026 21:55 — with
GitHub Actions
Inactive
eric-wang-1990
temporarily deployed
to
azure-prod
August 21, 2026 21:55 — with
GitHub Actions
Inactive
vuanhphung
approved these changes
Aug 21, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Re-lands the napi + C-ABI Azure service-principal M2M surface onto
main. These changes were reviewed and "merged" in #280 — but #280 was stacked on #263 (base =eric-wang/azure-service-principal-design), and #263 had already merged tomain~15h earlier. GitHub did not retarget #280's base, so merging #280 pushed its commits into the already-merged (orphaned) #263 branch instead ofmain. Net result: #280's changes never reachedmain(its merge commit53fc45eis not an ancestor ofmain;mainhas neither napiAzureSpM2mnor C-ABIset_auth_azure_sp). #263's pyo3/core Azure surface did land.This PR cherry-picks the two #280 commits onto current
mainso the napi + C-ABI Azure surface actually lands, through the normalprotect-mainreview + checks.Contents (identical to the reviewed #280)
napi/src/database.rs,napi/index.d.ts):AuthMode::AzureSpM2m+azureClientId/azureClientSecret/azureTenantId?/azureWorkspaceResourceId?;build_auth_config→AuthConfig::azure_service_principal. Mirrors the pyo3 surface.src/c_abi/session.rs,include/databricks_kernel.h):kernel_session_config_set_auth_azure_sp(...)+AuthSpec::AzureServicePrincipal→AuthConfig::azure_service_principal(for Go/ODBC).napi/NEXT_CHANGELOG.md, rootNEXT_CHANGELOG.md).Azure U2M needs no new surface on either binding — it rides the existing
OAuthU2m/set_auth_u2m.Verified
Core
cargo build+clippy -D warningsclean; all 76 napi tests pass (incl.azure_sp_m2m_*); C-ABIazure_sp_*tests pass; napi loader drift check in sync; fullcargo testsuite green.Related
main).main).AzureSpM2m), and the Go C-ABI path.This pull request and its description were written by Isaac.