From e4e7f393f4a8c8a241edc45554d2b34077e1ac43 Mon Sep 17 00:00:00 2001 From: Madhavendra Rathore Date: Mon, 24 Aug 2026 14:47:20 +0530 Subject: [PATCH] chore: bump version to 0.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps all version sites 0.2.0 -> 0.2.1 and rolls the unreleased changelog entries into a v0.2.1 section across the crate and both bindings. Version bumps: - Cargo.toml, Cargo.lock - pyo3/Cargo.toml, pyo3/pyproject.toml, pyo3/Cargo.lock - napi/Cargo.toml, napi/package.json, napi/Cargo.lock Changelog: moves NEXT_CHANGELOG.md (and the root CHANGELOG.md [Unreleased] section) into '## [v0.2.1] - 2026-08-24' in each CHANGELOG, and resets the NEXT_CHANGELOG files to the empty template. v0.2.1 rolls up: identity federation / mandatory OIDC token exchange, JWT private-key M2M, Azure SP M2M, generic OAuth endpoint/scope overrides, kernel_session_test(), retry-config + cloudfetch-chunk-cap C ABI, the callback logging bridge, and Session transaction control — plus metadata-conformance fixes. Release notes were rolled mechanically from the staged NEXT_CHANGELOG entries; please give them a final editorial pass before tagging. Signed-off-by: Madhavendra Rathore --- CHANGELOG.md | 116 ++++++++++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- NEXT_CHANGELOG.md | 109 +------------------------------------ napi/CHANGELOG.md | 40 ++++++++++++++ napi/Cargo.lock | 4 +- napi/Cargo.toml | 2 +- napi/NEXT_CHANGELOG.md | 30 +---------- napi/package.json | 2 +- pyo3/CHANGELOG.md | 22 ++++++++ pyo3/Cargo.lock | 4 +- pyo3/Cargo.toml | 2 +- pyo3/NEXT_CHANGELOG.md | 12 +---- pyo3/pyproject.toml | 2 +- src/telemetry/models.rs | 6 +-- 15 files changed, 196 insertions(+), 159 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aca699b1..51ebafec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,14 @@ cadences and may not move in lockstep with the crate. ## [Unreleased] +### Added + +### Changed + +### Fixed + +## [v0.2.1] - 2026-08-24 + ### Added - **Transaction control on `Session`** — `set_autocommit(bool)` / `autocommit()` / `commit()` / `rollback()`, exposed over the C ABI as @@ -23,6 +31,114 @@ cadences and may not move in lockstep with the crate. the control methods are silent no-ops. Set `false` to opt into real multi-statement transactions (Private Preview; requires catalog-managed tables server-side). +- Azure Entra service-principal M2M (`azure-sp-m2m`) is now a kernel-owned flow + (`AuthConfig::AzureServicePrincipal` / pyo3 `auth_type="azure-sp-m2m"`). The + kernel resolves the Entra token endpoint (`{login}/{tenant}/oauth2/v2.0/token`) + and the `{effective_app_id}/.default` scope, and auto-discovers the tenant from + the workspace's `/aad/auth` redirect when `azure_tenant_id` is omitted (Thrift + parity) — so bindings forward only the SP credentials. The `Authorization` + bearer is the Databricks-audience data token, which alone authenticates the + common workspace-member SP. When `azure_workspace_resource_id` is set, the + kernel additionally sends the Azure SP management token + (`X-Databricks-Azure-SP-Management-Token`, a second Entra token for the Azure + Resource Manager) paired with the `X-Databricks-Azure-Workspace-Resource-Id` + header, matching the JDBC connector (`if (resourceId != null)`), so a service + principal that holds an Azure RBAC role but is not a workspace member can + authenticate. That token is minted via the Entra **v1.0** `resource=` grant + (`{login}/{tenant}/oauth2/token`) so its `aud` is + `https://management.core.windows.net/` verbatim — trailing slash included — + which the control plane requires; the v2.0 `.default` form drops the slash and + is rejected. When the resource id is unset (the default) neither header is sent + and no management token is fetched. A new `AuthProvider::extra_headers()` + carries the pair. Covered by an `#[ignore]`d + end-to-end test (`azure_sp_m2m_select_one_round_trip`) that exercises the flow + against a live Azure workspace when Azure SP credentials are configured. + (PECOBLR-4141.) + +- Generic Azure/Entra OAuth overrides (the pre-dedicated-flow path, still valid + for custom setups where a caller pins the endpoint/scope itself). New C ABI + setters expose the pieces the C surface was missing: + `kernel_session_config_set_oauth_token_endpoint()` and + `kernel_session_config_set_oauth_scopes()` — both applied to whichever OAuth + mode (M2M, M2M-JWT, or U2M) is selected, matching the single `oauth_scopes` / + `token_url` the pyo3 and napi bindings already share across those flows. Both + are additive — existing `set_auth_m2m` / `set_auth_m2m_jwt` / `set_auth_u2m` + signatures are unchanged (for U2M and M2M-JWT, `set_oauth_scopes` / + `set_oauth_token_endpoint` take precedence over scopes/token-endpoint passed + positionally to those setters). (PECOBLR-4141 / PECOBLR-4120.) + +- Auth: `AuthConfig::OAuthM2MPrivateKey` — OAuth 2.0 machine-to-machine using a JWT + private-key client assertion (RFC 7523) instead of a client secret. The kernel + signs a short-lived JWT with a PEM/PKCS#8 private key (RSA or EC; unencrypted or + PBES2-passphrase-encrypted) and sends it as the `client_assertion` in the + client-credentials grant. Supported algorithms: `RS256`/`384`/`512`, + `PS256`/`384`/`512`, `ES256`, `ES384` (default `RS256`); `ES512` is not supported + and is rejected with a clear error. Construct via `AuthConfig::oauth_m2m_private_key`. +- C ABI: `kernel_session_config_set_auth_m2m_jwt()` — expose the JWT private-key M2M + flow over the C ABI (for ODBC / Go consumers), alongside the existing + `set_auth_pat` / `set_auth_m2m` / `set_auth_u2m` setters. Required `client_id` / + `jwt_key_file` / `jwt_kid`; optional `jwt_passphrase` (encrypted PKCS#8), + `jwt_algorithm` (NULL → `RS256`), `scopes` (comma-separated; NULL → `all-apis`), + and `token_url` (NULL → OIDC discovery). Maps to `AuthConfig::oauth_m2m_private_key`. +- C ABI: `kernel_session_config_set_auth_azure_sp()` — expose Azure Entra + service-principal M2M over the C ABI (for ODBC / Go consumers). Required + `azure_client_id` / `azure_client_secret`; optional `azure_tenant_id` + (NULL → the kernel auto-discovers it from the workspace `/aad/auth` redirect) and + `azure_workspace_resource_id` (NULL → the data token authenticates alone; 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). Maps to + `AuthConfig::azure_service_principal`. Azure AD U2M has no separate setter — it + rides `set_auth_u2m` (the kernel's workspace-federated browser flow, which Azure + Databricks workspaces support). +- C ABI: `kernel_session_test()` — actively validate a session by round-tripping a + lightweight `SELECT 1` test query (result discarded). The I/O-performing complement + of `kernel_session_is_open()` (a local handle-state check): it reaches the server, so + it detects a server-side idle timeout, a killed warehouse, or a dropped link. Returns + `Success` when the session is alive; a transport/availability failure surfaces as + `Unavailable` / `NetworkError` / `Timeout`, which a host can treat as "connection + dead" when backing `SQL_ATTR_CONNECTION_DEAD`. Mirrors the reference / JDBC drivers' + validate-on-borrow / connection-test probe. Runs SQL, so it must be called from a + native (non-async-runtime) thread. Backed by the new `Session::test_connection()`. + Benefits ODBC (databricks/databricks-odbc#298). + +### Changed +- OAuth M2M: when a `token_url_override` is set, OIDC discovery against the + workspace is now **skipped** — the client-credentials grant never uses the + authorization endpoint, so pinning the token endpoint (e.g. an Azure/Entra + endpoint that is not the workspace's) no longer makes a needless round-trip + to, or depends on, the workspace OIDC config. + +- C ABI: `kernel_session_config_set_retry_config()` — expose the crate's existing + HTTP retry knobs (`HttpConfig::retry_min_wait` / `retry_max_wait` / + `retry_max_retries` / `overall_timeout`) over the C ABI so a host can make its own + `RetryWaitMin` / `RetryWaitMax` / `RetryMax` / retry-budget policy authoritative + instead of the kernel default; `max_retries=0` disables retries, and + `overall_timeout_ms=0` keeps the kernel's default budget (non-zero overrides it). + The retry budget is always bounded — a large `max_retries` is still capped by it. + Benefits ODBC too. (Consumed by the Go driver via `WithRetries`, + databricks/databricks-sql-go#412.) +- C ABI: client-only `session_conf` key `cloudfetch_max_chunks_in_memory` — carried + by the existing `kernel_session_config_set_session_conf()` setter (no new symbol), + it bounds how many decompressed CloudFetch chunks the kernel holds in memory at + once (peak RSS on large result sets; default 16). Accepts a positive integer; + a value above the kernel ceiling (256) is clamped, and a non-numeric / non-positive + value is ignored (default preserved) with a warning rather than failing session + creation. The key is client-only — it is consumed before session creation and never + reaches the SEA wire. Benefits ODBC too. +- Auth: mandatory OIDC token exchange (BYOT federation) — when an authenticated + token was issued by a party other than the target workspace (Azure AD, an external + IdP, a Bring-Your-Own-Token, or a Workload Identity Federation token), the kernel + now exchanges it for an in-house Databricks token at `/oidc/v1/token` before + using it, transparently across PAT / M2M / U2M. Gated by the token's `iss` claim + (non-JWT and same-host tokens pass through with no HTTP call) and falls back to the + original token if the exchange fails, so existing flows are unaffected. New optional + `identity_federation_client_id` fields on the PAT, M2M, and U2M `AuthConfig` + variants select SP-wide WIF; unset means BYOT / account-wide WIF. Follows the + ADBC wire contract (`grant_type=jwt-bearer`, `assertion`, `scope=sql`). +- Auth constructors now accept the optional federation client id directly; + the C ABI exposes it through + `kernel_session_config_set_identity_federation_client_id()`. ### Fixed - **Metadata conformance (catalog match-all wildcard)** — a *literal* diff --git a/Cargo.lock b/Cargo.lock index 16081301..c95dd532 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -563,7 +563,7 @@ dependencies = [ [[package]] name = "databricks-sql-kernel" -version = "0.2.0" +version = "0.2.1" dependencies = [ "aes 0.9.2", "arrow-array", diff --git a/Cargo.toml b/Cargo.toml index a181b8ce..7214d4a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ [package] name = "databricks-sql-kernel" -version = "0.2.0" +version = "0.2.1" edition = "2021" authors = ["Databricks"] license = "Apache-2.0" diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index b310b6dc..d0eed948 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -9,118 +9,11 @@ changes go in their respective binding's NEXT_CHANGELOG. ## [Unreleased] -### Added - -- Azure Entra service-principal M2M (`azure-sp-m2m`) is now a kernel-owned flow - (`AuthConfig::AzureServicePrincipal` / pyo3 `auth_type="azure-sp-m2m"`). The - kernel resolves the Entra token endpoint (`{login}/{tenant}/oauth2/v2.0/token`) - and the `{effective_app_id}/.default` scope, and auto-discovers the tenant from - the workspace's `/aad/auth` redirect when `azure_tenant_id` is omitted (Thrift - parity) — so bindings forward only the SP credentials. The `Authorization` - bearer is the Databricks-audience data token, which alone authenticates the - common workspace-member SP. When `azure_workspace_resource_id` is set, the - kernel additionally sends the Azure SP management token - (`X-Databricks-Azure-SP-Management-Token`, a second Entra token for the Azure - Resource Manager) paired with the `X-Databricks-Azure-Workspace-Resource-Id` - header, matching the JDBC connector (`if (resourceId != null)`), so a service - principal that holds an Azure RBAC role but is not a workspace member can - authenticate. That token is minted via the Entra **v1.0** `resource=` grant - (`{login}/{tenant}/oauth2/token`) so its `aud` is - `https://management.core.windows.net/` verbatim — trailing slash included — - which the control plane requires; the v2.0 `.default` form drops the slash and - is rejected. When the resource id is unset (the default) neither header is sent - and no management token is fetched. A new `AuthProvider::extra_headers()` - carries the pair. Covered by an `#[ignore]`d - end-to-end test (`azure_sp_m2m_select_one_round_trip`) that exercises the flow - against a live Azure workspace when Azure SP credentials are configured. - (PECOBLR-4141.) - -- Generic Azure/Entra OAuth overrides (the pre-dedicated-flow path, still valid - for custom setups where a caller pins the endpoint/scope itself). New C ABI - setters expose the pieces the C surface was missing: - `kernel_session_config_set_oauth_token_endpoint()` and - `kernel_session_config_set_oauth_scopes()` — both applied to whichever OAuth - mode (M2M, M2M-JWT, or U2M) is selected, matching the single `oauth_scopes` / - `token_url` the pyo3 and napi bindings already share across those flows. Both - are additive — existing `set_auth_m2m` / `set_auth_m2m_jwt` / `set_auth_u2m` - signatures are unchanged (for U2M and M2M-JWT, `set_oauth_scopes` / - `set_oauth_token_endpoint` take precedence over scopes/token-endpoint passed - positionally to those setters). (PECOBLR-4141 / PECOBLR-4120.) -- Auth: `AuthConfig::OAuthM2MPrivateKey` — OAuth 2.0 machine-to-machine using a JWT - private-key client assertion (RFC 7523) instead of a client secret. The kernel - signs a short-lived JWT with a PEM/PKCS#8 private key (RSA or EC; unencrypted or - PBES2-passphrase-encrypted) and sends it as the `client_assertion` in the - client-credentials grant. Supported algorithms: `RS256`/`384`/`512`, - `PS256`/`384`/`512`, `ES256`, `ES384` (default `RS256`); `ES512` is not supported - and is rejected with a clear error. Construct via `AuthConfig::oauth_m2m_private_key`. -- C ABI: `kernel_session_config_set_auth_m2m_jwt()` — expose the JWT private-key M2M - flow over the C ABI (for ODBC / Go consumers), alongside the existing - `set_auth_pat` / `set_auth_m2m` / `set_auth_u2m` setters. Required `client_id` / - `jwt_key_file` / `jwt_kid`; optional `jwt_passphrase` (encrypted PKCS#8), - `jwt_algorithm` (NULL → `RS256`), `scopes` (comma-separated; NULL → `all-apis`), - and `token_url` (NULL → OIDC discovery). Maps to `AuthConfig::oauth_m2m_private_key`. -- C ABI: `kernel_session_config_set_auth_azure_sp()` — expose Azure Entra - service-principal M2M over the C ABI (for ODBC / Go consumers). Required - `azure_client_id` / `azure_client_secret`; optional `azure_tenant_id` - (NULL → the kernel auto-discovers it from the workspace `/aad/auth` redirect) and - `azure_workspace_resource_id` (NULL → the data token authenticates alone; 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). Maps to - `AuthConfig::azure_service_principal`. Azure AD U2M has no separate setter — it - rides `set_auth_u2m` (the kernel's workspace-federated browser flow, which Azure - Databricks workspaces support). -- C ABI: `kernel_session_test()` — actively validate a session by round-tripping a - lightweight `SELECT 1` test query (result discarded). The I/O-performing complement - of `kernel_session_is_open()` (a local handle-state check): it reaches the server, so - it detects a server-side idle timeout, a killed warehouse, or a dropped link. Returns - `Success` when the session is alive; a transport/availability failure surfaces as - `Unavailable` / `NetworkError` / `Timeout`, which a host can treat as "connection - dead" when backing `SQL_ATTR_CONNECTION_DEAD`. Mirrors the reference / JDBC drivers' - validate-on-borrow / connection-test probe. Runs SQL, so it must be called from a - native (non-async-runtime) thread. Backed by the new `Session::test_connection()`. - Benefits ODBC (databricks/databricks-odbc#298). +### Added ### Changed -- OAuth M2M: when a `token_url_override` is set, OIDC discovery against the - workspace is now **skipped** — the client-credentials grant never uses the - authorization endpoint, so pinning the token endpoint (e.g. an Azure/Entra - endpoint that is not the workspace's) no longer makes a needless round-trip - to, or depends on, the workspace OIDC config. - -- C ABI: `kernel_session_config_set_retry_config()` — expose the crate's existing - HTTP retry knobs (`HttpConfig::retry_min_wait` / `retry_max_wait` / - `retry_max_retries` / `overall_timeout`) over the C ABI so a host can make its own - `RetryWaitMin` / `RetryWaitMax` / `RetryMax` / retry-budget policy authoritative - instead of the kernel default; `max_retries=0` disables retries, and - `overall_timeout_ms=0` keeps the kernel's default budget (non-zero overrides it). - The retry budget is always bounded — a large `max_retries` is still capped by it. - Benefits ODBC too. (Consumed by the Go driver via `WithRetries`, - databricks/databricks-sql-go#412.) -- C ABI: client-only `session_conf` key `cloudfetch_max_chunks_in_memory` — carried - by the existing `kernel_session_config_set_session_conf()` setter (no new symbol), - it bounds how many decompressed CloudFetch chunks the kernel holds in memory at - once (peak RSS on large result sets; default 16). Accepts a positive integer; - a value above the kernel ceiling (256) is clamped, and a non-numeric / non-positive - value is ignored (default preserved) with a warning rather than failing session - creation. The key is client-only — it is consumed before session creation and never - reaches the SEA wire. Benefits ODBC too. -- Auth: mandatory OIDC token exchange (BYOT federation) — when an authenticated - token was issued by a party other than the target workspace (Azure AD, an external - IdP, a Bring-Your-Own-Token, or a Workload Identity Federation token), the kernel - now exchanges it for an in-house Databricks token at `/oidc/v1/token` before - using it, transparently across PAT / M2M / U2M. Gated by the token's `iss` claim - (non-JWT and same-host tokens pass through with no HTTP call) and falls back to the - original token if the exchange fails, so existing flows are unaffected. New optional - `identity_federation_client_id` fields on the PAT, M2M, and U2M `AuthConfig` - variants select SP-wide WIF; unset means BYOT / account-wide WIF. Follows the - ADBC wire contract (`grant_type=jwt-bearer`, `assertion`, `scope=sql`). -- Auth constructors now accept the optional federation client id directly; - the C ABI exposes it through - `kernel_session_config_set_identity_federation_client_id()`. - ### Updated ### Fixed diff --git a/napi/CHANGELOG.md b/napi/CHANGELOG.md index 8016b83e..1fce3834 100644 --- a/napi/CHANGELOG.md +++ b/napi/CHANGELOG.md @@ -6,6 +6,46 @@ The Rust crate and Python binding have their own changelogs under [`../CHANGELOG.md`](../CHANGELOG.md) and [`../pyo3/CHANGELOG.md`](../pyo3/CHANGELOG.md); they ship on independent cadences. +## [Unreleased] + +### Added + +### Changed + +### Fixed + +## [v0.2.1] - 2026-08-24 + +### Added +- `AuthMode.OAuthM2mJwt` — OAuth 2.0 machine-to-machine auth using a JWT private-key + client assertion instead of a client secret. New `ConnectionOptions` fields + `jwtKeyFile` (required), `jwtKid` (required), `jwtPassphrase` (optional, for + encrypted PKCS#8 keys), and `jwtAlgorithm` (optional, default `RS256`), alongside + the existing `oauthClientId` / `oauthScopes`. Forwards to the kernel's + `AuthConfig::OAuthM2MPrivateKey`. +- `ConnectionOptions.tokenUrl` — OAuth token endpoint override. When omitted the + kernel discovers the endpoint via the workspace's OIDC configuration; set it to + point the client-credentials / JWT client-assertion grant at the workspace's + configured IdP token endpoint (e.g. Entra ID for Azure Databricks). Required for + `AuthMode.OAuthM2mJwt` against an external-IdP-backed workspace, since + Databricks-native OIDC does not advertise the `private_key_jwt` method. Applies to + `AuthMode.OAuthM2m` and `AuthMode.OAuthU2m` too. Forwards to the kernel's + `token_url_override`. +- `ConnectionOptions.identityFederationClientId` selects SP-wide Workload + Identity Federation during mandatory token exchange. +- `AuthMode.AzureSpM2m` — Azure Entra service-principal M2M. New + `ConnectionOptions` fields `azureClientId` (required) + `azureClientSecret` + (required), plus optional `azureTenantId` (kernel auto-discovers it from the + workspace's `/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 a service principal with + an Azure RBAC role but no workspace membership can authenticate; omitted ⇒ the + data token authenticates alone). Forwards to the kernel's + `AuthConfig::azure_service_principal`. The napi analog of the pyo3 + `auth_type="azure-sp-m2m"` surface. Azure AD **U2M** needs no new mode — it + rides `AuthMode.OAuthU2m` (the kernel's workspace-federated browser flow, + which Azure workspaces support). + ## [v0.2.0] - 2026-06-08 **Beta release of the Databricks SQL Kernel (Node.js binding).** diff --git a/napi/Cargo.lock b/napi/Cargo.lock index fe76a0cb..10e93ddc 100644 --- a/napi/Cargo.lock +++ b/napi/Cargo.lock @@ -540,7 +540,7 @@ dependencies = [ [[package]] name = "databricks-sql-kernel" -version = "0.2.0" +version = "0.2.1" dependencies = [ "aes 0.9.2", "arrow-array", @@ -580,7 +580,7 @@ dependencies = [ [[package]] name = "databricks-sql-kernel-napi" -version = "0.2.0" +version = "0.2.1" dependencies = [ "arrow-array", "arrow-ipc", diff --git a/napi/Cargo.toml b/napi/Cargo.toml index 8becf712..267f1543 100644 --- a/napi/Cargo.toml +++ b/napi/Cargo.toml @@ -35,7 +35,7 @@ members = ["."] [package] name = "databricks-sql-kernel-napi" -version = "0.2.0" +version = "0.2.1" edition = "2021" authors = ["Databricks"] license = "Apache-2.0" diff --git a/napi/NEXT_CHANGELOG.md b/napi/NEXT_CHANGELOG.md index 9fca102e..38fdc438 100644 --- a/napi/NEXT_CHANGELOG.md +++ b/napi/NEXT_CHANGELOG.md @@ -12,36 +12,10 @@ layout, or npm publishing. Pure-kernel changes go in the root ## [Unreleased] + ### Added -- `AuthMode.OAuthM2mJwt` — OAuth 2.0 machine-to-machine auth using a JWT private-key - client assertion instead of a client secret. New `ConnectionOptions` fields - `jwtKeyFile` (required), `jwtKid` (required), `jwtPassphrase` (optional, for - encrypted PKCS#8 keys), and `jwtAlgorithm` (optional, default `RS256`), alongside - the existing `oauthClientId` / `oauthScopes`. Forwards to the kernel's - `AuthConfig::OAuthM2MPrivateKey`. -- `ConnectionOptions.tokenUrl` — OAuth token endpoint override. When omitted the - kernel discovers the endpoint via the workspace's OIDC configuration; set it to - point the client-credentials / JWT client-assertion grant at the workspace's - configured IdP token endpoint (e.g. Entra ID for Azure Databricks). Required for - `AuthMode.OAuthM2mJwt` against an external-IdP-backed workspace, since - Databricks-native OIDC does not advertise the `private_key_jwt` method. Applies to - `AuthMode.OAuthM2m` and `AuthMode.OAuthU2m` too. Forwards to the kernel's - `token_url_override`. -- `ConnectionOptions.identityFederationClientId` selects SP-wide Workload - Identity Federation during mandatory token exchange. -- `AuthMode.AzureSpM2m` — Azure Entra service-principal M2M. New - `ConnectionOptions` fields `azureClientId` (required) + `azureClientSecret` - (required), plus optional `azureTenantId` (kernel auto-discovers it from the - workspace's `/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 a service principal with - an Azure RBAC role but no workspace membership can authenticate; omitted ⇒ the - data token authenticates alone). Forwards to the kernel's - `AuthConfig::azure_service_principal`. The napi analog of the pyo3 - `auth_type="azure-sp-m2m"` surface. Azure AD **U2M** needs no new mode — it - rides `AuthMode.OAuthU2m` (the kernel's workspace-federated browser flow, - which Azure workspaces support). +### Changed ### Updated diff --git a/napi/package.json b/napi/package.json index cc0fef1b..4854a38e 100644 --- a/napi/package.json +++ b/napi/package.json @@ -1,6 +1,6 @@ { "name": "@databricks/databricks-sql-kernel", - "version": "0.2.0", + "version": "0.2.1", "description": "Databricks SQL Kernel — Node.js native binding.", "main": "index.js", "types": "index.d.ts", diff --git a/pyo3/CHANGELOG.md b/pyo3/CHANGELOG.md index 1a5dc9f8..a639648d 100644 --- a/pyo3/CHANGELOG.md +++ b/pyo3/CHANGELOG.md @@ -6,6 +6,28 @@ crate and Node.js binding have their own changelogs under [`../CHANGELOG.md`](../CHANGELOG.md) and [`../napi/CHANGELOG.md`](../napi/CHANGELOG.md); they ship on independent cadences. +## [Unreleased] + +### Added + +### Changed + +### Fixed + +## [v0.2.1] - 2026-08-24 + +### Added +- `Session(auth_type="oauth-m2m-jwt", ...)` — OAuth 2.0 machine-to-machine auth using + a JWT private-key client assertion instead of a client secret. New keyword args + `jwt_key_file` (required), `jwt_kid` (required), `jwt_passphrase` (optional, for + encrypted PKCS#8 keys), and `jwt_algorithm` (optional, default `RS256`), alongside + the existing `client_id` / `oauth_scopes` / `token_url`. Forwards to the kernel's + `AuthConfig::OAuthM2MPrivateKey`. +- `Session(..., identity_federation_client_id=...)` selects SP-wide Workload + Identity Federation during mandatory token exchange. +- `Statement.set_row_limit(...)` sets the SEA server-side row cap; passing + `None` clears it. + ## [v0.2.0] - 2026-06-08 **Beta release of the Databricks SQL Kernel (Python binding).** diff --git a/pyo3/Cargo.lock b/pyo3/Cargo.lock index a0492194..2446210b 100644 --- a/pyo3/Cargo.lock +++ b/pyo3/Cargo.lock @@ -546,7 +546,7 @@ dependencies = [ [[package]] name = "databricks-sql-kernel" -version = "0.2.0" +version = "0.2.1" dependencies = [ "aes 0.9.2", "arrow-array", @@ -586,7 +586,7 @@ dependencies = [ [[package]] name = "databricks-sql-kernel-pyo3" -version = "0.2.0" +version = "0.2.1" dependencies = [ "arrow-array", "arrow-pyarrow", diff --git a/pyo3/Cargo.toml b/pyo3/Cargo.toml index 5a05c999..56d30a18 100644 --- a/pyo3/Cargo.toml +++ b/pyo3/Cargo.toml @@ -32,7 +32,7 @@ members = ["."] [package] name = "databricks-sql-kernel-pyo3" -version = "0.2.0" +version = "0.2.1" edition = "2021" authors = ["Databricks"] license = "Apache-2.0" diff --git a/pyo3/NEXT_CHANGELOG.md b/pyo3/NEXT_CHANGELOG.md index 51afadc2..5fd72c40 100644 --- a/pyo3/NEXT_CHANGELOG.md +++ b/pyo3/NEXT_CHANGELOG.md @@ -11,18 +11,10 @@ changes go in the root `NEXT_CHANGELOG.md`. ## [Unreleased] + ### Added -- `Session(auth_type="oauth-m2m-jwt", ...)` — OAuth 2.0 machine-to-machine auth using - a JWT private-key client assertion instead of a client secret. New keyword args - `jwt_key_file` (required), `jwt_kid` (required), `jwt_passphrase` (optional, for - encrypted PKCS#8 keys), and `jwt_algorithm` (optional, default `RS256`), alongside - the existing `client_id` / `oauth_scopes` / `token_url`. Forwards to the kernel's - `AuthConfig::OAuthM2MPrivateKey`. -- `Session(..., identity_federation_client_id=...)` selects SP-wide Workload - Identity Federation during mandatory token exchange. -- `Statement.set_row_limit(...)` sets the SEA server-side row cap; passing - `None` clears it. +### Changed ### Updated diff --git a/pyo3/pyproject.toml b/pyo3/pyproject.toml index dc0680ca..2070cad8 100644 --- a/pyo3/pyproject.toml +++ b/pyo3/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "databricks-sql-kernel" -version = "0.2.0" +version = "0.2.1" description = "Python bindings for the Databricks SQL Kernel (PyO3)" # Floor matches the tested CI matrix in # .github/workflows/pyo3-checks.yml (3.9 .. 3.14). The abi3-py39 diff --git a/src/telemetry/models.rs b/src/telemetry/models.rs index 8479e6fd..8fe36e5d 100644 --- a/src/telemetry/models.rs +++ b/src/telemetry/models.rs @@ -424,7 +424,7 @@ mod tests { assert_eq!(json["context"]["timestamp_millis"], 1000); assert_eq!( json["context"]["client_context"]["user_agent"], - "databricks-sql-kernel/0.2.0" + "databricks-sql-kernel/0.2.1" ); assert!(json.get("workspaceId").is_none()); assert!(json.get("frontendLogEventId").is_none()); @@ -448,7 +448,7 @@ mod tests { session_id: Some("session-1".to_string()), sql_statement_id: Some("statement-1".to_string()), system_configuration: Some(DriverSystemConfiguration { - driver_version: Some("0.2.0".to_string()), + driver_version: Some("0.2.1".to_string()), runtime_name: Some("rust".to_string()), runtime_version: Some("1.0".to_string()), runtime_vendor: Some("rust-lang".to_string()), @@ -550,7 +550,7 @@ mod tests { frontend_log_event_id: "event-1".to_string(), context: Some(FrontendLogContext { client_context: Some(TelemetryClientContext { - user_agent: Some("databricks-sql-kernel/0.2.0".to_string()), + user_agent: Some("databricks-sql-kernel/0.2.1".to_string()), }), timestamp_millis: 1000, }),