You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: correct Azure Entra OAuth kernel support in connection param reference
The connection-parameter reference (added in #457) predated #505
(feat(kernel): thread Azure Entra auth (U2M + SP M2M) through the kernel
path) and still claimed the kernel "rejects Azure-direct (Entra) OAuth".
That is now inverted: buildKernelConnectionOptions
(lib/kernel/KernelAuth.ts) has a dedicated AzureSpM2m mode for Entra-
direct service-principal M2M and consumes both azureTenantId and
useDatabricksOAuthInAzure.
- Authentication table: azureTenantId / useDatabricksOAuthInAzure kernel
cell ❌ → ⚠️, with an accurate flow-selection note.
- authType "supported on both" note now mentions Azure Entra SP M2M.
- Summary of gaps: drop Azure from "missing/ignored on Kernel" (renumber)
and record it under "Behavioral divergences to watch" instead.
Other cross-backend rows spot-checked against source and left as-is.
Co-authored-by: Isaac
|`authType` — supported on both backends |`'access-token'`\|`'databricks-oauth'`\|`'static-token'`| ✅ | ✅ |`'access-token'`|`access-token` uses `token` (PAT) and is the default when `authType` is omitted. `static-token` uses `staticToken`; the kernel maps it to its native bearer-token mode. `databricks-oauth` covers M2M (`oauthClientId` + `oauthClientSecret`) and U2M (browser; no secret). |
60
+
|`authType` — supported on both backends |`'access-token'`\|`'databricks-oauth'`\|`'static-token'`| ✅ | ✅ |`'access-token'`|`access-token` uses `token` (PAT) and is the default when `authType` is omitted. `static-token` uses `staticToken`; the kernel maps it to its native bearer-token mode. `databricks-oauth` covers M2M (`oauthClientId` + `oauthClientSecret`), U2M (browser; no secret), and — on an Azure host — Entra-direct service-principal M2M (see the `azureTenantId` / `useDatabricksOAuthInAzure` row).|
61
61
|`authType` — Thrift-only |`'custom'`\|`'token-provider'`\|`'external-token'`| ✅ | ❌ | — |**Thrift-only.**`custom` uses `provider: IAuthentication`, `token-provider` uses `tokenProvider: ITokenProvider`, and `external-token` uses `getToken: TokenCallback`. The kernel throws `unsupported auth mode` for these modes. |
62
62
|`oauthScopes`|`Array<string>`| ❌ | ✅ | U2M `['sql','offline_access']`, M2M `['all-apis']`|**Thrift ignores `oauthScopes`** — `createAuthProvider` never threads it into `DatabricksOAuth`, so `authenticate()` always falls back to `defaultOAuthScopes` (`['sql','offline_access']`). Only the kernel honors a custom `oauthScopes`; its defaults happen to match Thrift's fallback. |
63
63
|`oauthClientId` (U2M) |`string`| ✅ | ✅ | napi default `client_id` when absent | The kernel adapter (`buildKernelConnectionOptions`) forwards a custom `oauthClientId` verbatim on the U2M arm; when it is absent the napi binding applies its own default `client_id`. Whether the native binding then honors or rejects a custom id is not observable from this repo — the TypeScript layer neither hardcodes an id nor rejects one. |
64
64
|`oauthClientId` + no secret |`string`| ✅ (U2M) | ✅ (U2M) | — |**Parity.** The kernel keys flow selection off `oauthClientSecret` presence exactly like Thrift, so `oauthClientId` + no secret routes to **U2M** (with the id forwarded) — it does **not** throw an M2M "secret required" error. |
|`azureTenantId` / `useDatabricksOAuthInAzure`|`string` / `boolean`| ✅ |⚠️| — |**Honored on both.** Kernel: on an Azure host, `databricks-oauth`**M2M** (secret present) with `useDatabricksOAuthInAzure` absent/`false` routes to Entra-direct service-principal M2M (native `AzureSpM2m` mode, creds ride `oauthClientId`/`oauthClientSecret`); `true` routes to workspace-OIDC M2M. `azureTenantId` is optional (kernel auto-discovers from the workspace `/aad/auth` redirect when omitted). **U2M** ignores the flag — the kernel's cloud-blind in-house flow works against Azure. One divergence: the kernel treats `.databricks.azure.us` as Azure in every arm, whereas Thrift's `useDatabricksOAuthInAzure`-true arm does not. (`lib/kernel/KernelAuth.ts``buildKernelConnectionOptions`.)|
66
66
|`persistence` (custom OAuth token store) |`OAuthPersistence`| ✅ | ❌ | — |**Thrift-only.** Kernel throws; it auto-persists U2M tokens to `~/.config/databricks-sql-kernel/oauth/` and does not cache M2M. |
67
67
|`enableTokenFederation` / `federationClientId`|`boolean` / `string`| ✅ | ⚠️ |`false` / — | On the kernel backend these options apply only to `static-token`. Federation is always enabled, so `enableTokenFederation` is ignored; an omitted or empty client ID selects account-wide WIF and a non-empty ID selects SP-wide WIF. Thrift honors the boolean and also supports these options for `token-provider` and `external-token`. |
68
68
@@ -162,10 +162,9 @@ backend, so they are read regardless of `useKernel`. Defaults are sourced from
162
162
`DBSQLClient.openSession`, but the conf key is likely dropped by the
163
163
kernel's session-conf allowlist, so it has no effect on the kernel path.
164
164
2. Auth types `custom`, `token-provider`, and `external-token`.
0 commit comments