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
|`authType` — supported on both backends |`'access-token'`\|`'databricks-oauth'`| ✅ | ✅ |`'access-token'`|The two auth modes both backends accept. `access-token` uses `token` (PAT) and is the default when `authType` is omitted. `databricks-oauth` covers M2M (`oauthClientId` + `oauthClientSecret`; kernel runs OIDC discovery + client-credentials internally) and U2M (browser; no secret — kernel U2M differs slightly, see the OAuth sub-option rows below).|
61
-
|`authType` — Thrift-only |`'custom'`\|`'token-provider'`\|`'external-token'`\|`'static-token'`| ✅ | ❌ | — |**Thrift-only.**`custom`(`provider: IAuthentication`), `token-provider`(`tokenProvider: ITokenProvider`), `external-token`(`getToken: TokenCallback`), `static-token` (`staticToken`). The kernel throws `unsupported auth mode` for all four — it supports only the two modes above.|
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
-
|`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
-
|`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.|
|`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
-
|`enableTokenFederation` / `federationClientId`|`boolean` / `string`| ✅ |❌|`false` / — |**Thrift-only** (available on the token-provider / external-token / static-token arms, none of which the kernel supports). |
58
+
| Option | Type | Thrift | Kernel | Default Value | Note |
|`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). |
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
+
|`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
+
|`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
+
|`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. |
|`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
+
|`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
69
69
## HTTP client, proxy, retries
70
70
@@ -161,8 +161,7 @@ backend, so they are read regardless of `useKernel`. Defaults are sourced from
161
161
1.`enableMetricViewMetadata` — auto-injected for both backends in
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.
0 commit comments